failedDialog static method
Future<void>
failedDialog(
{ - dynamic context,
})
Implementation
static Future<void> failedDialog({context}) async {
return showDialog(
barrierDismissible: false,
context: context,
builder: (context) {
return AlertDialog(
elevation: 0,
contentPadding: const EdgeInsets.all(0),
backgroundColor: Colors.transparent,
content: Card(
color: WHITE,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10)),
child: SizedBox(
width: double.maxFinite,
child: Wrap(
children: <Widget>[
Padding(
padding: const EdgeInsets.symmetric(horizontal: 20.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
verticalSpace(),
Center(
child: Container(
decoration: const BoxDecoration(
color: FILL_RED, shape: BoxShape.circle),
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Image.asset(failed,
height: 55,
width: 55,
package: 'mca_flutter_sdk'),
))),
verticalSpace(),
const Center(
child: Text(
'Purchase Unsuccessful',
style: TextStyle(
fontWeight: FontWeight.w700, fontSize: 21),
),
),
verticalSpace(),
const Text(
'Your Payment is Unsuccessfully,\nRetry so you can continue',
textAlign: TextAlign.center,
style: TextStyle(fontSize: 14)),
verticalSpace(),
Padding(
padding: const EdgeInsets.all(35.0),
child: successButton(
text: 'Retry',
onTap: () {
Navigator.pop(context);
}),
),
smallVerticalSpace(),
],
),
),
],
),
),
),
);
});
}