AssetDirectory class

Represents a directory containing assets with metadata.

Groups related assets and provides convenient access methods for processing and code generation.

Constructors

AssetDirectory({required String name, required String path, required List<Asset> assets})
Creates a new AssetDirectory instance.
const
AssetDirectory.fromPath(String directoryPath)
Creates an AssetDirectory by scanning a directory path.
factory

Properties

assetCount int
Gets the total number of assets in this directory.
no setter
assets List<Asset>
List of assets contained in this directory.
final
fontAssets List<Asset>
Gets all font assets in this directory.
no setter
hashCode int
The hash code for this object.
no setteroverride
imageAssets List<Asset>
Gets all image assets in this directory.
no setter
isEmpty bool
Checks if the directory is empty (contains no valid assets).
no setter
name String
The directory name.
final
path String
The absolute directory path.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

filterByExtension(String extension) List<Asset>
Filters assets by file extension.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toClassName() String
Converts the directory name to a valid Dart class name.
toString() String
A string representation of this object.
override

Operators

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