Repository navigation
v1.0.8 - Fix Back Button on Home Page (Initial Launch)
Fixed
- Back Button on Initial Launch: Fixed back button incorrectly appearing on home page during fresh app launch. The framework's
automaticallyImplyLeadingnow correctly set tofalseon home page, preventing the AppBar/NavigationBar from auto-generating a back button even when GoRouter's internal state makescanPop()returntrue.
Technical Details
- Changed default mode
automaticallyImplyLeadingfromtrueto!isHomePage(line 272 in app_shell.dart) - Prevents framework from using its own back button logic when on home page
- Home page detection unchanged:
isHomePage = currentPath == '/' || currentPath.isEmpty - Fix specifically addresses ShellRoute initial navigation state issue where
canPop()returnstrueon first frame
What's Changed
This release fixes an issue where the back button would appear on the home page during fresh app launch, but would correctly disappear after navigating to another screen and returning home. The root cause was the framework's automatic back button logic being enabled even on the home page when GoRouter's internal state indicated navigation history.
Full Changelog: v1.0.7...v1.0.8