fluttercommunity / fluttercommunity/flutter_webview_plugin
Second screen below WebviewScaffold
- Lingua principale
- Java
- Stelle
- 1.5k
- Fork
- 938
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
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()));
}
}
```
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Start by reproducing the sample using WebviewScaffold with its appBar, bottomNavigationBar, and Navigator.push call in openList. Inspect how the scaffold and pushed route are composed; done means the second page displays without the original WebView remaining underneath.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- dart, flutter
- Ambito
- mobile
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 30/100