Flutter的Webview-如何清除会话状态?

问题描述 投票:2回答:1

我有一个可以登录到特定页面并通过Javascript执行某些命令的应用程序。但是,当我再次启动该应用程序时,应打开登录表单。但是,它仍然保持登录状态并转到用户的屏幕。

        child: WebView(
              initialUrl:
                  'https://thepage.com/m/customer/account/login/',
              onWebViewCreated: (c) {
                _webviewController = c;
                print("cleaning the cache");
                _webviewController.clearCache();
              },
              onPageFinished: (String page) async {
                setState(() {
                  _isPageLoaded = true;
                });
              },
              javascriptMode: JavascriptMode.unrestricted,
            ),

我试图清除缓存,但可能还不够。

I/zygote64( 5259): Compiler allocated 6MB to compile void android.view.ViewRootImpl.performTraversals()
I/flutter ( 5259): cleaning the cache
flutter webview
1个回答
0
投票
© www.soinside.com 2019 - 2024. All rights reserved.