I'm using webview_flutter plugin like below:
@override
Widget build(BuildContext context) {
return Scaffold(
body: WebView(
gestureNavigationEnabled: true,
initialUrl: link,
javascriptMode: JavascriptMode.unrestricted,
navigationDelegate: (NavigationRequest request) {
return NavigationDecision.prevent;
},
)
);
}
And whenever I change the screen orientation the pageView reloads the webPage. How can I prevent this reload?
Basically your webpage is being re-build to accomodate your landscape view of your mobile device You can use this to keep it alive by the below code
Try this should work:
Using this
for your code to be alive