ackNackDialog method

  1. @override
Widget ackNackDialog(
  1. AppModel app,
  2. BuildContext context, {
  3. Key? key,
  4. bool? includeHeading,
  5. required String title,
  6. required String message,
  7. required OnSelection onSelection,
  8. String? ackButtonLabel,
  9. String? nackButtonLabel,
  10. double? widthFraction,
})
override

Implementation

@override
Widget ackNackDialog(
  AppModel app,
  BuildContext context, {
  Key? key,
  bool? includeHeading,
  required String title,
  required String message,
  required OnSelection onSelection,
  String? ackButtonLabel,
  String? nackButtonLabel,
  double? widthFraction, // percentage of screen width
}) {
  return dialogHelper.build(
    app,
    context,
    width: widthFraction == null
        ? null
        : fullScreenWidth(context) * widthFraction,
    key: key,
    includeHeading: includeHeading,
    dialogButtonPosition: DialogButtonPosition.topRight,
    title: title,
    contents: _style.frontEndStyle().textStyle().text(app, context, message),
    buttons: dialogHelper.getAckNackButtons(app, context, ackFunction: () {
      Navigator.of(context).pop();
      onSelection(0);
    }, nackFunction: () {
      Navigator.of(context).pop();
      onSelection(1);
    }, ackButtonLabel: ackButtonLabel, nackButtonLabel: nackButtonLabel),
    dialogBackgroundColor:
        _style.monaStyleAttributesModel.dialogBackgroundColor,
    dialogSeperatorColor:
        _style.monaStyleAttributesModel.dialogSeperatorColor,
  );
}