PackageTrack
Sign in Get early access

zenrouter

A powerful Flutter router with deep linking, web support, type-safe routing, guards, redirects, and zero boilerplate.

2.3.0 11K downloads/mo #2800 most downloaded on pub.dev definev/zenrouter

What this package is like to depend on

Last release 4 days ago

20 Aug 2026

Release timing varies

gaps range from 8 days to 3 months

Some releases are documented

notes for 14 of 42 stable releases

Nothing withdrawn

no release was ever pulled

8 months old

43 releases · first in 2025

43 releases in the last 12 months

see the full history below

Release timeline

43 releases · Dec 2025 to Aug 2026
2026
Release Pre-release

Releases

latest 43
  1. 3.0.0-beta.1 20 Aug 2026 pre-release

    Nothing published for this version

  2. 2.3.0 17 Aug 2026
    Release notes

    ⚠️ Breaking Changes

    • GuardRule contract renamed (via zenrouter_core 2.3.0). The 2.2.0 methods are removed:

      Removed Replacement
      canPop(route) canPopRule(route) / canPopRuleWith(coordinator, route)
      canPopListenable(route) canPopListenableRule(route) / canPopListenableRuleWith(coordinator, route)
      guard(coordinator, route) guardRule(route) / guardRuleWith(coordinator, route)

      Use route-only methods when no coordinator is needed; override *With for dialogs / app state. Each *With defaults to its non-With counterpart.

      // Before
      class UnsavedChangesRule extends GuardRule<AppRoute> {
        @override
        bool canPop(AppRoute route) => !route.hasUnsavedChanges;
      
        @override
        FutureOr<bool?> guard(Coordinator c, AppRoute route) async =>
            showDiscardDialog(c.navigator.context);
      }
      
      // After
      class UnsavedChangesRule extends GuardRule<AppRoute> {
        @override
        bool canPopRule(AppRoute route) => !route.hasUnsavedChanges;
      
        @override
        FutureOr<bool?> guardRuleWith(Coordinator c, AppRoute route) async =>
            showDiscardDialog(c.navigator.context);
      }
      

    🚀 New Features

    • RouteGuard.canPopWith / canPopListenableWith: Coordinator-aware PopScope hints; NavigationStack prefers these when a coordinator is present.
    • RouteGuardRule.popGuard: Runs the guardRule chain without a coordinator.

    📖 Documentation

    • Recipe / example / mixins API updated for the dual guardRule / guardRuleWith API.
    Open source →
  3. 2.2.0 21 Jul 2026
    Release notes

    🚀 New Features

    RouteGuardRule — composable pop guards

    • New GuardRule / RouteGuardRule API (via zenrouter_core 2.1.0) for reusable leave-confirmation chains — first non-null bool wins (null = continue).
    • RouteGuard.canPop / canPopListenable drive Flutter PopScope; programmatic pop still always consults popGuard / popGuardWith.
    • Flutter bridges: toListenableMixin() / toFlutterListenable(); NavigationStack rebuilds PopScope via ListenableBuilder when a listenable is present.

    ⚠️ Breaking Changes

    • CoordinatorCore.pop: Pops only the nearest eligible path (no longer multi-path in one call). Bumped zenrouter_core to 2.1.0.
    • RouteRedirect.resolve: Throws StateError on redirect type mismatch.

    📖 Documentation

    Open source →
  4. 2.1.1 04 Jun 2026
    Release notes
    • Bump zenrouter_core version to 2.0.3
    Open source →
  5. 2.1.0 23 May 2026
    Release notes

    🚀 New Features

    CoordinatorView — headless coordinator embed

    • New CoordinatorView widget renders a coordinator via layoutBuilder without Flutter's Router—for super apps, parallel panels, plugin surfaces, and other host-owned shells.
    • Optional initialUri seeds navigation once when coordinator.root.stack is empty (ignored after the embed has stack state or on remount with the same coordinator).
    • Supports sync and async parseRouteFromUri for the initial bootstrap.

    CoordinatorLayoutBuilder mixin

    ⚠️ Breaking Changes

    • layoutBuilder moved to CoordinatorLayout: Override layoutBuilder on your coordinator's CoordinatorLayout mixin (unchanged for typical extends Coordinator subclasses). It is no longer declared on the Coordinator class body.
    • RouteLayoutBuilder signature: The first parameter is now CoordinatorCore instead of Coordinator. Update custom defineLayoutBuilder / kDefaultLayoutBuilderTable callbacks accordingly (cast to Coordinator when you need Flutter-specific APIs).
    • RouteLayout.buildRoot: Now accepts CoordinatorLayout instead of Coordinator. Call sites that passed a bare CoordinatorCore must use a type that provides getLayoutBuilder / root.

    📖 Documentation

    Open source →
  6. 2.0.3 05 Mar 2026
    Release notes
    • Fix: CoordinatorModular.getModule now correctly resolves the coordinator itself — runtimeType: this is registered in _allModules, enabling getModule<MyCoordinator>() to work at any level of the hierarchy. (Bumped zenrouter_core to 2.0.2)
    Open source →
  7. 2.0.2 02 Mar 2026
    Release notes
    • Fix: Fix CoordinatorModular edgecase cascading dispose and prevent duplicate definitions. (Bumped zenrouter_core to 2.0.1)
    Open source →
  8. 2.0.1 27 Feb 2026
    Release notes
    • Fix: Revert hasEmptyPath back to pathSegments.isEmpty in resolveInitialUri for correct path empty checks.
    • Refactor: Remove redundant initialRouteInformation parameter from CoordinatorRouteInformationProvider since fallback defaults and resolution logic is robust now.
    Open source →
  9. 2.0.0 22 Feb 2026
    Release notes

    🎉 Major Release - Core Architecture & Layouts

    🚀 New Features

    • zenrouter_core Package: Extracted all platform-independent core routing types (RouteTarget, CoordinatorCore, StackPath, and route mixins) into a new dedicated package.
    • Composable Redirects: You can use RouteRedirectRule as RouteRedirect to allow composable, testable redirect logic via multiple rules (e.g., StopRedirect, ContinueRedirect, RedirectTo).
    • Route Identity updates: Introduced RouteUri abstract class (and RouteUnique) to centralize URI-based identity for coordinator-managed routes.

    ⚠️ Breaking Changes

    • Layout Binding Refactoring: The global RouteLayout.defineLayout has been removed. You must now bind layouts to paths using the StackPath.bindLayout() cascade syntax (e.g., NavigationPath.createWith(...)..bindLayout(HomeLayout.new)), or use defineLayoutParent() / defineLayoutBuilder() inside the coordinator.
    • Core Mixins Relocated: Core routing types have been consolidated under zenrouter_core. The main package still exports them, but any explicit deep imports to old paths must be updated.
    • RouteLayout.definePath Deprecated: Deprecated RouteLayout.definePath in favor of coordinator.defineLayoutBuilder.

    📖 Documentation

    • Architecture Overview: Completely redesigned READMEs to highlight the layered architecture and paradigm decisions.
    • API Reference: Rewrote coordinator, mixins, and navigation paths API references from source.
    Open source →
  10. 1.2.0 11 Feb 2026
    Release notes

    🐞 Fixes

    • Fix: Regression error when using RouteRedirectRule inside IndexedStackPath (Thanks to @obenkucuk)

    🚀 New Features

    Coordinator as RouteModule — Nested Coordinators

    • Coordinator now implements RouteModule<T>, enabling any coordinator to be nested inside a CoordinatorModular by overriding the coordinator getter.
    • Unlocks route versioning (V1/V2 side by side), multi-team modular architectures, and deeply nested coordinator hierarchies.
    • Auto-detected isRouteModule flag controls root path creation vs parent inheritance.
    • See Guide & example/lib/main_coordinator_module.dart

    ⚠️ Breaking Changes

    • Coordinator.parseRouteFromUri signature changed from FutureOr<T> to FutureOr<T?>. Child coordinators return null for unrecognized URIs; standalone coordinators are guarded by assertions.
    • CoordinatorModular.parseRouteFromUri returns null instead of notFoundRoute when the coordinator is itself a nested module.

    📖 Documentation

    Open source →
  11. 1.1.0 05 Feb 2026
    Release notes
    • BREAKING CHANGE: Remove coordinator from defineModules, use this getter instead.
    • Feat: Enforce getModule method return exact type.
    Open source →
  12. 1.0.0 28 Jan 2026
    Release notes

    🎉 Major Release - Production Ready

    🚀 New Features

    CoordinatorModular - Modular Route Management

    • Split route management across independent modules by domain/feature
    • CoordinatorModular mixin + RouteModule base class
    • Perfect for large apps with team collaboration
    • See Guide & example/lib/main_modular.dart
    class AppCoordinator extends Coordinator<AppRoute>
        with CoordinatorModular<AppRoute> {
      @override
      Set<RouteModule<AppRoute>> defineModules() => {
        AuthModule(this),
        ShopModule(this),
      };
    }
    

    RouteRedirectRule - Composable Redirect Logic

    • Reusable, chainable redirect rules (auth → feature flags → logging)
    • RedirectResult sealed class with Stop/Continue/RedirectTo variants
    • Async support for API calls, database queries
    class ProtectedRoute extends AppRoute
        with RouteRedirect, RouteRedirectRule {
      @override
      List<RedirectRule> get redirectRules => [
        AuthenticationRule(),
        PermissionRule(permission: 'admin'),
      ];
    }
    

    ⚠️ Breaking Changes

    Removed deprecated APIs:

    • RouteLayout.buildPrimitivePath → Use RouteLayout.buildPath
    • RouteLayout.layoutBuilderTable → Use RouteLayout.buildPath
    • RouteLayout.navigationPath/indexedStackPath → Use NavigationPath.key/IndexedStackPath.key
    • routerDelegateWithInitialRoute → Use RouteRedirect in IndexRoute

    See Migration Guide for details.

    📦 What's Included

    • ✅ Stable API surface
    • ✅ Full test coverage (48 new tests: 33 modular + 15 redirect rule)
    • ✅ Comprehensive documentation with guides

    Open source →
  13. 0.4.20 24 Jan 2026
    Release notes
    • Fix: back gesture failed in android
    Open source →
  14. 0.4.19 10 Jan 2026
    Release notes
    • Fix: Blank screen when using Coordinator as routerConfig (due to unset routerInformationProvider).
    • Feat: Added initialRoutePath property to Coordinator.
    • Feat: Added NavigatorObserverListGetter typedef for passing external observers. (View Guide)
    Open source →
  15. 0.4.18 09 Jan 2026
    Release notes
    • Feat: Add pushReplacement method in StackMutatable.
    • Feat: Coordinator now implements RouterConfig so you can use it with MaterialApp.router more easily.
      • MaterialApp.router(
          // New way
          routerConfig: coordinator,
          // Old way
          routerDelegate: coordinator.routerDelegate,
          routeInformationParser: coordinator.routeInformationParser,
        );
        
    • Deprecate: routerDelegateWithInitialRoute is deprecated, you can simulate the same behavior by using RouteRedirect in IndexRoute.

    0.4.17

    • ZenRouter officially achieved 100% test coverage 🚀
    • Docs: Added migration guides from other packages (go_router, auto_route, and Navigator 1.0/2.0)
    • Docs: Added recipes for common use cases
    • Docs: Added quick links section to make the docs easier to navigate

    0.4.16

    • Fix: Future already completed bug when pushing the same route with pushOrMoveToTop.

    0.4.15

    • Feat: Add onUpdate method to RouteTarget for handling in-place route updates when navigating to the same route with different state.
    • Feat: Add bindLayout method to StackPath as a convenient alternative for layout registration. (See RouteLayout Guide)

    0.4.14

    • Breaking Change: Don't allow redirect to return null anymore since it doesn't do anything.
    • Feat: Add mustCallSuper to paths getter (Thanks @mrgnhnt96)
    • Feat: Add discard parameter to remove method for controlling discarding behavior.
    • Fix: Memory leak when pushing RouteQueryParameters in IndexedStackPath.
    • Fix: Memory leak when discard route in RouteRedirect.

    0.4.13

    • Fix: Ensure navigate method is compatible with RouteRedirect.

    0.4.12

    • Feat: Introduce new StackNavigatable mixin for StackPath to handle custom logic when receiving a navigate command. (Back/Forward button on the browser)
    • Fix: navigate clear all history that occurred when pushing a custom layout.

    0.4.11

    • Feat: Expose stackPath in RouteTarget and expose protected method for developer create custom stackPath.
    • Feat: Add onDiscard to handle discarding phase in RouteTarget.

    0.4.10

    • Chore: Fix analyzer warnings

    0.4.9

    • Chore: Standardize serialize and deserialize for supported RouteTarget type

    0.4.8

    • Feat: Introduce new state restoration with RouteRestoration mixin. Support state restoration by default if restorationScopeId is provided in MaterialApp.router and using Coordinator pattern.
    • Fix: Resolve bug in recover method where RouteRedirect was ignored.

    0.4.7

    • Docs: Update README

    0.4.6

    • Docs: Update README and add screenshots

    0.4.5

    • Feat: Add RouteQueryParameters mixin for targeted query parameter updates using ValueNotifier.
    • Fix: Ensure path is set for RouteTarget when initial IndexedStackPath.
    • Fix: Ensure layout is resolve correct if they under deeper stack.
    • Refactor: Refactor folder structure and test folder structure to be more organized.

    0.4.4

    • Feat: New ZenRoute Logo!
    • Docs: Improve document and update outdate example

    0.4.3

    • Feat: Add CoordinatorNavigatorObserver mixin to provide a list of observers for the coordinator's navigator.
    • Breaking Change: Complete redesign [RouteLayout] builder to be more flexible and powerful.
      • Deprecate static method RouteLayout.buildPrimitivePath and use buildPath function instead.
      • Add ability to define new [StackPath] using RouteLayout.definePath. You can create custom behavior path builder. (Eg: RecoverableHistoryStack like unrouter)

    0.4.2

    • Feat: Add transitionStrategy to Coordinator for default stack transition setup
    • Fix: Ensure when [Navigator.pop] called sync new stack with [NavigationPath]

    0.4.1

    • Fix: Ensure [Coordinator.routeDelegate] initialize once
    • Improvement: Add [IndexedStackPathBuilder] for improve performance for rendering [IndexedStackPath]

    0.4.0

    • Breaking Change: Deprecated default constructors for NavigationPath and IndexedStackPath. Use NavigationPath.create/createWith and IndexedStackPath.create/createWith instead.
    • Breaking Change: Introduced internalProps to RouteTarget for better deep equality and hash code generation.
    • Feat: Added popGuardWith to RouteGuard and redirectWith to RouteRedirect for coordinator-aware mixin logic.
    • Feat: Added strict path-coordinator binding support via createWith factories.
    • Docs: Added comprehensive Migration Guide.
    • Feat: Added routerDelegateWithInitalRoute to Coordinator.
    • Feat: Enhanced setInitialRoutePath to correctly handle initial routes vs deep links.

    0.3.2

    • Add navigate function: A smarter alternative to push that handles browser history restoration by popping to existing routes instead of duplicating them.

    0.3.1

    • Allow parseRouteFromUri to return Future for implementing deferred import/async route parsing

    0.3.0

    • Breaking change: Change return of Coordinator.push() from Future<dynamic> to Future<T?>
    • Fix NavigationStack rerender page everytime path updated. Resolve #10.
    • Feat: Add recover function

    0.2.3

    • Update activePathIndex to activeIndex in IndexedStackPath
    • Update document for detailed, hand-written example of Coordinator pattern

    0.2.2

    • Expose pop result in Coordinator
    • Fix memory leak: Complete route result futures when routes are removed via pushOrMoveToTop
    • Fix memory leak: Complete intermediate route futures during RouteRedirect.resolve chain

    0.2.1

    • Standardize how to access primitive path layout builder
      • Define using definePrimitivePath
      • Build using buildPrimitivePath

    0.2.0

    • BREAKING: Rename activeHostPaths to activeLayoutPaths to reflect correct concept.

    0.1.2

    • Update homepage link

    0.1.1

    • Fix broken document link by update it to github link

    0.1.1

    • Fix broken document link

    0.1.0

    • Initial release of ZenRouter.
    • Unified Navigator 1.0 and 2.0 support.
    • Coordinator pattern for centralized navigation logic.
    • Support for both Declarative and Imperative navigation paradigms.
    • Route mixins: RouteGuard, RouteRedirect, RouteDeepLink.
    • Optimized Myers diff algorithm for efficient stack updates.
    • Type-safe routing with RouteUnique.
    Open source →
  16. 0.4.17 06 Jan 2026

    Nothing published for this version

  17. 0.4.16 02 Jan 2026

    Nothing published for this version

  18. 0.4.15 02 Jan 2026

    Nothing published for this version

  19. 0.4.14 02 Jan 2026

    Nothing published for this version

  20. 0.4.13 30 Dec 2025

    Nothing published for this version

  21. 0.4.12 30 Dec 2025

    Nothing published for this version

  22. 0.4.11 29 Dec 2025

    Nothing published for this version

  23. 0.4.10 28 Dec 2025

    Nothing published for this version

  24. 0.4.9 28 Dec 2025

    Nothing published for this version

  25. 0.4.8 26 Dec 2025

    Nothing published for this version

  26. 0.4.7 22 Dec 2025

    Nothing published for this version

  27. 0.4.6 22 Dec 2025

    Nothing published for this version

  28. 0.4.5 21 Dec 2025

    Nothing published for this version

  29. 0.4.4 20 Dec 2025

    Nothing published for this version

  30. 0.4.3 19 Dec 2025

    Nothing published for this version

  31. 0.4.2 16 Dec 2025

    Nothing published for this version

  32. 0.4.1 15 Dec 2025

    Nothing published for this version

  33. 0.4.0 15 Dec 2025

    Nothing published for this version

  34. 0.3.2 14 Dec 2025

    Nothing published for this version

  35. 0.3.1 13 Dec 2025

    Nothing published for this version

  36. 0.3.0 09 Dec 2025

    Nothing published for this version

  37. 0.2.3 07 Dec 2025

    Nothing published for this version

  38. 0.2.2 05 Dec 2025

    Nothing published for this version

  39. 0.2.1 04 Dec 2025

    Nothing published for this version

  40. 0.2.0 04 Dec 2025

    Nothing published for this version

  41. 0.1.2 04 Dec 2025

    Nothing published for this version

  42. 0.1.1 04 Dec 2025

    Nothing published for this version

  43. 0.1.0 04 Dec 2025

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive