simple_routes 1.0.0-beta.5 simple_routes: ^1.0.0-beta.5 copied to clipboard
Simple, type-safe route and navigation management for go_router.
1.0.0-beta.5 #
- Add
isActive
method
1.0.0-beta.2 - 4 #
Minor fixes to documentation.
1.0.0-beta.1 #
We have finally reached a stable release! 🎉
Granted, this is just a beta release for the moment, we are confident that it is stable enough to be classified as version 1.
This release includes a significant rework of the API to improve the developer experience and standardize our package conventions.
Please see the Migration Guide for information on how to migrate your code to this version from the pre-release versions.
New Features #
- Path parameters are now injected automatically, based on the
parameters
property - Query parameters are now appended automatically, based on the
query
property - Extra data is now injected automatically, based on the
extra
property - Automatic leading-slash management - no more worrying about whether or not to add a leading slash to your route's
path
- Get the full path of a
DataRoute
, with all template parameters populated, using the newgenerate
method
Breaking Changes #
This release includes a few breaking changes.
- The
query
parameter of thego
method has been removed - The
push
argument of thego
method has been removed - A new
goPath
property has been added to theSimpleRoute
class and should be used when defining yourGoRoute
s - The
inject
method has been removed from theDataRoute
class - The helper methods have all been removed in favor of extensions and class methods
0.0.11 #
- Update GoRouter to ^12.0.0
0.0.10 #
- Attempt to fix release workflow (again)
0.0.9 #
- Add support for pushing routes
0.0.8 #
- Version bump for release workflow fixes
0.0.7 #
- Add
isCurrentRoute
method - Add
isAncestor
method - Update description in pubspec.yaml
- Update README
0.0.6 #
- Add automated release workflow
- Update go_router to ^11.1.1
0.0.5 #
- Fix several small issues in README
0.0.4 #
Breaking Change
- Change
go
method to use named parameters fordata
andquery
Instead of writing:
const MyRoute().go(
context,
const MyRouteData('some-value'),
{'key': 'value'},
);
You will now need to write it as:
const MyRoute().go(
context,
data: const MyRouteData('some-value'),
query: {'key': 'value'},
);
0.0.3 #
- Add support for injecting query parameters into route paths
- Add helper method for extracting query param map from GoRouterState
- Fix bug in route data factory
- Add and improve tests
0.0.2 #
- Improve README
- Remove static route getter from example for consistency
0.0.1 #
Initial Release
- SimpleRoute and DataRoute base classes for routes
path
and generatedfullPath
properties for route configurationgo
method for navigation via go_router
- SimpleRouteData base class for route data
inject
method for injecting route data into the route path
- ChildRoute interface for structuring route hierarchy
- SimpleRouteDataFactory base class
fromState
method for extracting route data from aGoRouterState
containsData
method for validatingGoRouterState
has all necessary data componentscontainsKey
helper for checking the existence of a parameter key in aGoRouterState
- Utility functions:
join
withPrefix
setParam
extension