xLayout_Dialog method
Implementation
Future<bool?> xLayout_Dialog(T item, {Widget? contentWidget, String? title, bool BTNno_Visible = true, String? BTN_Label_YES, String? BTN_Label_NO, Function()? onPressed}) async {
return await showDialog<bool>(
barrierDismissible: false,
context: context,
builder: (context) {
return XAlertDialog(
height: null,
title_Text: title ?? "Modifica il campo qui sotto:",
title_Style: XStyles.xStyTextForTextBase(XColors.foregroundLight),
child: contentWidget ?? Container(height: 0, width: 0),
actionsBTNarea_Child: Row(mainAxisAlignment: MainAxisAlignment.center, children: [
BTNno_Visible
? Expanded(
child: XBtnbase(
label: BTN_Label_NO ?? "Annulla",
label_Style: XStyles.xStyTextForSubLabel(XColors.undo),
onPressed: () {
return Navigator.pop(context, false);
}))
: Container(),
SizedBox(width: 10),
Expanded(
child: XBtnbase(
label: BTN_Label_YES ?? "OK, avanti..",
label_Style: XStyles.xStyTextForSubLabel(XColors.done),
onPressed: onPressed,
),
)
]));
});
// return x;
}