fluttercommunity / fluttercommunity/flutter_webview_plugin

Second screen below WebviewScaffold

Abierto
#224 21 comentarios 1 reacción 0 asignados Ver en GitHub
bug high
Lenguaje dominante
Java
Estrellas
1.5k
Forks
938
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

Comienza reproduciendo el ejemplo con WebviewScaffold, su appBar, bottomNavigationBar y la llamada a Navigator.push en openList. Inspecciona cómo se componen el scaffold y la ruta a la que se navega; se considera terminado cuando la segunda página se muestra sin que la WebView original permanezca debajo.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
dart, flutter
Área
mobile
Tipo de issue
Error
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
30/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.