-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Android] Remember route history #9
Comments
@mohamoha6200 this is fixed in |
Pages should be popped in the order they were pushed regardless of which tab user is on. Test
then
|
This feature is similar to instagram where on pressing the backbutton on Android either a page must be popped from a Tab or the tab must switch to its previous state. Based on the user's last action. Let's say we have a BottomNavigationBar with two tabs Tab1 and Tab2 each Tab is associated with a Navigator to handle nested routes within that tab. Consider the below structure
Use case:
To solve this my idea is to keep track of the two events tab changes and also observe the navigator stack. So I am trying to maintain a consolidated history of both these events List<RouteHistory> history = [];
class RouteHistory {
int index; // tab index
bool base; // whether its a root of the navigator
RouteHistory({this.index=0, this.base=true});
} |
copied from #8
For a better navigation/experience you might wanna consider adding some sort of visited tabs history in order to manage back button navigation for Android, apps like instagram,netflix ... handle the navigation history by keeping track of the order in which the user visits different tabs such a feature would be a perfect addition to your package, for inspiration take a look at the solution implemented in this one : ttps://pub.dev/packages/bottom_nav_layout#page-back-stack
The text was updated successfully, but these errors were encountered: