RouteRegistrar class

Registers a go_router route for a generated view in lib/app/routes/, creating the routing files if they are missing. Uses a package import for the view so it works regardless of the feature's --path.

Returns false (and prints a notice) when a route for name already exists.

Constructors

RouteRegistrar()

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

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

Static Methods

register(String name, {required String viewDir, required ProjectContext ctx, bool dryRun = false}) bool
Registers the route for name whose view lives under viewDir (e.g. lib/presentation/todo). No-op in dryRun.

Constants

routesPath → const String