I created a form that once submitted shows a dialog to the user, like this:
.....
showDialog(
barrierDismissible: false,
context: context,
builder: (BuildContext context) {
return AlertDialog(
contentPadding: EdgeInsets.all(0),
content: Container(
child: Wrap(
children: [
Container(
width: double.infinity,
margin: EdgeInsets.all(0),
padding: EdgeInsets.all(20),
decoration: BoxDecoration(gradient: linearGradientCustom),
child: Column(
children: [
.....
I am not using any button or icon to close the dialog, since the dialog box is quite small and it just makes sense to simply tap away from it to dismiss it.
The issue is that I need to redirect the users to a different route on dismiss, instead of simply popping the dialog context.
How can I achieve this?
Thanks a lot.