Repository navigation
v1.0.9 - Configurable Home Route
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.,
/homeinstead of/). AddedhomeRouteparameter toAppConfigto allow apps to define their home page path.
Added
homeRouteparameter 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
homeRoutefield toAppConfigclass (app_config.dart) - Added
homeRouteparameter toAppShellwidget (app_shell.dart) - Updated
isHomePagelogic to use configurable home path:final configuredHomePath = homeRoute ?? '/' - Maintains backward compatibility - apps without
homeRoutestill 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