mDialogCupertinoConfirm<T> function
Implementation
Future<T?> mDialogCupertinoConfirm<T>({
required String title,
required VoidCallback onYes,
}) {
return showCupertinoDialog(
context: Get.context!,
builder: (BuildContext context) {
return CupertinoAlertDialog(
// title: const Text('Confirm'),
content: Text(
title,
style: TextStyle(
color: MThemeConfig.cupertinoDialogTextColor ?? Color(0xff111111),
fontSize: 17.px,
fontWeight: FontWeight.w600,
),
),
actions: <Widget>[
CupertinoDialogAction(
child: Text('No', style: MThemeConfig.noTextStyle),
onPressed: () {
Navigator.of(context).pop();
},
),
CupertinoDialogAction(
child: Text('Yes', style: MThemeConfig.yesTextStyle),
onPressed: () async {
onYes();
},
),
],
);
},
);
}