showError static method
Future
showError({
- required BuildContext context,
- String? title,
- required String message,
- VoidCallback? onCancel,
- ThemeData? themeData,
Implementation
static Future showError({
required BuildContext context,
String? title,
required String message,
VoidCallback? onCancel,
ThemeData? themeData,
}) async {
return showDialog(
barrierDismissible: false,
context: context,
builder: (BuildContext context) {
return Theme(
data: themeData ?? Theme.of(context),
child: AtOnboardingDialog(
title: title ?? AtOnboardingLocalizations.current.notice,
message: message,
actions: [
AtOnboardingSecondaryButton(
child: Text(
AtOnboardingLocalizations.current.btn_close,
),
onPressed: () {
Navigator.pop(context);
onCancel?.call();
},
),
],
),
);
},
);
}