Skip to content
pubscout

zenrouter

3.0.0, released 7 weeks ago by zennn.dev

Type-safe Flutter routing with deep linking, web support, and visual route graphs.

WASM-ready
$ flutter pub add zenrouter
Source repository

What it does

Defines application screens as types and composes routes as a graph for navigation. Supports imperative stacks, declarative diffing, and a full coordinator model with URI parsing and deep linking.

AI-written summary of version 3.0.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need type-safe navigation and robust deep linking in Flutter apps
  • You want to organize routes as a graph or manifest with browser URL synchronization

Skip it when

  • You prefer a very lightweight navigation package without graph-based definitions
  • You are maintaining a legacy app using standard Navigator 1.0 imperative push/pop without deep links

Strengths

  • Type-safe navigation parameters and deep-link generation
  • Visual route graph and DevTools support via zenrouter_devtools
  • Supports multiple navigation paradigms (imperative, declarative, and coordinator)

Weaknesses

  • Requires understanding a custom routing ecosystem compared to basic Navigator
  • Migration from older versions requires updating capability mixins and manifest bindings

Setup

Kind
Flutter widgets
Effort
Medium
Code generation
No
Direct dependencies
2

Add dependencies to pubspec.yaml and optionally use zenrouter_devtools or zenrouter_file_generator for codegen.

final path = NavigationPath<AppRoute>.create();

NavigationStack(
  path: path,
  resolver: (route) => StackTransition.material(route.build(context)),
);

path.push(ProfileRoute());

Alternatives

Packages that do the same job and could replace zenrouter.

  • go_router

    Official declarative routing package with path-based navigation syntax.

  • auto_route

    Route generation library using annotations for strongly-typed navigation.