手机彩票网站开发,如何建立一个网站的数据库文件,网站设计的公司工作室,怎样说服老板做网站现象 在安卓10设备上#xff0c;访问了webview页面后#xff0c;回退到其他页面后#xff0c;大概率会闪退#xff0c;请查看issuses https://github.com/flutter/flutter/issues/78405 解决思路#xff1a;在回退前#xff0c;先把webview销毁掉#xff0c;重新生成一个…现象 在安卓10设备上访问了webview页面后回退到其他页面后大概率会闪退请查看issuses https://github.com/flutter/flutter/issues/78405 解决思路在回退前先把webview销毁掉重新生成一个非webveiw页面后再回退。 使用WillPopScope和重写appBar回退函数处理
WillPopScope(onWillPop: () async {// 返回按钮事件处理逻辑final flag await checkVersion();if (flag) {return true;} else {setState(() {_destroyWebview true;});await Future.delayed(Duration(milliseconds: 20));return true;}},child: _destroyWebview ? Container() : _buildWebView())