Skip to content

Commit

Permalink
Fix popping all screens depending on previous index
Browse files Browse the repository at this point in the history
  • Loading branch information
jb3rndt committed Jun 16, 2024
1 parent dda7ef7 commit 348735f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/components/persistent_tab_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -326,9 +326,10 @@ class _PersistentTabViewState extends State<PersistentTabView> {
index == widget.navigationShell!.currentIndex,
);
} else {
final oldIndex = _controller.index;
_controller.jumpToTab(index);
if ((widget.popAllScreensOnTapOfSelectedTab &&
_controller.index == index) ||
oldIndex == index) ||
widget.popAllScreensOnTapAnyTabs) {
popAllScreens();
}
Expand Down

0 comments on commit 348735f

Please sign in to comment.