mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-15 17:47:28 +00:00
54 lines
1.5 KiB
Dart
54 lines
1.5 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_svg/svg.dart';
|
|
import 'package:syncrow_app/generated/assets.dart';
|
|
import 'package:syncrow_app/utils/resource_manager/font_manager.dart';
|
|
|
|
class SuccessDialog extends StatelessWidget {
|
|
final double dialogWidth;
|
|
final String message;
|
|
|
|
const SuccessDialog(
|
|
{super.key, this.dialogWidth = 160, required this.message});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Dialog(
|
|
backgroundColor: Colors.transparent,
|
|
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)),
|
|
child: Container(
|
|
width: dialogWidth,
|
|
height: 120,
|
|
decoration: BoxDecoration(
|
|
color: Colors.black.withOpacity(0.7),
|
|
borderRadius: BorderRadius.circular(15),
|
|
),
|
|
child: Stack(
|
|
alignment: Alignment.center,
|
|
children: [
|
|
Positioned(
|
|
top: 20,
|
|
child: SvgPicture.asset(
|
|
Assets.assetsSuccessWhite,
|
|
width: 50,
|
|
height: 50,
|
|
)),
|
|
Positioned(
|
|
bottom: 20,
|
|
child: Text(
|
|
message,
|
|
style: const TextStyle(
|
|
color: Colors.white,
|
|
fontSize: FontSize.s16,
|
|
fontFamily: FontsManager.fontFamily,
|
|
fontWeight: FontsManager.regular,
|
|
letterSpacing: 0.16,
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|