playx_navigation 0.3.0
playx_navigation: ^0.3.0 copied to clipboard
Playx Navigation is a Flutter package that enhances app navigation with advanced features like route lifecycle management, custom transitions, and flexible configuration.
Changelog #
0.3.0 #
- Update GoRouter to v17.0.0
0.2.0 #
- Update GoRouter to v16.0.0
- Update minimum Dart SDK version to 3.6.0 and Flutter SDK version to 3.27.0
- Refactored
PlayxRouteandPlayxNavigationBuilderto better handle route state and binding events. GoRouterStatenow passed correctly toonReEnter.
0.1.2 #
- Update GoRouter to v14.8.1
- Add
setupWebmethod forPlayxNavigationwhich allows for using path-based URLs and enables URL-based imperative APIs
0.1.0 0.1.1 #
New Features #
-
PlayxShellBranch:- Introduced the
PlayxShellBranchclass, an extension ofStatefulShellBranchfor creating branches with a single or multiple routes using[PlayxRoute].
- Introduced the
-
PlayxNavigation:- Added new
rootNavigatorKeyandnavigationContextgetters for enhanced navigation control. - Introduced a new
maybePopmethod in thePlayxNavigationclass for conditional navigation stack popping. - Added a new
goRoutergetter that returns theGoRouterinstance used for navigation. - Introduced a new
currentStategetter that retrieves the currentGoRouterStateobject representing the state of the navigation stack. - Updated
currentRouteto now returnGoRouteinstead ofRouteMatchas it is based on the current state. - Updated
currentRouteNameto now return the route name based on the current state.
- Added new
Dependency Updates #
- Upgraded the
go_routerpackage to version14.6.3.
Enhancements to PlayxBinding #
- Refactored Behavior:
-
onEnterandonExit:- Now triggered only when a route is entered or exited for the first time correctly.
-
onReEnter:- A new method that fires when a route is re-entered after being previously visited but not removed from the stack.
- Example scenarios:
- Switching between branches in a
StatefulShellBranchwhile the route remains in memory (wasPoppedAndReenteredisfalse). - Navigating back to a route after temporarily leaving it using
PlayxNavigation.toNamed, whereonHiddenis called beforeonReEnter(wasPoppedAndReenteredistrue).
- Switching between branches in a
-
onHidden:- A new method called when a route is hidden but not removed from the stack.
- Key use cases:
- Pausing tasks or releasing temporary resources when a route is no longer visible but remains in memory.
- Switching to another branch in a
StatefulShellBranchor navigating away while leaving the route active in the background.
- Sequence of calls:
- If the route is removed,
onExitis called afteronHidden. - If revisited,
onReEnteris called afteronHidden.
- If the route is removed,
-
0.0.1 #
- Initial release