errorDialog method

  1. @override
Widget errorDialog(
  1. AppModel app,
  2. BuildContext context, {
  3. Key? key,
  4. bool? includeHeading,
  5. required String title,
  6. required String errorMessage,
  7. String? closeLabel,
  8. double? widthFraction,
})
override

Implementation

@override
Widget errorDialog(
  AppModel app,
  BuildContext context, {
  Key? key,
  bool? includeHeading,
  required String title,
  required String errorMessage,
  String? closeLabel,
  double? widthFraction, // percentage of screen width
}) {
  return dialogHelper.build(
    app,
    context,
    width: widthFraction == null
        ? null
        : fullScreenWidth(context) * widthFraction,
    key: key,
    includeHeading: includeHeading,
    title: title,
    contents:
        _style.frontEndStyle().textStyle().text(app, context, errorMessage),
    dialogButtonPosition: DialogButtonPosition.topRight,
    buttons: dialogHelper.getCloseButton(app, context,
        buttonLabel: closeLabel, onPressed: () => Navigator.pop(context)),
    dialogBackgroundColor:
        _style.monaStyleAttributesModel.dialogBackgroundColor,
    dialogSeperatorColor:
        _style.monaStyleAttributesModel.dialogSeperatorColor,
  );
}