forked from BilalShahid13/PersistentBottomNavBar
-
Notifications
You must be signed in to change notification settings - Fork 74
[Bug]: Android physical back button exits the app #149
Copy link
Copy link
Open
Description
Version
5.2.3
Flutter Doctor Output
--What platforms are you seeing the problem on?
Android, iOS
What happened?
I have 2 problems.
1- If I click on the current tab, it returns to the previous tab. This problem came after an update.
2- If I go to the next page with the navbar (Navigator.push), Android's return button takes me directly out of the application. I'm using GoRouter (if I go with gorouter without navbar there is no problem, but this time there is no navbar).
Steps to reproduce
1- If I click on the current tab, it returns to the previous tab. This problem came after an update.
2- If I go to the next page with the navbar (Navigator.push), Android's return button takes me directly out of the application. I'm using GoRouter (if I go with gorouter without navbar there is no problem, but this time there is no navbar).
Code to reproduce the problem
PersistentTabView(
controller: persistentTabController,
hideNavigationBar: viewModel.splashView,
navBarBuilder: (p0) =>
buildBottomAppBar(t, context, themeData, viewModel),
tabs: viewModel.viewList,
onTabChanged: (value) {
viewModel.currentIndex = value;
viewModel.currentIndexNotify.value = value;
},
//screenTransitionAnimation: const ScreenTransitionAnimation.none(),
handleAndroidBackButtonPress: true,
resizeToAvoidBottomInset: false,
)
making handleAndroidBackButtonPress false will not solve the problem. This time my function to click on the same tab is not working.Relevant log output
No response
Screenshots
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels