alertYesNo static method
dynamic
alertYesNo(
- BuildContext context,
- dynamic onPressedBTN_YES()?, {
- String titleText = "",
- TextStyle? titleStyle,
- Color? titleColor,
- String? labelBTNtext,
- TextStyle? styleLabelBTN_NO,
- TextStyle? styleLabelBTN_YES,
- Color? colorLabelBTN_NO,
- Color? colorLabelBTN_YES,
- Decoration? decorationBTN,
- Color? colorBTN,
- double? heightBTN,
- double? widthBTN,
Implementation
static alertYesNo(
BuildContext context,
Function()? onPressedBTN_YES, {
String titleText = "",
TextStyle? titleStyle,
Color? titleColor,
String? labelBTNtext,
TextStyle? styleLabelBTN_NO,
TextStyle? styleLabelBTN_YES,
Color? colorLabelBTN_NO,
Color? colorLabelBTN_YES,
Decoration? decorationBTN,
Color? colorBTN,
double? heightBTN,
double? widthBTN,
}) {
return showDialog(
context: context,
builder: (context) {
return XAlertDialog(
height: null,
title_Text: titleText,
title_Style: titleStyle ?? XStyles.xStyTextForTextBase(titleColor ?? Colors.white),
actionsBTNarea_Child: Row(mainAxisAlignment: MainAxisAlignment.spaceAround, children: [
XBtnbase(
width: widthBTN ?? 70,
height: heightBTN ?? 30,
label: labelBTNtext ?? "NO",
label_Style: styleLabelBTN_NO ?? XStyles.xStyTextForSubLabel(colorLabelBTN_NO ?? Colors.redAccent),
decoration: decorationBTN ?? BoxDecoration(color: colorBTN ?? Colors.transparent),
elevation: 0,
onPressed: () {
Navigator.pop(context);
}),
XBtnbase(
width: widthBTN ?? 70,
height: heightBTN ?? 30,
label: labelBTNtext ?? "SI",
label_Style: styleLabelBTN_YES ?? XStyles.xStyTextForSubLabel(colorLabelBTN_YES ?? Colors.greenAccent),
decoration: decorationBTN ?? BoxDecoration(color: colorBTN ?? Colors.transparent),
elevation: 0,
onPressed: () {
onPressedBTN_YES!();
Navigator.pop(context);
})
]));
});
}