I am using the following method to call a loading dialog before going to the next screen , but when i return to the previous page with the App Bars back function the Loading indicator is still loading.
How do you clear all Navigators when going back?
showDialog(
context: context,
builder: (context) {
return Center(
child: CircularProgressIndicator(),
);
});