SafeRouter class
A type-safe router for Flutter applications.
SafeRouter works together with SafeRoute and SafeNestedRoute
to provide strictly typed navigation with arguments and results.
Typical usage:
final router = SafeRouter()
..registerAll([homeRoute, settingsRoute]);
MaterialApp(
onGenerateRoute: router.onGenerateRoute,
);
Constructors
- SafeRouter()
- Creates a new SafeRouter with its own internal SafeRouteRegistry.
Properties
- defaultPath ↔ String
-
Get default path
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onGenerateRoute(
RouteSettings settings) → Route< Object?> ? - A callback for MaterialApp.onGenerateRoute.
-
registerAll(
List< RouteNode> routes) → void - Registers a list of RouteNode (routes or nested routes).
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited