Skip to content
Snippets Groups Projects
Select Git revision
  • d06e4e93bf1b84194b3b3cba85e047bfda23659a
  • dev default protected
  • integrating-verify-otp-screen
  • language-selection
  • ECAP1-24-verify_otp
5 results

success_dialogue.dart

Blame
  • 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),
                    ],
                  ),
                ),
              ),
            ),
          ));
    }