showAlertDialog static method
Shows an alert dialog to the user
An alert contains an optional title, message. The positiveButtonText
will appear under the dialog and allows users to close it. When closed,
a bool will be returned to the user. This value will always be true.
Implementation
static Future<bool?> showAlertDialog({
String? title,
String? message,
String? positiveButtonText,
}) async {
return await _channel.invokeMethod(
'dialog.alert',
{
"title": title,
"message": message,
"positiveButtonText":
positiveButtonText ?? defaultPositiveButtonText,
},
);
}