Generator class

Creates the feature directory structure and renders Mustache templates into Dart source files.

The generator is file-system focused and deliberately avoids business logic. It expects a fully prepared Context and respects the configured presentation layer (bloc, riverpod, or getx). Existing generated files are overwritten when the same paths are produced and overwrite is true.

Constructors

Generator({String? templateBasePath})
Creates a generator.

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

generateBoilerplate({required String featureName, required String basePath, required String templateBasePath, required Context context, required bool overwrite}) → void
Renders all Mustache templates into the feature directory.
generateFeature(Context context, {bool overwrite = false}) Future<void>
Creates directories and generates all boilerplate files for the feature.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
renderTemplate(String templatePath, String outPath, Map<String, dynamic> context, {required bool overwrite}) → void
Reads a .mustache template, injects context values, and writes to outPath only if it does not already exist (or when overwrite is true).
toString() String
A string representation of this object.
inherited

Operators

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