GoRoute class

A route that is displayed visually above the matching parent route using the Navigator.

The widget returned by builder is wrapped in Page and provided to the root Navigator, the nearest ShellRoute ancestor's Navigator, or the Navigator with a matching parentNavigatorKey.

The Page depends on the application type: MaterialPage for MaterialApp, CupertinoPage for CupertinoApp, or NoTransitionPage for WidgetsApp.

Inheritance

Constructors

GoRoute({required String path, String? name, GoRouterWidgetBuilder? builder, GoRouterPageBuilder? pageBuilder, GlobalKey<NavigatorState>? parentNavigatorKey, GoRouterRedirect? redirect, List<RouteBase> routes = const <RouteBase>[]})
Constructs a GoRoute.

Properties

builder → GoRouterWidgetBuilder?
A custom builder for this route.
final
hashCode int
The hash code for this object.
no setterinherited
name String?
Optional name of the route.
final
pageBuilder GoRouterPageBuilder?
A page builder for this route.
final
parentNavigatorKey GlobalKey<NavigatorState>?
An optional key specifying which Navigator to display this route's screen onto.
final
path String
The path of this go route.
final
redirect GoRouterRedirect?
An optional redirect function for this route.
final
routes List<RouteBase>
The list of child routes associated with this route.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

extractPathParams(RegExpMatch match) Map<String, String>
Extract the path parameters from a match.
matchPatternAsPrefix(String loc) RegExpMatch?
Match this route against a location.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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