Skip to content

v1.0.8 - Fix Back Button on Home Page (Initial Launch)

Choose a tag to compare

@pillowsoft pillowsoft released this 04 Oct 11:09
· 38 commits to main since this release

Fixed

  • Back Button on Initial Launch: Fixed back button incorrectly appearing on home page during fresh app launch. The framework's automaticallyImplyLeading now correctly set to false on home page, preventing the AppBar/NavigationBar from auto-generating a back button even when GoRouter's internal state makes canPop() return true.

Technical Details

  • Changed default mode automaticallyImplyLeading from true to !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() returns true on 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