unrouter_core 0.1.0
unrouter_core: ^0.1.0 copied to clipboard
Platform-agnostic routing core for matching, guards, params, and query helpers.
Unrouter Core #
Core routing primitives for matching, navigation, guards, params, query helpers, and route metadata.
Install #
dart pub add unrouter_core
Quick Start #
import 'package:unrouter_core/unrouter_core.dart';
import 'package:unstory/unstory.dart';
final router = createRouter<String>(
history: MemoryHistory(initialEntries: [HistoryLocation(Uri(path: '/'))]),
routes: const [
RouteNode<String>(path: '/', view: homeView),
RouteNode<String>(path: '/users/:id', name: 'user', view: userView),
],
);
String homeView() => 'home';
String userView() => 'user';
Use this package when you are building on top of the routing engine itself.
This package does not render UI. For Flutter and Nocterm packages, see flutter_unrouter and nocterm_unrouter.