I have the following AlertDialog
.
showDialog(
context: context,
child: new AlertDialog(
title: const Text(\"Lo
Generally Navigator.pop(context);
works.
But If the application has multiple Navigator objects and dialogBox
doesn't close, then try this
Navigator.of(context, rootNavigator: true).pop();
If you want to pass result call, try
Navigator.pop(context,result);
OR
Navigator.of(context, rootNavigator: true).pop(result)