AppRoute<P, S, D> class
final
A typed route definition shared by manual and file routing.
- Implemented types
-
- TypedRoute<
P, S, D>
- TypedRoute<
- Available extensions
Constructors
-
AppRoute({String? path, PathParams<
P> ? params, SearchParams<S> ? search, RouteMetadata metadata = const RouteMetadata(), bool terminal = true, Iterable<RouteNode> children = const <RouteNode>[]}) -
Creates a route definition.
factory
Properties
-
children
→ List<
RouteNode> -
Child routes.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasPathCodec → bool
-
Whether dynamic path values have a typed codec.
no setteroverride
- identity → Object
-
Stable identity shared by compiled route variants.
final
- metadata → RouteMetadata
-
Metadata shared by optional route capabilities.
final
-
params
→ PathParams<
P> ? -
The typed path contract, when the route owns dynamic path segments.
final
- path → String?
-
The route's relative or absolute path declaration.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
search
→ SearchParams<
S> ? -
The typed search contract, when the route owns query state.
final
- template → PathTemplate
-
The parsed path template.
no setteroverride
- terminal → bool
-
Whether this route can be the final match for a location.
final
Methods
-
capability<
T extends Object> (RouteCapability< T> key) → T? -
Reads an optional capability attached by another package entrypoint.
override
-
compiled(
{required String path, PathParams< P> ? params, SearchParams<S> ? search, required bool terminal, Iterable<RouteNode> children = const <RouteNode>[]}) → AppRoute<P, S, D> - Binds a file-system path and generated codecs to this definition.
-
decodePath(
Map< String, List< values) → Object?String> > -
Decodes this route's path parameters.
override
-
decodeQuery(
Map< String, List< values) → DecodedSearch<String> >Object?> -
Decodes this route's search state.
override
-
document(
DocumentBuilder< P, S, D> builder) → AppRoute<P, S, D> -
Available on AppRoute<
Returns the route withP, S, D> , provided by the AppRouteDocument extensionbuilderinstalled as an optional capability. -
encodePath(
Object? params) → List< String> -
Encodes this route's local path through the generated boundary.
override
-
encodeQuery(
Object? search) → Map< String, List< String> > -
Encodes this route's local search state.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
page(
{PageLoader< P, S, D> ? load, RouteWidgetBuilder<P, S, D> ? build, RoutePageBuilder<P, S, D> ? page, RoutePendingBuilder<P, S> ? pending, RouteErrorBuilder<P, S> ? error, RouteNotFoundBuilder<P, S> ? notFound}) → PageRoute<P, S, D> -
Available on AppRoute<
Creates a Flutter page route.P, S, D> , provided by the AppRoutePage extension -
ref(
{required P params, S? search}) → RouteRef< P, S, D> -
Available on TypedRoute<
Creates a local route reference.P, S, D> , provided by the ParameterizedRouteReference extension -
ref(
{S? search}) → RouteRef< NoParams, S, D> -
Available on TypedRoute<
Creates a local route reference.NoParams, S, D> , provided by the StaticRouteReference extension -
server(
{ServerLoader< P, S, D> ? load, Iterable<Middleware> middleware = const <Middleware>[], Map<HttpMethod, ServerRouteHandler< ? handlers}) → ServerRoute<P, S> >P, S, D> -
Available on AppRoute<
Creates a server route.P, S, D> , provided by the AppRouteServer extension -
shell(
{PageLoader< P, S, D> ? load, required RouteShellBuilder<P, S, D> build, RoutePendingBuilder<P, S> ? pending, RouteErrorBuilder<P, S> ? error, RouteNotFoundBuilder<P, S> ? notFound}) → ShellRoute<P, S, D> -
Available on AppRoute<
Creates a Flutter shell route.P, S, D> , provided by the AppRouteShell extension -
to(
{required P params, S? search}) → Destination -
Available on TypedRoute<
Builds a destination containing only this route.P, S, D> , provided by the ParameterizedRouteReference extension -
to(
{S? search}) → Destination -
Available on TypedRoute<
Builds a destination containing only this route.NoParams, S, D> , provided by the StaticRouteReference extension -
toString(
) → String -
A string representation of this object.
inherited
-
withChildren(
Iterable< RouteNode> children) → AppRoute<P, S, D> -
Returns a copy with
childrenattached to the same definition.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited