RouterUpdater class

Adds routes to an existing lib/app/router.dart file.

Supports both go_router (GoRoute entries) and the simple AppRouter (static const String route names) variants. Insertions are idempotent — if a route path already exists, the file is left untouched.

Constructors

RouterUpdater({String? workingDirectory})

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
workingDirectory → String?
final

Methods

addRoute({required String featureName, String? screenName, required String className, required String fileName, bool dryRun = false}) → Future<void>
Adds a route for featureName (or a screen screenName within it).
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