Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/flutter/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Flutter 如何在使用Flatter webview显示web时自动登录?_Flutter_Authentication_Webview - Fatal编程技术网

Flutter 如何在使用Flatter webview显示web时自动登录?

Flutter 如何在使用Flatter webview显示web时自动登录?,flutter,authentication,webview,Flutter,Authentication,Webview,在上面的代码中,url地址使用webview显示为App。 有没有办法自动登录 @override Widget build(BuildContext context) { return MaterialApp( home: Scaffold( body: Center( child: SafeArea( child: WebView( initialUrl: 'login pag

在上面的代码中,url地址使用webview显示为App。 有没有办法自动登录

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: Center(
          child: SafeArea(
            child: WebView(
              initialUrl: 'login page url',
              javascriptMode: JavascriptMode.unrestricted,
            ),
          ),
        ),
        floatingActionButton: FloatingActionButton(
          onPressed: _showNotification,
          tooltip: 'Increment',
          child: Icon(Icons.access_alarms),
        ),
      ),
    );
  }
}


我想你可以在第一次登录后尝试使用cookie。我正在使用flatter“CookieManager”从我的webview url获取参数令牌。

我认为您可以在首次登录后尝试使用cookie。我正在使用flatter“CookieManager”从我的webview url获取参数令牌