GoRouterRenderer class

Renders generated routes into a GoRouter configuration.

Uses FKIT route and import markers to integrate generated route definitions and imports into the configured router file.

Mixed-in types

Constructors

GoRouterRenderer()
Creates a GoRouter renderer.
const

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

confirmOverwrite(String description) Future<bool>
Prompts the user to confirm overwriting an existing item.
inherited
ensureDirectory(Directory directory) Future<void>
Ensures that the specified directory exists.
inherited
generateTemplate({required String templateRoot, required String template, required String output, required Map<String, String> variables, bool overwrite = false}) Future<void>
Renders a template and writes the generated content to output.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
path(String featurePath, String relative) String
Creates a path by combining featurePath with a relative path.
inherited
render({required GeneratorContext context, required List<ResolvedRoute> routes}) Future<void>
Renders the provided routes into the project's GoRouter configuration.
resolveVariables(String value, Map<String, String> variables) String
Replaces template placeholders in value using the provided variables.
inherited
shouldGenerate(FileSystemEntity entity, {bool overwrite = false}) Future<bool>
Determines whether the specified entity should be generated.
inherited
toString() String
A string representation of this object.
inherited
writeFile({required File file, required String content, bool overwrite = false}) Future<void>
Writes content to the specified file.
inherited

Operators

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