fluttercommunity / fluttercommunity/flutter_webview_plugin
Second screen below WebviewScaffold
- Vorherrschende Sprache
- Java
- Sterne
- 1.5k
- Forks
- 938
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
Using WebviewScaffold with appBar and bottomNavigationBar bugs the Navigation.push.
I'm using the WebviewScaffold as my primary route "/", with two IconButtons inside a Row, in the bottomNavigationBar. Also, using the AppBar inside the WebviewScaffold.
Opening the second page replaces only the AppBar and the BottomNavigationBar, the WebView is still there.
Maybe I'm doing something wrong with the Navigator, I don't know. :/
```dart
MaterialApp(
title: 'Flutter Demo',
debugShowCheckedModeBanner: false,
theme: ThemeData(
primarySwatch: Colors.blue,
),
routes: {
"/": (_) => WebView(),
},
);
...
class _WebViewState extends State {
@override
Widget build(BuildContext context) {
return new WebviewScaffold(
url: "https://www.google.com",
appBar: AppBar(title: Text("First WebPage")),
bottomNavigationBar: bottomNavigation(context),
);
}
@override
void dispose() {
_flutterWebView.dispose();
super.dispose();
}
/// Buttons
Row bottomNavigation(context) {
return Row(
children: [
IconButton(
icon: Icon(Icons.list),
onPressed: () {
openList(context);
}),
IconButton(icon: Icon(Icons.phone_android), onPressed: openNativeScreen)
],
mainAxisAlignment: MainAxisAlignment.center,
);
}
///Actions
void openList(BuildContext context) {
Navigator.push(context, new NavigationRoute(builder: (context) => new ListScreen()));
}
}
```
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Bewertung
Dieses Issue wurde noch nicht bewertet.