AssetGenerator class
Main code generation engine for asset classes and export files.
Coordinates the generation of Dart code from asset directories, handling file discovery, template rendering, and output generation.
Constructors
- AssetGenerator({TemplateGenerator? templateGenerator})
-
Creates a new AssetGenerator instance.
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
-
discoverAssets(
AssetConfig config, List< String> assetPaths) → List<Asset> - Discovers all assets in the specified paths.
-
generateAssetClasses(
AssetConfig config, List< String> assetPaths) → List<GeneratedFile> - Generates asset classes for all directories defined in the configuration.
-
generateExportFile(
AssetConfig config, List< GeneratedFile> generatedClassFiles) → GeneratedFile? - Generates a library export file that exports all asset classes.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
processAssetDirectory(
String directoryPath) → AssetDirectory - Processes an asset directory and returns asset information.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited