ModelsGenerator class abstract

The architecture of the data class generator.

Implementers
Annotations
  • @immutable

Constructors

ModelsGenerator({required String importPath, required String exportPath, Encoding? exportEncoding, Encoding? encoding, DartFormatter? formatter, bool? convertClassNames, bool? convertFieldNames, bool? convertInstanceNames, bool? assignFieldTypes, bool? includeNullFields})
The architecture of the data class generator.

Properties

assignFieldTypes bool
If the unknown field types should be resolved from default values using FieldType.fromObject.
final
buildExtensions Map<String, List<String>>
Mapping from input file extension to output file extensions.
no setterinherited
convertClassNames bool?
If the class names should be converted using StringUtils.toCamelCase.
final
convertFieldNames bool?
If the field names should be converted using StringUtils.toCamelCase.
final
convertInstanceNames bool?
If the instance 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
includeNullFields bool
If the fields with null values should be added in toMap.
final
loadFiles bool
If file contents should be loaded during build into fileMap.
finalinherited
models List<ClassModel>
The map with data class names as keys and instances as values.
final
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.
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