fluttercommunity / flutter_webview_plugin

Community WebView Plugin - Allows Flutter to communicate with a native WebView.
https://pub.dev/packages/flutter_webview_plugin
Other
1.48k stars 932 forks source link

WebviewScaffold rendered Outside the Container #282

Open moelfassi opened 5 years ago

moelfassi commented 5 years ago

Hi i need help: Webviewscaffold rendered outside the Container I'm trying to load string text into a WebviewScaffold, but the webview is outside the container : pic

I tested with Text widget it worked well

_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,

);
}

the full Class:

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)
    ],
  ),
);
}

there is a warning in the Flutter WebView Plugin Docs :

Warning: The webview is not integrated in the widget tree, it is a native view on top of the flutter view. you won't be able to use snackbars, dialogs ...

is this real reason of the problem?

Please Help!!

moelfassi commented 5 years ago

Add more details

furuiCQ commented 5 years ago

Webviewscaffold is Scaffold.so when you Scaffold insert other Scaffold。the bug will show

moelfassi commented 5 years ago

Webviewscaffold is Scaffold.so when you Scaffold insert other Scaffold。the bug will show

so no solution.. ever?