showError static method
Future
showError({
- required BuildContext context,
- String? title,
- required String message,
- VoidCallback? onCancel,
Implementation
static Future showError({
required BuildContext context,
String? title,
required String message,
VoidCallback? onCancel,
}) async {
return showDialog(
barrierDismissible: false,
context: context,
builder: (BuildContext context) {
return AtOnboardingDialog(
title: title ?? 'Error',
message: message,
actions: [
AtOnboardingSecondaryButton(
child: const Text('Close'),
onPressed: () {
Navigator.pop(context);
onCancel?.call();
},
),
],
);
});
}