Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bizz84/nested-navigation-demo-flutter
Nested navigation with BottomNavigationBar
https://github.com/bizz84/nested-navigation-demo-flutter
android dart flutter ios navigation routing
Last synced: 1 day ago
JSON representation
Nested navigation with BottomNavigationBar
- Host: GitHub
- URL: https://github.com/bizz84/nested-navigation-demo-flutter
- Owner: bizz84
- License: mit
- Created: 2018-07-01T18:23:30.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-11T17:32:58.000Z (almost 2 years ago)
- Last Synced: 2024-08-01T12:24:32.228Z (3 months ago)
- Topics: android, dart, flutter, ios, navigation, routing
- Language: Dart
- Homepage: https://codewithandrea.com/
- Size: 1.62 MB
- Stars: 611
- Watchers: 5
- Forks: 139
- Open Issues: 20
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Flutter BottomNavigationBar with Multiple Navigators
This is the source code for my article:
- [Flutter Bottom Navigation Bar with Multiple Navigators: A Case Study](https://codewithandrea.com/articles/2018-07-07-multiple-navigators-bottom-navigation-bar/)
## Preview
![](screenshots/multiple-navigators-BottomNavigationBar-animation.gif)
In this example each tab has its own navigation stack. This is so that we don’t lose the navigation history when switching tabs.
This is a very common use case for a lot of apps.
**How is it built?**
- Create an app with a `Scaffold` and a `BottomNavigationBar`.
- In the `Scaffold` body, create a `Stack` with one child for each tab.
- Each child is an `Offstage` widget with a child `Navigator`.
- Don't forget to handle Android back navigation with `WillPopScope`.Read the full story on my article:
- [Flutter Bottom Navigation Bar with Multiple Navigators: A Case Study](https://codewithandrea.com/articles/2018-07-07-multiple-navigators-bottom-navigation-bar/)
### Credits
- [Brian Egan](https://github.com/brianegan): for suggesting to use `Stack` + `Offstage` & `Navigator` widgets.
### [License: MIT](LICENSE.md)