showConfirmSubmitDialog static method
Implementation
static Future<void> showConfirmSubmitDialog(context,
{okAction, cancelAction}) async {
return showDialog(
barrierDismissible: false,
context: context,
builder: (context) {
return AlertDialog(
elevation: 0,
contentPadding: const EdgeInsets.all(0),
backgroundColor: Colors.transparent,
content: Card(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12)),
child: Wrap(
children: <Widget>[
Container(height: 30),
Center(
child: Image.asset(
'assets/images/checkout.png',
width: width(context) * 0.2,
package: 'mca_inspection_sdk',
),
),
const Center(
child: Padding(
padding: EdgeInsets.all(15.0),
child: Text(
'Completed !',
style: TextStyle(
fontSize: 22.0,
fontWeight: FontWeight.w600,
color: PRIMARY),
),
),
),
Padding(
padding: const EdgeInsets.fromLTRB(20, 0, 15, 20),
child: Column(
children: [
SizedBox(
width: double.infinity,
child: Column(
mainAxisSize: MainAxisSize.min,
children: const <Widget>[
Padding(
padding: EdgeInsets.only(
left: 20.0,
right: 20.0,
bottom: 15.0,
),
child: Text(
'Great! You have Completed\nyour Inspection, would you like\nto submit?',
textAlign: TextAlign.center,
style: TextStyle(
height: 1.5, fontSize: 16.0, color: GREY),
),
),
],
),
),
const Divider(
color: GREY,
thickness: 0.2,
),
Row(
children: [
Expanded(
child: InkWell(
onTap: cancelAction,
child: Container(
padding:
const EdgeInsets.fromLTRB(5, 12, 5, 12),
child: const Center(
child: Text(
'Restart',
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 16,
color: GREY),
),
),
),
),
),
const SizedBox(width: 15),
Expanded(
child: InkWell(
onTap: okAction,
child: Container(
padding:
const EdgeInsets.fromLTRB(5, 12, 5, 12),
child: const Center(
child: Text(
'Review',
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 16,
color: PRIMARY),
),
),
),
),
),
],
),
const SizedBox(
height: 3,
),
],
),
),
],
),
),
);
});
}