Skip to content

definev/zenrouter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ZenRouter 🧘

The Ultimate Flutter Router for Every Navigation Pattern

Test Codecov - zenrouter

ZenRouter is the only router you'll ever need - supporting three distinct paradigms to handle any routing scenario, from simple mobile apps to complex web applications with deep linking.

Three Paradigms. One Router.

🎮 Imperative - Direct control for mobile apps and event-driven navigation
📊 Declarative - State-driven routing for tab bars and dynamic UIs
🗺️ Coordinator - Deep linking and web support for complex applications

Why ZenRouter?

One Router, Three Paradigms - Choose the approach that fits your needs
🚀 Progressive - Start simple, add complexity only when needed
🌐 Full Web Support - Built-in deep linking and URL synchronization
Blazing Fast - Efficient Myers diff for optimal performance
🔒 Type-Safe - Catch routing errors at compile-time
🛡️ Powerful - Guards, redirects, and custom transitions built-in
📝 No Codegen Needed (for core) - Pure Dart, no build_runner or generated files required. (Optional file-based routing via zenrouter_file_generator is available when you want codegen.)


📚 Full Documentation

For complete documentation, API reference, examples, and getting started guides:


Repository Structure

This monorepo contains:


Quick Example

// Imperative: Direct control
final path = NavigationPath<AppRoute>();
path.push(ProfileRoute());

// Declarative: State-driven
NavigationStack.declarative(
  routes: [
    for (final page in pages) PageRoute(page),
  ],
  resolver: (route) => StackTransition.material(...),
)

// Coordinator: Web & deep linking
class AppCoordinator extends Coordinator<AppRoute> {
  @override
  AppRoute parseRouteFromUri(Uri uri) => ...;
}

Platform Support

✅ iOS • ✅ Android • ✅ Web • ✅ macOS • ✅ Windows • ✅ Linux


License

Apache 2.0 License - see LICENSE

Author

Created by definev


About

The Ultimate Flutter Router for Every Navigation Pattern

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published