entryDialog method
Widget
entryDialog(
- AppModel app,
- BuildContext context, {
- Key? key,
- bool? includeHeading,
- required String title,
- String? ackButtonLabel,
- String? nackButtonLabel,
- String? hintText,
- required dynamic onPressed(
- String? response
- String? initialValue,
- double? widthFraction,
override
Implementation
@override
Widget entryDialog(
AppModel app,
BuildContext context, {
Key? key,
bool? includeHeading,
required String title,
String? ackButtonLabel,
String? nackButtonLabel,
String? hintText,
required Function(String? response) onPressed,
String? initialValue,
double? widthFraction, // percentage of screen width
}) {
String? feedback;
return dialogHelper.build(
app,
context,
width: widthFraction == null
? null
: fullScreenWidth(context) * widthFraction,
key: key,
includeHeading: includeHeading,
dialogButtonPosition: DialogButtonPosition.topRight,
title: title,
contents: dialogHelper.getListTile(
leading: Icon(Icons.message),
title: DialogField(
app: app,
valueChanged: (value) => feedback = value,
initialValue: initialValue,
decoration: InputDecoration(
hintText: hintText,
labelText: hintText,
),
)),
buttons: dialogHelper.getAckNackButtons(
app,
context,
ackFunction: () {
Navigator.of(context).pop();
onPressed(feedback);
},
nackFunction: () {
Navigator.of(context).pop();
onPressed(null);
},
ackButtonLabel: ackButtonLabel,
nackButtonLabel: nackButtonLabel,
),
dialogBackgroundColor:
_style.monaStyleAttributesModel.dialogBackgroundColor,
dialogSeperatorColor:
_style.monaStyleAttributesModel.dialogSeperatorColor,
);
}