Router class

registry of Routes

Implementers

Constructors

Router({required bool onError(Url<StateObject> url), String root = '/'})
Router.test({required bool onError(Url<StateObject> url), String root = '/'})
used for unit tests

Properties

current Route<StateObject>?
no setter
errorRoute ErrorRoute
final
hashCode int
The hash code for this object.
no setterinherited
root String
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

go([dynamic state]) → void
handling popState and initial
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
redirect<T extends StateObject>({required String from, required Route<T> to, String? title}) Route<T>
shortcut to register existing route with different path
register<T extends StateObject>(String path, String name, bool onActivate(Url<T> url), {T fromMap(Map)?}) Route<T>
creates a route from the parameters, adds it to the set of routes and returns it
toString() String
A string representation of this object.
inherited

Operators

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