问题描述
我们使用的是 Flutter 1.22 版
当使用 Flutter 1.22.4 并为网站页面使用 Flutter_inappwebview 时。
Android 10 版三星平板电脑面临问题。 当使用蓝牙鼠标连接时,webview 屏幕无法点击。当我们使用触摸屏时,屏幕点击事件被触发。
https://pub.dev/packages/flutter_inappwebview
appBar: buildAppBar(),body: Column(
children: <Widget>[
Container(
padding: EdgeInsets.all(1.0),child: progress < 1.0
? LinearProgressIndicator(value: progress)
: Container()),URL != null ?
Expanded(
child: InAppWebView(
initialUrl:URL,initialOptions: InAppWebViewGroupOptions(
crossplatform: InAppWebViewOptions(
javaScriptEnabled: true,userAgent:
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML,like Gecko) Chrome/78.0.3904.97 Safari/537.36",mediaplaybackRequiresUserGesture: false,debuggingEnabled: true,),android: AndroidInAppWebViewOptions(
useWideViewPort: true,loadWithOverviewmode: true,builtInZoomControls: true,allowFileAccess:true,displayZoomControls: true,allowContentAccess:true,allowFileAccessFromFileURLs:true,allowUniversalAccessFromFileURLs:true,domStorageEnabled: true
),onLoadStart: (InAppWebViewController controller,String url) {
setState(() {
this.url = url;
});
},onLoadStop:
(InAppWebViewController controller,String url) async {
setState(() {
this.url = url;
_isLoading = false;
});
},onWebViewCreated: (InAppWebViewController controller) {
webViewController = controller;
},androidOnPermissionRequest:
(InAppWebViewController controller,String origin,List<String> resources) async {
return PermissionRequestResponse(
resources: resources,action: PermissionRequestResponseAction.GRANT);
}),):Center(child: Text('Oops')),],
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)