command/create/route_codegen library

Classes

FeatureRoute
A discovered feature that maps to a go_router route.

Functions

buildAppRoutesFile(List<FeatureRoute> routes) String
Builds the contents of app_routes.dart from the discovered routes. home is always present as /; every other route is '/<name>'.
buildRoutePageFile(List<FeatureRoute> routes, String pkg) String
Builds the contents of route_page.dart from the discovered routes. A feature literally named home becomes the / route; otherwise / shows a Placeholder.
removeRouteConstant(String content, String routeName) String
Removes the static const String <routeName> = ...; line from an app_routes.dart body. home is preserved.
removeRouteEntry(String content, String routeName, String snake) String
Removes a feature's GoRoute(...) block and its view import from a route_page.dart body. snake is the snake_case feature name used to match the <snake>_view.dart import line.