I use the WebView_plugin in my Flutter project. I can load my own website. But my website updates aren't there. I guess it's a cache issue.
I tried to pass some options like: clearCache
, appCacheEnabled
but my website updates aren't there.
How I instantiate my webview:
dart
final webView = WebviewScaffold(
url: url,
clearCache: true, // <-- I don't want cache
appCacheEnabled: false, // <-- I don't want cache
initialChild: Container(
color: Colors.white,
child: const Center(
child: const CircularProgressIndicator(),
),
),
withZoom: false,
withLocalStorage: true,
hidden: true,
);
In my pubspec.yaml
:
dependencies:
flutter_webview_plugin: ^0.3.5
How do I clear the cache?
try it, frist clearCache: true
and after appcacheEnable: false
dart
final webView = WebviewScaffold(
clearCache: true, // <-- first clearCache
appCacheEnabled: false, // <--after it :3
url: url,
initialChild: Container(
color: Colors.white,
child: const Center(
child: const CircularProgressIndicator(),
),
),
withZoom: false,
withLocalStorage: true,
hidden: true,
);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With