xBuild_PopUp method
Implementation
Future<bool?> xBuild_PopUp(BuildContext context, K item, String textTitle) async {
return showDialog(
context: context,
builder: (BuildContext context) {
return AlertDialog(
title: Center(child: Container(child: Text(textTitle, style: XStyles.xStyTextForTextBase()))),
content: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Expanded(
child: TextButton(
style: TextButton.styleFrom(backgroundColor: Colors.black),
child: Text('YES', style: TextStyle(color: Colors.greenAccent)),
onPressed: () {
Navigator.pop(context, true);
})),
SizedBox(width: 15),
Expanded(
child: TextButton(
style: TextButton.styleFrom(backgroundColor: Colors.black),
child: Text('NO', style: TextStyle(color: Colors.redAccent)),
onPressed: () {
Navigator.pop(context, false);
},
)),
],
),
],
));
});
}