AssetConfig class

Configuration class for asset generation operations.

Encapsulates all necessary configuration parameters for asset processing, including project settings, directory paths, and generation options.

Constructors

AssetConfig({required String projectName, required String pubspecDir, required String outputDir, required String assetsDir, required String flavorDir, required bool createLibraryFile, String? flavor})
Creates a new AssetConfig instance.
const
AssetConfig.fromMorphemeConfig({required String projectName, required Map assetsConfig, String? flavor})
Creates an AssetConfig from a morpheme.yaml configuration map.
factory

Properties

assetsDir String
Directory containing the assets to process.
final
createLibraryFile bool
Whether to create a library export file.
final
flavor String?
Optional flavor name for environment-specific asset generation.
final
flavorDir String
Directory containing flavor-specific assets.
final
hashCode int
The hash code for this object.
no setteroverride
outputDir String
Output directory for generated Dart classes.
final
projectName String
The name of the Flutter project.
final
pubspecDir String
Directory containing the pubspec.yaml file.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

copyWith({String? projectName, String? pubspecDir, String? outputDir, String? assetsDir, String? flavorDir, bool? createLibraryFile, String? flavor}) AssetConfig
Returns a copy of this configuration with the specified fields updated.
getAssetsPath() String
Gets the absolute path to the assets directory.
getFlavorPath() String?
Gets the absolute path to the flavor directory for the current flavor.
getOutputPath() String
Gets the absolute path to the output directory.
getPubspecPath() String
Gets the absolute path to the pubspec.yaml file.
getSourceOutputPath() String
Gets the absolute path to the source output directory.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override
validate() List<String>
Validates the configuration and returns a list of validation errors.

Operators

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