Closed BarryCarlyon closed 3 months ago
I added:
PersistentTabController _controller = PersistentTabController(initialIndex: 0);
_controller.addListener(() {
debugPrint('we be navin');
});
snip
child: PersistentTabView(
controller: _controller,
And I don't get a "we be naving" when we go to the blank screen
Hi, thank you for providing all the information. I'm pretty sure I finally found the issue. When migrating the internal WillPopScope
to PopScope
, the final navigator pop (which causes the black page) does not minimize the app like it used to when returning true from WillPopScope
.
I just released version 5.2.0 which should contain the fix. Now, a PopScope with canPop: false that wraps the PersistentTabView
should also work.
Feel free to check it out, I will keep this open for now in case there are still issues with that.
Without popscope: we navigated out of the app and no blank screen With popscope: navigation was blocked out of the app and no blank screen
Looks fixed to me!
Package Version (from pubspec.yaml):
persistent_bottom_nav_bar: ^5.0.0
Bug Description
If you navigate backwards from the home page of an app using the android back button you get black screen Press it again goes to another app/home page as expected.
The black screen shouldn't exist
Additionally,
PopScope
would be used to block the back button functioning and it doesn't when you wrap persistennav in a PopScopeTo Reproduce
Steps to reproduce the behavior:
This can result in an error message/console error messages as it's a totally unexpected state
as per my rubber ducking in https://github.com/jb3rndt/PersistentBottomNavBarV2/issues/137#issuecomment-2032944561
Expected behavior
Code to reproduce
This will block back working from the home page
This does not:
HomePageBuild
in this case is my first tab in buildTabs.With or without popscope the blank page occurs
Screenshots
After hitting the back soft key on the android "remote control" so a physical pixel 6 device here
If I hot reload/hit sync files I can force this error, if I'm on the blank page.