RouteDefinition class abstract

A user defined route path for a router.

Route definitions are how you configure routing. Several types supported:

Implementers

Constructors

RouteDefinition({String? path, ComponentFactory<Object>? component, bool? useAsDefault, dynamic additionalData, RoutePath? routePath})
Define a route from path that loads component into an outlet.
factory
RouteDefinition.defer({String? path, required LoadComponentAsync loader, FutureOr<void> prefetcher(RouterState)?, bool? useAsDefault, dynamic additionalData, RoutePath? routePath})
Define a route from path that uses loader to resolve a component.
factory
RouteDefinition.redirect({String? path, required String redirectTo, bool? useAsDefault, dynamic additionalData, RoutePath? routePath})
Configures a redirect from a path --> to another one.
factory

Properties

additionalData → dynamic
Additional information to attached to the RouteDefinition.
final
hashCode int
The hash code for this object.
no setterinherited
parameters Iterable<String>
Collection of parameters that are supplied in path.
no setter
path String
Logical name used for determining a route.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
useAsDefault bool
Uses this Route as default if the RouterOutlet has no component.
final

Methods

assertValid() → void
Runs a dev-mode assertion that the definition is valid.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toRegExp() RegExp
Returns as a regular expression that matches this route.
toString() String
A string representation of this object.
inherited
toUrl([Map<String, String> paramValues = const {}]) String
Returns as a valid URL with paramValues filled into parameters.

Operators

operator ==(Object other) bool
The equality operator.
inherited