fluttercommunity / fluttercommunity/flutter_webview_plugin
Second screen below WebviewScaffold
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.5k
- Forks
- 936
- PR merge metrics
- No merged PRs in 30d
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. :/
MaterialApp(
title: 'Flutter Demo',
debugShowCheckedModeBanner: false,
theme: ThemeData(
primarySwatch: Colors.blue,
),
routes: {
"/": (_) => WebView(),
},
);
...
class _WebViewState extends State<WebView> {
@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: <Widget>[
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()));
}
}
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
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.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart, flutter
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100