容器外部的Webview脚手架

时间:2018-12-26 00:54:09

标签: android layout dart flutter flutter-layout

我正在尝试将字符串文本加载到WebviewScaffold中, 但是webview在容器之外: enter image description here

我使用Text小部件进行了测试,效果很好

_getDescription(description) {
  return new Container(
  child:
    //new Text(description),
    new WebviewScaffold(
        url: new Uri.dataFromString(description, mimeType: 'text/html',encoding: utf8).toString()),
  width: double.infinity,
  margin: new  EdgeInsets.only(top: 10.0),
  height: 80,

);
}

完整班级:

child: new ListView(
        children: <Widget>[
         new Hero(
             tag: _title,
             child: _getImageNetwork(Functions.getImgResizeUrl(_img,250,''))
         ),
          _getBody(_title,_date,_description,_origin,context),
        ],
      ),

Widget _getBody(tittle,date,description,origin,context){

return new Container(
  margin: new EdgeInsets.all(15.0),
  child: new Column(
    crossAxisAlignment: CrossAxisAlignment.start,
    children: <Widget>[
      _getTittle(tittle), //Text Widget
      _getDate(date,origin), //Text Widget
      _getDescription(description),
      _getAntLink(),
      _getLink(_link,context)
    ],
  ),
);

}

Flutter WebView插件文档中有一个警告:

  

警告:Web视图未集成在窗口小部件树中,它是抖动视图顶部的本机视图。您将无法使用小吃店,对话框...

这是问题的真正原因吗?

请帮助!

0 个答案:

没有答案