fluttercommunity / fluttercommunity/flutter_webview_plugin

Second screen below WebviewScaffold

Ouverte
#224 21 commentaires 1 réaction 0 personnes assignées Voir sur GitHub
bug high
Langage dominant
Java
Étoiles
1.5k
Forks
938
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

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()));
}
}
```

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Piste de recherche

Commencez par reproduire l’exemple avec WebviewScaffold, son appBar, sa bottomNavigationBar et l’appel à Navigator.push dans openList. Examinez comment le scaffold et la route ouverte sont composés ; c’est terminé lorsque la deuxième page s’affiche sans que la WebView d’origine reste en dessous.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
dart, flutter
Domaine
mobile
Type d'issue
Bug
Difficulté
3/5
Temps estimé
1-2 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
30/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.