Set color for the dialog buttons

This commit is contained in:
vishnukvmd 2021-08-23 15:54:56 +05:30
parent e0fd3725b7
commit 838aa5def4

View file

@ -43,8 +43,7 @@ class _PaymentWebPageState extends State<PaymentWebPage> {
void initState() {
userService.getPaymentToken().then((token) {
initPaymentUrl = _getPaymentUrl(token);
setState(() {
});
setState(() {});
});
if (Platform.isAndroid && kDebugMode) {
AndroidInAppWebViewController.setWebContentsDebuggingEnabled(true);
@ -107,7 +106,8 @@ class _PaymentWebPageState extends State<PaymentWebPage> {
await _dialog.hide();
}
},
onLoadHttpError: (controller, navigationAction, code, msg) async {
onLoadHttpError:
(controller, navigationAction, code, msg) async {
_logger.info("onHttpError with $code and msg = $msg");
},
onLoadStop: (controller, navigationAction) async {
@ -152,12 +152,24 @@ class _PaymentWebPageState extends State<PaymentWebPage> {
title: Text('are you sure you want to exit?'),
actions: <Widget>[
TextButton(
child: Text('yes'),
onPressed: () => Navigator.of(context).pop(true)),
child: Text('yes',
style: TextStyle(
color: Colors.redAccent,
)),
onPressed: () => Navigator.of(context).pop(true),
),
TextButton(
child: Text('no'),
onPressed: () => Navigator.of(context).pop(false)),
]));
child: Text(
'no',
style: TextStyle(
color: Colors.white,
),
),
onPressed: () => Navigator.of(context).pop(false),
),
],
),
);
}
bool _isPaymentActionComplete(Uri loadingUri) {