showTheDialog method
void
showTheDialog({
- Key? key,
- required BuildContext context,
- required String? title,
- required String message,
- required String? releaseNotes,
- required bool canDismissDialog,
- required HcUpgradeMessages messages,
Show the alert dialog.
Implementation
void showTheDialog({
Key? key,
required BuildContext context,
required String? title,
required String message,
required String? releaseNotes,
required bool canDismissDialog,
required HcUpgradeMessages messages,
}) {
if (widget.upgrade.debugLogging) {
if (kDebugMode) {
print('hcUpgrade: showTheDialog title: $title');
print('hcUpgrade: showTheDialog message: $message');
print('hcUpgrade: showTheDialog releaseNotes: $releaseNotes');
}
}
// Save the date/time as the last time alerted.
widget.upgrade.saveLastAlerted();
showDialog(
barrierDismissible: canDismissDialog,
context: context,
builder: (BuildContext context) {
return WillPopScope(
onWillPop: () async => onWillPop(),
child: alertDialog(
key,
title ?? '',
message,
releaseNotes,
context,
widget.dialogStyle == HcUpgradeDialogStyle.cupertino,
messages,
));
},
);
}