The Ultimate Flutter Router for Every Navigation Pattern
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.
🎮 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
✨ 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.)
For complete documentation, API reference, examples, and getting started guides:
This monorepo contains:
- zenrouter - The core routing library
- zenrouter_file_generator - File-based routing code generator for ZenRouter's Coordinator paradigm
- zenrouter_devtools - DevTools for debugging navigation
// 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) => ...;
}✅ iOS • ✅ Android • ✅ Web • ✅ macOS • ✅ Windows • ✅ Linux
Apache 2.0 License - see LICENSE
Created by definev