diff --git a/lib/customWidget/dialogues/success_dialogue.dart b/lib/customWidget/dialogues/success_dialogue.dart new file mode 100644 index 0000000000000000000000000000000000000000..1e3d1463e5f74c65d0d9dc5249f2d8fec7f6b1a1 --- /dev/null +++ b/lib/customWidget/dialogues/success_dialogue.dart @@ -0,0 +1,52 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:get/get.dart'; +import '../app_text.dart'; +import '../../res/app_color_text_size.dart'; + +Future<dynamic> verificationSuccess( + {required BuildContext context, + required String assetName, + required String title, + required String subtitle}) { + return Get.dialog( + barrierDismissible: false, + barrierColor: AppColor.black.withOpacity(0.5), + Center( + child: SingleChildScrollView( + child: AlertDialog( + shape: const RoundedRectangleBorder( + borderRadius: BorderRadius.all(Radius.circular(12.0))), + backgroundColor: AppColor.white, + contentPadding: EdgeInsets.zero, + content: Padding( + padding: EdgeInsets.all(24.0.w), + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Image.asset( + assetName, + width: 64, + height: 64, + ), + AppText( + text: title, + fontSize: TextSize.textSubHeadingSize, + fontWeight: FontWeight.w500, + textColor: AppColor.slateGray, + ).paddingOnly(top: 16.0), + AppText( + text: subtitle, + fontSize: TextSize.textSmallSize, + fontWeight: FontWeight.w400, + textColor: AppColor.lightGrey, + maxLine: 2, + textAlign: TextAlign.center, + ).paddingOnly(top: 8.0), + ], + ), + ), + ), + ), + )); +} diff --git a/lib/views/verifyOTP/widgets/verification_success_dialogue.dart b/lib/views/verifyOTP/widgets/verification_success_dialogue.dart deleted file mode 100644 index b3f8bebfa7fee0d6348306e96498c372c75733d1..0000000000000000000000000000000000000000 --- a/lib/views/verifyOTP/widgets/verification_success_dialogue.dart +++ /dev/null @@ -1,89 +0,0 @@ -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:get/get.dart'; -import 'package:get/get_core/src/get_main.dart'; -import '../../../customWidget/app_text.dart'; -import '../../../res/app_color_text_size.dart'; - -verificationSuccess( - {required BuildContext context, - required String assetName, - required String title, - required String subtitle}) { - return Get.dialog( - barrierDismissible: false, - Center( - child: SingleChildScrollView( - child: AlertDialog(shape: const RoundedRectangleBorder( - borderRadius: BorderRadius.all(Radius.circular(12.0))), - backgroundColor: AppColor.white, - contentPadding: EdgeInsets.zero, - content: Padding( - padding: EdgeInsets.all(24.0.w), - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Image.asset( - assetName, - width: 64, - height: 64, - ), - Padding( - padding: EdgeInsets.only(top: 16.0), - child: AppText( - text: title, - fontSize: 18, - fontWeight: FontWeight.w500, - textColor: AppColor.slateGray, - ), - ), - Padding( - padding: EdgeInsets.only(top: 8.0), - child: AppText( - text: subtitle, - fontSize: 14, - fontWeight: FontWeight.w400, - textColor: AppColor.lightGrey,maxLine: 2,textAlign: TextAlign.center, - ), - ), - ], - ), - ), - ), - ), - )); - - // showDialog(barrierDismissible: false, - // context: context, - // builder: (_) => Dialog( - // child: Column( - // crossAxisAlignment: CrossAxisAlignment.center, - // children: [ - // Image.asset( - // assetName, - // width: 64, - // height: 64, - // ), - // Padding( - // padding: EdgeInsets.only(left: 16.0.h), - // child: AppText( - // text:title, - // fontSize: 18, - // fontWeight: FontWeight.w500, - // textColor: AppColor.slateGray, - // ), - // ), - // Padding( - // padding: EdgeInsets.only(left: 8.0.h), - // child: AppText( - // text: subtitle, - // fontSize: 14, - // fontWeight: FontWeight.w400, - // textColor: AppColor.lightGrey, - // ), - // ), - // ], - // ), - // )); -}