fluttercommunity / fluttercommunity/flutter_webview_plugin

WebView in TabBarView show not correct.

オープン
#487 コメント 1 件 リアクション 5 件 担当者 0 名 GitHub で見る
主要言語
Java
スター
1.5k
フォーク
938
PR マージ指標
30日以内にマージされた PR はありません

説明

```
class DetailAcademicPage extends StatelessWidget {
final String title;
DetailAcademicPage(this.type);

@override
Widget build(BuildContext context) {
final SectionPage tab1 = SectionPage(0, title);
final SectionPage tab2 = SectionPage(1, title);
final SectionPage tab3 = SectionPage(2, title);
return Scaffold(
body: DefaultTabController(
length: 3,
child: Scaffold(
backgroundColor: Colors.white,
appBar: AppBar(
title: Text(
title,
style: TextStyle(color: Colors.white),
),
centerTitle: true,
iconTheme: IconThemeData(color: Colors.white),
bottom: TabBar(
indicatorColor: Colors.white,
tabs: [
Tab(
child: Text("Section 1")),
Tab(
child: Text("Section 2")),
Tab(
child: Text("Section 3",))
])),
body: TabBarView(
physics: NeverScrollableScrollPhysics(),
children: [tab1, tab2, tab3],
),
)),
);
}
}

class SectionPage extends StatefulWidget {
final int pageNumber;
final String title;

SectionPage(this.pageNumber, this.title);

@override
State createState() {
return _SectionPage();
}
}

class _SectionPage extends State with AutomaticKeepAliveClientMixin {
String urlPath;

@override
void initState() {
super.initState();
switch (widget.pageNumber) {
case 0:
urlPath = "/Section 1.html";
break;
case 1:
urlPath = "/Section 2.html";
break;
case 2:
urlPath = "/Section 3.html";
break;

}
}

@override
Widget build(BuildContext context) {
super.build(context);
return Container(
child: WebviewScaffold(
url: urlPath,
resizeToAvoidBottomInset: false,
withJavascript: true,
withZoom: false,
withLocalStorage: true,
scrollBar: false,
supportMultipleWindows: false,
hidden: true),
);
}

@override
bool get wantKeepAlive => true;
}

```

## Steps to Reproduce

I create TabBar with 3 TabBarView, every TabBarView i use WebView inside.
But when render webview it auto put appbar top and can't scroll, and bottom view empty.

## Logs
- I dont see error log in Logcat

```
```

```
```

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。