fluttercommunity / fluttercommunity/flutter_webview_plugin

WebviewScaffold rendered Outside the Container

Open
#282 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
1.5k
Forks
938
PR merge metrics
No merged PRs in 30d

Description

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](https://user-images.githubusercontent.com/10370643/50445240-2dd60d00-0905-11e9-80ec-e6eab3138784.jpg)

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: [
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: [
_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!!

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the _getDescription WebviewScaffold inside the ListView and Container shown in the issue, comparing it with the working Text widget. Review the plugin documentation warning about the native view not being integrated into Flutter's widget tree. Done means determining whether the observed positioning is an inherent limitation and documenting the supported behavior or a concrete fix.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart, flutter
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.