route_definer 3.0.0
route_definer: ^3.0.0 copied to clipboard
Typed Flutter Router navigation with URI patterns, explicit guards, browser history, restoration, and custom route factories.
3.0.0 #
-
Retry redirect-loop and redirect-limit failures with a fresh guard attempt. Refresh argument-dependent titles when restoration reuses a page, invalidating pending stale titles. Add guard retry and restored browser-title regressions.
-
Add declarative
router.remove(id)for portable page removal on older Flutter SDKs. Keep native-removal integration tests on SDKs that permit that Flutter API. Diagnose Chrome startup failures, wait for complete port-file contents, and test startup timeouts/early exits. -
Fix Flutter 3.27/3.32 annotation imports by declaring
metadirectly. Observe native page removals even when Flutter omitsonDidRemovePage, preserving the stack and pending results on Flutter 3.47. Wait for Chrome shutdown and retry temporary-profile cleanup in browser checks. Require the full pana pub-point score in release validation. -
Add resolved
currentRoute/stackinspection snapshots, asynchronous navigation events, optional bounded history and configurable diagnostics with sensitive fields redacted by default. Existing APIs remain available. Report successful managed pops immediately and distinguish them from removal. -
Add instance-owned
RouteDefinerRouter,RouterConfig, typed pages/results, browser history, full URI state, stack serialization and Flutter restoration support. -
Remove the static
AppRouter, named-route adapter,GlobalRouteDefinerand loader wrapper. Configure oneRouteDefinerRouterdirectly. -
Unify authorization and redirects under function-based
guards; removeisAuthorized,beforeEnterand class-based guard checks. Use one state-awaretitlecallback and an optionalappTitlefallback. -
Require explicit loading, denied, not-found and error builders. Supply opt-in pages through the separate
default_pages.dartlibrary. Organize source into routing, guards, titles and default_pages folders. -
Add canonical initial stacks and a shared generic
DefinedRouteFactoryfor global and per-route native page customization. -
Fail closed on authorization denial and guard errors. Add explicit allow/deny/redirect decisions and exception handling, terminal redirects with loop limits, retry, timeout, cooperative cancellation and access refresh.
-
Memoize asynchronous checks across rebuilds and ignore results from removed or covered routes.
-
Validate and compile route patterns once. Preserve literal punctuation, Unicode, encoded path segments, repeated query parameters and fragments. Reject ambiguous definitions and prevent near-match shadowing.
-
Make route state and definition collections immutable. Add parameter/location helpers.
-
Fix stale browser titles, replacement/removal observation and JavaScript/WebAssembly conditional imports.
-
Use current Navigator page-removal APIs and typed pop callbacks, respecting
PopScopethroughmaybePop. -
Correct SDK constraints to Flutter >=3.27 / Dart >=3.6 and package:web >=0.4. Add a runnable example, behavioral/browser regressions, SDK/dependency CI, release gates and migration/platform/support documentation.
This is a breaking release. Read MIGRATION.md and doc/compatibility.md; SDK matrix and physical-platform release checks must be green before publication.
Changelog #
1.0.0 Initial release #
- Added
AppRoutersetup. - Route matching and URI param parsing.
- Basic authorization and redirect support.
- Custom guards support via
RouteGuard. - Test coverage for core routing logic.
1.0.1 fix documentation and pub score #
- Improved documentation comments for public APIs and classes.
- Updated
README.mdwith clearer usage examples and removed informal tone. - Added missing
description,homepage, andrepositoryfields topubspec.yaml. - Ran
dart format .to ensure consistent code formatting. - Resolved all issues and warnings reported by
flutter analyze. - Ensured
dart pub publish --dry-runpasses without errors or warnings.
1.0.2 Add example #
- Add example
1.1.0 - 2025-06-18 #
Added #
RouteOptions.merge()method to allow merging specific route options with global defaults.- Documentation for
RouteOptionsfields and themerge()method for clarity and usability.
Changed #
- Updated GitHub Actions to auto-publish to pub.dev when pushing a version tag (e.g.,
v1.2.3). - Added basic permission checking in CI workflow to restrict who can push tags (manual check using
github.actor).
Fixed #
- Improved test coverage and organization of
AppRouterand guard logic.
1.2.0 - 2025-06-18 #
- Lowered SDK version requirement for better compatibility
- Updated overall project documentation
- Added comprehensive API documentation for the library
1.2.2 - 2025-06-18 #
- Resolved runtime error when redirecting during route build phase by deferring navigation with
Future.microtask
2.0.0 - 2025-08-28 #
- Stabilized public APIs and bumped package version to 2.0.0.
- Added tests for route guards, title updates, and loader widget to reach full coverage.
- Verified package readiness for publishing with a perfect pub score.
2.0.1 - 2025-08-30 #
- Downgraded
webdependency and allowed any version for maximum adaptability.
2.0.2 - 2025-08-31 #
- Exported all core classes in
route_definer.dartfor easier package consumption. - Replaced
dynamicwithObject?forRouteState.argumentsto improve type safety. - Refined and documented test suite for clearer coverage.
2.0.3 - 2025-09-11 #
- Change the route loader for an stateless widget