使用如下代码
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