CMSRoute class final

A route purely meant to identify CMS pages. Use it to distinguish between the way local routes and CMS routes are handled.

Constructors

CMSRoute({required String path, CMSPathResolver cmsPathResolver = _identityPathResolver, GoRouterWidgetBuilder? builder, GoRouterPageBuilder? pageBuilder, GlobalKey<NavigatorState>? parentNavigatorKey, String? name, ExitCallback? onExit, GoRouterRedirect? redirect, List<RouteBase> routes = const <RouteBase>[]})
Creates a new CMS route.

Properties

builder → GoRouterWidgetBuilder?
A custom builder for this route.
finalinherited
cmsPathResolver CMSPathResolver
A function that resolves a CMS path from a local path.
final
hashCode int
The hash code for this object.
no setterinherited
name String?
Optional name of the route.
finalinherited
onExit → ExitCallback?
Called when this route is removed from GoRouter's route history.
finalinherited
pageBuilder → GoRouterPageBuilder?
A page builder for this route.
finalinherited
parentNavigatorKey GlobalKey<NavigatorState>?
An optional key specifying which Navigator to display this route's screen onto.
finalinherited
path String
The path of this go route.
finalinherited
pathParameters List<String>
The path parameters in this route.
finalinherited
redirect → GoRouterRedirect?
An optional redirect function for this route.
finalinherited
redirectOnly bool
Whether this GoRoute only redirects to another route.
no setterinherited
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

debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
extractPathParams(RegExpMatch match) Map<String, String>
Extract the path parameters from a match.
inherited
matchPatternAsPrefix(String loc) RegExpMatch?
Match this route against a location.
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