You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[!] Flutter (Channel [user-branch], 3.19.0, on Microsoft Windows [Version 10.0.22631.4037], locale pl-PL)
! Flutter version 3.19.0 on channel [user-branch] at C:\Users\KarolW\Documents\flutter
Currently on an unknown channel. Run `flutter channel` to switch to an official channel.
If that doesn't fix the issue, reinstall Flutter by following instructions at https://flutter.dev/docs/get-started/install. ! Upstream repository unknown source is not a standard remote. Set environment variable "FLUTTER_GIT_URL" to unknown source to dismiss this error. • Framework revision bae5e49bc2 (7 months ago), 2024-02-13 17:46:18 -0800 • Engine revision 04817c99c9 • Dart version 3.3.0 • DevTools version 2.31.1 • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.[√] Windows Version (Installed version of Windows is version 10 or higher)[√] Android toolchain - develop for Android devices (Android SDK version 32.0.0) • Android SDK at C:\Users\KarolW\AppData\Local\Android\sdk • Platform android-34, build-tools 32.0.0 • Java binary at: C:\Program Files\Common Files\Oracle\Java\javapath\java.exe • Java version Java(TM) SE Runtime Environment (build 17.0.1+12-LTS-39) • All Android licenses accepted.[√] Chrome - develop for the web • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe[X] Visual Studio - develop Windows apps X Visual Studio not installed; this is necessary to develop Windows apps. Download at https://visualstudio.microsoft.com/downloads/. Please install the "Desktop development with C++" workload, including all of its default components[!] Android Studio (version 2022.1) • Android Studio at C:\Program Files\Android\Android Studio • Flutter plugin can be installed from: https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: https://plugins.jetbrains.com/plugin/6351-dart X Unable to find bundled Java version. • Try updating or re-installing Android Studio.[√] Connected device (4 available) • Android SDK built for x86 (mobile) • emulator-5554 • android-x86 • Android 10 (API 29) (emulator) • Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.22631.4037] • Chrome (web) • chrome • web-javascript • Google Chrome 128.0.6613.138 • Edge (web) • edge • web-javascript • Microsoft Edge 128.0.2739.42[√] Network resources • All expected network resources are available.
What platforms are you seeing the problem on?
Android
What happened?
When handleAndroidBackButtonPress is set to true android back button should back to first tab everytime is on other tab and all screens on this tab are popped as said here:
2. If you are on another tab with all screens popped of that given tab, you will be switched to first tab.
and actually when you switch between tabs back button is going back to previous tab, not to first tab
and also when I am on 1st tab, change to 2nd tab and change again to 1st tab using BottomNavBar then back button will go back to 2nd tab instead of closing app
If the you are on the first tab with all screens popped of the given tab, the app will close
Steps to reproduce
4 tabs example
You are in first tab, go to 2nd tab
Go to 3rd tab
Go to 4th tab
Press back
Expectation: App is going back to first tab
Reality: App is going back to 3rd tab
Press back again - app is going back to 2nd tab
2 tabs example, other case
You are in 1st tab, change to 2nd tab
Change to 1st tab, tapping on BottomNavBar item
Press back button - it will go to 2nd tab instead of closing app
TL;DR: If you want that behavior back: set PersistentTabController.historyLength = 1.
Hi, sorry I forgot to adjust the documentation for that. In this PR (#138) the tabs history behavior was changed to be more adjustable. By default, the last five tabs the user visited will be remembered so that the user can go back through them using the Android back button. By setting the PersistentTabController.historyLength to 1, the history will always solely contain the initial tab and thus switch to it and exit or directly exit.
Version
5.2.3
Flutter Doctor Output
What platforms are you seeing the problem on?
Android
What happened?
When
handleAndroidBackButtonPress
is set to true android back button should back to first tab everytime is on other tab and all screens on this tab are popped as said here:and actually when you switch between tabs back button is going back to previous tab, not to first tab
and also when I am on 1st tab, change to 2nd tab and change again to 1st tab using
BottomNavBar
then back button will go back to 2nd tab instead of closing appSteps to reproduce
4 tabs example
You are in first tab, go to 2nd tab
Go to 3rd tab
Go to 4th tab
Press back
Expectation: App is going back to first tab
Reality: App is going back to 3rd tab
Press back again - app is going back to 2nd tab
2 tabs example, other case
Code to reproduce the problem
Relevant log output
No response
Screenshots
No response
The text was updated successfully, but these errors were encountered: