showAlertDialogSuccessorFailed method
Implementation
showAlertDialogSuccessorFailed(BuildContext context, bool isSuccess) {
Widget okButton = TextButton(
child: DefaultText(
sizeText: 14.5,
textLabel: isSuccess == true
? "Ok"
:"back",
fontWeight: FontWeight.bold,
),
onPressed: () {
Navigator.pop(context);
if (isSuccess == true) {
SellonRouter.modalLoading(context);
apiCal(true);
// SellonRouter.modalLoading(context
}
},
);
AlertDialog alert = AlertDialog(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(12))),
icon: Image.asset(
isSuccess == false ? Assets.gameWarningICon : Assets.gamesuccessIcon,
width: 40,
height: 40,
),
actionsAlignment: MainAxisAlignment.center,
// title: Text("AlertDialog"),
content: isSuccess == false
? DefaultText(
textAlign: TextAlign.center,
textLabel:
// Languanges.of(context).gameOOpsYourTicketGameIsNotEnough,
"Ops not enough",
sizeText: 14.5,
)
:
Container()
// RichTextDefault( "${Languanges.of(context).gamePurchasesHasBennSuccessful} \n " + Languanges.of(context).gameWillBEReducedIndirectly, [Languanges.of(context).gamePurchasesHasBennSuccessful],sizeFont:14.5,)
,
actions: [
okButton,
],
);
showDialog(
context: context,
barrierDismissible: false,
builder: (BuildContext context) {
return alert;
},
);
}