updateDialogIos method
Implementation
Future<Widget?> updateDialogIos(context) {
return showCupertinoDialog(
context: context,
barrierDismissible: barrierDismissible,
builder: (BuildContext context) {
return WillPopScope(
onWillPop: () => _onWillPopState(context),
child: CupertinoAlertDialog(
title: Text(
title,
style: TextStyle(color: titleColor ?? Colors.black),
),
content: Text(
body ??
'A new version of the app is available ' +
CheckAppVersion().appFile.newAppVersion!,
style: TextStyle(color: bodyColor ?? Colors.black54)),
actions: (laterButtonEnable ?? true)
? <Widget>[
CupertinoDialogAction(
onPressed:
onPressDecline ?? () => Navigator.of(context).pop(),
child: Text(laterButtonText,
style: TextStyle(
color: laterButtonColor ?? Colors.black)),
),
CupertinoDialogAction(
onPressed:
onPressConfirm ?? () => Navigator.of(context).pop(),
child: Text(
updateButtonText,
style: TextStyle(
color: updateButtonTextColor,
fontWeight: FontWeight.bold),
),
)
]
: <Widget>[
CupertinoDialogAction(
onPressed:
onPressConfirm ?? () => Navigator.of(context).pop(),
child: Text(
updateButtonText,
style: TextStyle(
color: updateButtonTextColor,
fontWeight: FontWeight.bold),
),
)
],
),
);
});
}