GoRouterAnnotation class

An annotation which marking the top-level constant variable as a target of builder. Usage: @GoRouterAnnotation const _whateverName = [ RouterPathBuilder( 'some_path_1', routes: ..., ), RoutePathPageBuilder( 'some_path_2', routes: ..., ) ];

By default, two variables router and route will be created. router is actually routerConfig that used as MaterialApp.router, route is for generating location.

They can be changed by routerConfigVariableName and routeVariableName.

@GoRouterAnnotation(routerConfigVariableName: 'routerConfig', routeVariableName: 'myRoute') const _whateverName = ...;

Constructors

GoRouterAnnotation({String routerConfigVariableName = 'router', String routeVariableName = 'route'})
const

Properties

hashCode int
The hash code for this object.
no setterinherited
routerConfigVariableName String
final
routeVariableName String
final
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
toString() String
A string representation of this object.
inherited

Operators

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