flutter webview_flutter 设置cookies

孤街浪徒 提交于 2019-12-03 04:15:31
  WebViewController _controller;
      onWebViewCreated: (WebViewController wvc) {
        _controller = wvc;
    }

     onPageFinished: (String value) {
     _controller.evaluateJavascript( 'document.cookie = "SESSIONID=612bc4822b6996d6f335a963c20eb541fba72985; path=/"')
    }

设置cookies需要注意时机,这里是在页面加载完成后才设置cookie

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!