diff --git a/assets/icons/success-white.svg b/assets/icons/success-white.svg new file mode 100644 index 0000000..ae7e99d --- /dev/null +++ b/assets/icons/success-white.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/lib/features/shared_widgets/success_dialog.dart b/lib/features/shared_widgets/success_dialog.dart new file mode 100644 index 0000000..9674302 --- /dev/null +++ b/lib/features/shared_widgets/success_dialog.dart @@ -0,0 +1,53 @@ +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, + ), + ), + ), + ], + ), + ), + ); + } +} diff --git a/lib/generated/assets.dart b/lib/generated/assets.dart index caae2da..a077576 100644 --- a/lib/generated/assets.dart +++ b/lib/generated/assets.dart @@ -733,6 +733,10 @@ class Assets { static const String playIcon = "assets/icons/play_ic.svg"; static const String gatewayIcon = "assets/icons/gateway_icon.svg"; + //assets/icons/success-white.svg + //assets for success white image + static const String assetsSuccessWhite ="assets/icons/success-white.svg"; + /// Assets for assetsImagesAutomation /// assets/images/automation.jpg static const String assetsImagesAutomation = "assets/images/automation.jpg"; @@ -1029,4 +1033,5 @@ class Assets { static const String assetsPresenceState = "assets/icons/functions_icons/automation_functions/presence_state.svg"; + }