openDialog static method
Implementation
static openDialog({
required BuildContext context,
required String title,
}) {
return showDialog(
context: context,
builder: (_) {
return ThemeWrapper(
builder: (colors, controller) {
return Dialog(
backgroundColor: colors.transparent,
insetPadding: EdgeInsets.symmetric(horizontal: 16.w),
child: Container(
margin: EdgeInsets.all(24.w),
width: double.infinity,
padding: EdgeInsets.all(24.w),
decoration: BoxDecoration(
color: colors.backgroundGrey,
borderRadius: BorderRadius.circular(24.r),
),
child: SingleChildScrollView(
child: Column(
children: [
Text(
title,
textAlign: TextAlign.center,
style: CustomStyle.suisseIntlNormal(
color: colors.textBlack, size: 18),
),
24.verticalSpace,
CustomButton(
onTap: () => Navigator.pop(context),
title: AppHelper.getTr(TrKeys.close),
bgColor: CustomStyle.primary,
titleColor: colors.white,
),
],
),
),
),
);
},
);
},
);
}