Android flutter's flutter_webview_plugin plugin's webview shows loading indicator and nothing else Android flutter's flutter_webview_plugin plugin's webview shows loading indicator and nothing else dart dart

Android flutter's flutter_webview_plugin plugin's webview shows loading indicator and nothing else


To solve this problem we will have to listen both the webview's onDestroy status and navigator's pop-ability and then we will pop the webview route (screen).To do this we will just write this code within the build method where the WebviewScaffold is returned.

flutterWebviewPlugin.onDestroy.listen((_){      if(Navigator.canPop(context)){        Navigator.of(context).pop();      }    });

Problem solved :)

note flutterWebviewPlugin is an object of FlutterWebviewPlugin declared out of the build method.