Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/205.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
Android 在Flatter中打开web视图并单击下拉列表时发生崩溃_Android_Flutter_Webview_Native - Fatal编程技术网

Android 在Flatter中打开web视图并单击下拉列表时发生崩溃

Android 在Flatter中打开web视图并单击下拉列表时发生崩溃,android,flutter,webview,native,Android,Flutter,Webview,Native,[错误:flatter/lib/ui/ui\u dart\u state.cc(157)]未处理的异常: “package:flatter/src/widgets/page_view.dart”:失败的断言:行 179位置7:“positions.isNotEmpty”:不能使用PageController.page 在使用它构建页面视图之前访问 newwebview( initialUrl:webUrl, javascriptMode:javascriptMode.unrestricted,

[错误:flatter/lib/ui/ui\u dart\u state.cc(157)]未处理的异常: “package:flatter/src/widgets/page_view.dart”:失败的断言:行 179位置7:“positions.isNotEmpty”:不能使用PageController.page 在使用它构建页面视图之前访问

newwebview(
initialUrl:webUrl,
javascriptMode:javascriptMode.unrestricted,
onWebViewCreated:(控制器){
_myController=控制器;
},
/*JavaScriptChannel:[
_toasterJavascriptChannel(上下文),
].toSet()*/
onPageFinished:(url){
_myController.evaluateJavascript(
“console.log(document.documentElement.innerHTML);”;
设置状态(){
_loadedPage=true;
});
},
),```
手势检测器(
孩子:WebviewScaffold(
网址:webUrl,
withJavascript:true,
withLocalStorage:true,
PersistentFooter按钮:[
升起的(
已按下:(){
waafiPaySpalshScreen();
dispose();
},
文本:“确认”,
)
],
),
),

发布一些代码。
new WebView(
                initialUrl: webUrl,
                javascriptMode: JavascriptMode.unrestricted,
                onWebViewCreated: (controller) {
                  _myController = controller;
                },
                /*javascriptChannels: <JavascriptChannel>[
                  _toasterJavascriptChannel(context),
                ].toSet(),*/
                onPageFinished: (url) {
                  _myController.evaluateJavascript(
                      "console.log(document.documentElement.innerHTML);");

                  setState(() {
                    _loadedPage = true;
                  });
                },
              ),```
GestureDetector(
              child: WebviewScaffold(
                url: webUrl,
                withJavascript: true,
                withLocalStorage: true,
                persistentFooterButtons: <Widget>[
                  RaisedBtn(
                    onPressed: (){
                      waafiPaySpalshScreen();
                      flutterWebviewPlugin.dispose();
                    },
                    text: "Confirm",
                  )
                ],
              ),
            ),