Skip to content

v1.0.9 - Configurable Home Route

Choose a tag to compare

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

Fixed

  • Configurable Home Route: Fixed v1.0.8's home page back button fix not working for apps that use non-root paths as home (e.g., /home instead of /). Added homeRoute parameter to AppConfig to allow apps to define their home page path.

Added

  • homeRoute parameter in AppConfig: Optional parameter to specify the home route path (defaults to / if not provided)
  • Home page detection now checks: currentPath == homeRoute || currentPath == '/' || currentPath.isEmpty

Technical Details

  • Added homeRoute field to AppConfig class (app_config.dart)
  • Added homeRoute parameter to AppShell widget (app_shell.dart)
  • Updated isHomePage logic to use configurable home path: final configuredHomePath = homeRoute ?? '/'
  • Maintains backward compatibility - apps without homeRoute still use / as default
  • Properly passed from AppConfig → AppShell in app_shell_runner.dart

Migration Guide

For apps using non-root home routes (e.g., after onboarding flows):

AppConfig(
  title: 'My App',
  routes: [...],
  homeRoute: '/home',  // Specify your actual home route
  initialRoute: '/onboarding',  // Optional: different initial route
)

What's Changed

This release fixes the limitation in v1.0.8 where the home page back button fix only worked for apps using / as the home route. Apps that use onboarding flows or other patterns where the home page is not the root path (like /home) can now configure the home route explicitly.

Full Changelog: v1.0.8...v1.0.9