求助关于flutter_webview_plugin的自适应屏幕问题

在使用flutter_webview_plugin时遇到屏幕自适应问题,尝试通过修改插件源码设置bool useWideViewPort,但效果未如预期。在小米设备及Android 9.0原生模拟器上,WebView仍无法正确自适应。寻求社区大神的帮助。
摘要由CSDN通过智能技术生成

使用如下代码

 

 

return Scaffold(
      appBar: AppBar(
        title: new Text(widget.title),
        bottom: new PreferredSize(
            preferredSize: const Size.fromHeight(1.0),
            child: isLoad
                ? new LinearProgressIndicator()
                : new Divider(
              height: 0.5,
              color: Theme.of(context).primaryColor,
            )),
      ),
      body: SafeArea(
        child: WebviewScaffold(
          url: widget.url,
          withZoom: true,
          withLocalStorage: true,
          withJavascript: true,
        ),
        bottom: true,
        left: true,
        right: true,
        top: true,
      )
    );

得到效果:

很显然,缺少自适应效果,也就相当于Android WebView中的 setting.setUseWideViewPort(true); 虽然WebviewScaffold往里面是WebView,不过参数中并没有setUseWideVi

评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值