ackNackDialog method
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,
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,
);
}