Changelog
All notable changes to GoRouter Modular.
5.0.0
Breaking Changes
-
Transition system: Replaced custom
PageTransitionenum with go_transitions (opens in a new tab) package.PageTransitionenum removed. UseGoTransitioninstead.pageTransitionparameter inModular.configure()removed.
// Before (4.x) ChildRoute('/', child: (_, __) => HomePage(), transition: PageTransition.fade) // After (5.x) ChildRoute('/', child: (_, __) => HomePage(), transition: GoTransitions.fade)
Added
- StatefulShellModularRoute: Persistent state across tab branches — each branch keeps its own navigator. By default uses
StatefulShellRoute.indexedStackwhen no effective transition applies (no globaldefaultTransition, no shelltransition, and notransitionDuration/reverseTransitionDuration). When a transition is available (transition,Modular.configuredefaults, durations, ornavigatorContainerBuilder/ presets likeStatefulShellBranchTransitions), the shell uses an animated branch container aligned with go_transitions while preserving the same persistence guarantees. - ModularBranch: Define branches with direct routes or full modules (with DI).
- Lazy branch registration: Branch module binds are registered on first visit and disposed when the shell exits.
- Enhanced DI: New
binds(Injector i)function with key support for multiple instances of the same type. - go_transitions integration: Rich set of built-in transitions (fade, slide, scale, rotate, cupertino, material) with inheritance and composition.
Fixed
- Fixed dependency injection issues with transitions.
- Improved module lifecycle management.
- Better error handling and debugging.
4.2.0
Added
- Initial transition system.
- Module architecture with auto-dispose.
- Dependency injection with singleton, factory, and lazy singleton.
Fixed
- Various bug fixes and improvements.