findAllRoutes<T> function
Iterable<MatchedRoute<T> >
findAllRoutes<T>(
- RouterContext<
T> ctx, - String method,
- String path, {
- bool params = true,
Find all route patterns that match the given path
.
Implementation
Iterable<MatchedRoute<T>> findAllRoutes<T>(
RouterContext<T> ctx,
String method,
String path, {
bool params = true,
}) {
final segments = toPathSegments(path);
final matches = _findAllMethodData(ctx, ctx.root, method, segments, 0);
return matches.map(
(e) => MatchedRoute(
data: e.data,
params: params ? toMatchedRouteParams(e.params, segments) : null,
),
);
}