AssetsGenerator class abstract

The architecture of the Assets generator.

Implementers
Annotations
  • @immutable

Constructors

AssetsGenerator({required String importPath, required String exportPath, Encoding? exportEncoding, DartFormatter? formatter, String? baseName, bool? convert})
The architecture of the Assets generator.

Properties

assetsMap Map<String, Object?>
The Assets path graph.
final
baseName String
The name of the base Assets class.
final
buildExtensions Map<String, List<String>>
Mapping from input file extension to output file extensions.
no setter
convert bool
If the Assets names should be converted using StringUtils.toCamelCase.
final
encoding Encoding
The encoding used for reading the .json and .yaml files.
finalinherited
exportEncoding Encoding
The encoding used for writing the .dart files.
finalinherited
exportPath String
The path to export data to.
finalinherited
fileMap Map<String, Object?>
The map of files that was loaded from importPath.
finalinherited
formatter → DartFormatter
The formatter used to format generated files.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
importPath String
The path to import data from.
finalinherited
loadFiles bool
If file contents should be loaded during build into fileMap.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

build([BuildStep? buildStep]) FutureOr<void>
Generate fileMap from files under importPath.
className(String name, [Iterable<String> keys = const Iterable<String>.empty()]) String
Return the class name from the base name and keys.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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