GoRouteData class abstract Type-safe routes

A class to represent a GoRoute in Type-safe routing.

Subclasses must override one of build, buildPage, or redirect.

Inheritance

Constructors

GoRouteData()
Allows subclasses to have const constructors.
const

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

build(BuildContext context, GoRouterState state) Widget
Creates the Widget for this route.
buildPage(BuildContext context, GoRouterState state) Page<void>
A page builder for this route.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onExit(BuildContext context, GoRouterState state) FutureOr<bool>
Called when this route is removed from GoRouter's route history.
redirect(BuildContext context, GoRouterState state) FutureOr<String?>
An optional redirect function for this route.
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

$location(String path, {Map<String, dynamic>? queryParams}) String
A helper function used by generated code.
$route<T extends GoRouteData>({required String path, String? name, required T factory(GoRouterState), GlobalKey<NavigatorState>? parentNavigatorKey, List<RouteBase> routes = const <RouteBase>[]}) GoRoute
A helper function used by generated code.