updateDialogIos method
Implementation
Future<Widget?> updateDialogIos(context) {
return showCupertinoDialog(
context: context,
barrierDismissible: _barrierDismissible ?? true,
builder: (BuildContext context) {
return WillPopScope(
onWillPop: () => _onWillPopState(context),
child: CupertinoAlertDialog(
title: Text(
_title ?? 'Update App',
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: () => Navigator.pop(context),
child: Text(_laterButtonText ?? 'Later',
style: TextStyle(
color: _laterButtonColor ?? Colors.black)),
),
CupertinoDialogAction(
onPressed: () {
AppInstaller.goStore(
CheckAppVersion().appFile.appPackage!,
CheckAppVersion().appFile.appPackage!);
},
child: Text(
_updateButtonText ?? "Update",
style: TextStyle(
color: _updateButtonTextColor,
fontWeight: FontWeight.bold),
),
)
]
: <Widget>[
CupertinoDialogAction(
onPressed: () {
AppInstaller.goStore(
CheckAppVersion().appFile.appPackage!,
CheckAppVersion().appFile.appPackage!);
},
child: Text(
_updateButtonText ?? "Update",
style: TextStyle(
color: _updateButtonTextColor,
fontWeight: FontWeight.bold),
),
)
],
),
);
});
}