routingkit library
Routing Kit - Lightweight and fast router for Dart.
Classes
-
MatchedRoute<
T> - Matched route.
-
MethodData<
T> - Method data.
-
Node<
T> - Router node.
-
RouterContext<
T> - The router context.
Functions
-
addRoute<
T> (RouterContext< T> ctx, String? method, String path, T data) → void - Adds a route to the router context.
-
createRouter<
T> () → RouterContext< T> - Creates a new router context.
-
findAllRoutes<
T> (RouterContext< T> ctx, String? method, String path, {bool params = true}) → Iterable<MatchedRoute< T> > -
Find all route patterns that match the given
path
. -
findRoute<
T> (RouterContext< T> ctx, String? method, String path, {bool params = true}) → MatchedRoute<T> ? - Find a route.
-
removeRoute<
T> (RouterContext< T> ctx, String method, String path) → void - Remove a route from the router context.
Typedefs
-
ParamsMetadata
= List<
({int index, Pattern name, bool optional})> - Method data params metadata.