Select Git revision
success_dialogue.dart
success_dialogue.dart 1.76 KiB
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),
],
),
),
),
),
));
}