DiMaintainer class

Maintains dependency injection configuration for generated features.

Synchronizes dependency registrations and related imports using the selected template configuration.

Implemented types
Mixed-in types

Constructors

DiMaintainer()
Creates a dependency injection maintainer.
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
maintain(GeneratorContext context) Future<void>
Maintains generated project files using the provided context.
override
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
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