⍨ Declarative, composable router for Dart/Flutter ecosystem apps.
Unrouter provides nested route trees, named navigation, guards, route params, query helpers, shared history APIs, and adapter-specific rendering for both widget apps and terminal UIs.
| Package | Version | Best for | Notes |
|---|---|---|---|
unrouter |
Most apps | Main package that exposes flutter.dart, nocterm.dart, and shared core/history APIs. |
|
flutter_unrouter |
Direct Flutter integration | MaterialApp.router, Outlet, Link, and route hooks. |
|
nocterm_unrouter |
Terminal apps built with Nocterm | Nested routing with RouterView and Outlet. |
|
unrouter_core |
Shared routing logic | Matching, guards, params, query helpers, and history APIs. |
Install the main package:
dart pub add unrouterUse the Flutter entrypoint from the main package:
import 'package:unrouter/flutter.dart';Use the Nocterm entrypoint in terminal apps:
import 'package:unrouter/nocterm.dart';Use the shared core and history APIs directly when you are building on top of the routing engine:
import 'package:unrouter/unrouter.dart';examples/flutter_example: Flutter app showing nested routes, layouts, and advanced routing patterns.examples/nocterm_example: Terminal app showing nested docs routes, named routes, params, query values, and back navigation.