webview_flutter: ^3.0.2 package using but no matter which pull to refresh package I add to the code, I could not run it, if you could help me, I would be very grateful. Thank you in advance.
Future<void> _refreshWebView() async {
setState(() {
_isLoading = true;
});
await _webViewController.reload();
setState(() {
_isLoading = false;
});
}
return WillPopScope(
onWillPop: _onBackPressed,
child: Scaffold(
appBar: AppBar(
toolbarHeight: 0,
backgroundColor: APP_COLOR,
),
body: Stack(
children: [
Expanded(
child: WebView(
key: _webViewKey,
initialUrl: _cachedUrl ?? WEB_VIEW_URL,
javascriptMode: JavascriptMode.unrestricted,
onPageFinished: (String url) {
setState(() {
_isLoading = false;
});
},
onWebViewCreated: (controller) {
_webViewController = controller;
},
),
),
if (_isLoading) LinearProgressIndicator(),
],
),
),
);
Please See This Reposetri : https://github.com/RomitKatrodiya/in_app_webview
Code