GoProviderRoute class
A class that mimics GoRoute
, but with additional support for scoped providers.
- Inheritance
-
- Object
- ShellProviderRoute
- GoProviderRoute
Constructors
-
GoProviderRoute({required String path, required List<
SingleChildWidget> providers, String? name, GoRouterWidgetBuilder? builder, GoRouterPageBuilder? pageBuilder, GoRouterRedirect? redirect, ExitCallback? onExit, List<RouteBase> routes = const []}) -
Creates a GoProviderRoute with the given
path
andproviders
.
Properties
- builder → ShellRouteBuilder?
-
The widget builder for a shell route.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
-
The GlobalKey to be used by the Navigator built for this route.
All ShellRoutes build a Navigator by default. Child GoRoutes
are placed onto this Navigator instead of the root Navigator.
finalinherited
-
observers
→ List<
NavigatorObserver> ? -
The observers for a shell route.
finalinherited
- pageBuilder → ShellRoutePageBuilder?
-
The page builder for a shell route.
finalinherited
-
An optional key specifying which Navigator to display this route's screen
onto.
finalinherited
-
providers
→ List<
SingleChildWidget> -
A list of providers to be nested in the route.
finalinherited
- redirect → GoRouterRedirect?
-
An optional redirect function for this route.
finalinherited
- restorationScopeId → String?
-
Restoration ID to save and restore the state of the navigator, including
its history.
finalinherited
-
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
-
buildPage(
BuildContext context, GoRouterState state, ShellRouteContext shellRouteContext) → Page? -
Attempts to build the Page representing this shell route.
inherited
-
buildWidget(
BuildContext context, GoRouterState state, ShellRouteContext shellRouteContext) → Widget? -
Attempts to build the Widget representing this shell route.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
Returns the key for the Navigator that is to be used for the specified
immediate sub-route of this shell route.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringShort(
) → String -
A brief description of this object, usually just the runtimeType and the
hashCode.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited