RouteInformation class Null safety
A piece of routing information.
The route information consists of a location string of the application and a state object that configures the application in that location.
This information flows two ways, from the RouteInformationProvider to the Router or from the Router to RouteInformationProvider.
In the former case, the RouteInformationProvider notifies the Router widget when a new RouteInformation is available. The Router widget takes these information and navigates accordingly.
The latter case happens in web application where the Router reports route changes back to the web engine.
The current RouteInformation of an application is also used for state restoration purposes. Before an application is killed, the Router converts its current configurations into a RouteInformation object utilizing the RouteInformationProvider. The RouteInformation object is then serialized out and persisted. During state restoration, the object is deserialized and passed back to the RouteInformationProvider, which turns it into a configuration for the Router again to restore its state from.
Constructors
- RouteInformation({String? location, Object? state})
-
Creates a route information object.
const
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited