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