modalSellOnKebalik method
dynamic
modalSellOnKebalik(})
Implementation
modalSellOnKebalik(
BuildContext context, {
String? title,
String? message,
Function()? onOke,
Function()? onCancel,
TextAlign? textalign,
Color? colorOk,
Color? colorNo,
bool? alone,
}) {
Widget cancelIosButton = CupertinoDialogAction(
// isDestructiveAction : true,
child: DefaultText(
textLabel: "No",
colorsText: colorNo != null ? colorNo : Colors.black,
),
onPressed:
onCancel != null ? onCancel : () => Navigator.of(context).pop(),
);
Widget proccessIosButton = CupertinoDialogAction(
child: DefaultText(
textLabel: alone != null
? "Ok"
: "Yes",
colorsText: colorOk != null ? colorOk : Config.colorPrimary,
),
onPressed: onOke,
);
CupertinoAlertDialog curpertionalertDialog = CupertinoAlertDialog(
// title: DefaultText(
// textLabel: "Sellon",
// fontWeight: FontWeight.bold,
// sizeText: 16,
// ),
content: DefaultText(
textLabel: message,
textAlign: textalign != null ? textalign : null,
colorsText: Colors.black,
),
actions: alone != null
? [proccessIosButton]
: [
proccessIosButton,
cancelIosButton,
],
);
// show the dialog
if (message != "") {
showCupertinoDialog(
context: context,
builder: (BuildContext context) {
return curpertionalertDialog;
});
}
}