RouteMap class
A standard simple routing table which takes a map of routes.
routes
- A map of paths and PageBuilder delegates that return Page objects to build.
- Annotations
Constructors
-
RouteMap({required Map<
String, PageBuilder> routes, UnknownRouteCallback? onUnknownRoute}) - Creates a standard simple routing table which takes a map of routes.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
get(
String path) → RouterResult? -
Generate a single
RouteResult
for the givenpath
. Returns null if the path isn't valid. -
getAll(
String path) → List< RouterResult> ? -
Generate all
RouteResult
objects required to build the navigation tree for the givenpath
. Returns null if the path isn't valid. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onUnknownRoute(
String path) → RouteSettings -
Called when there's no match for a route. By default this returns
DefaultNotFoundPage
, a simple page not found page. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited