MappableClass class Introduction Models Configuration Polymorphism Mapping Hooks Custom Mappers

Used to annotate a class in order to generate mapping code

Constructors

MappableClass({CaseStyle? caseStyle, bool? ignoreNull, String? uniqueId, String? discriminatorKey, dynamic discriminatorValue, MappingHook? hook, int? generateMethods, Iterable<Type>? includeSubClasses, Iterable<Type>? includeCustomMappers})
const

Properties

caseStyle CaseStyle?
The case style for the map keys
final
discriminatorKey String?
Property key used for type discriminators
final
discriminatorValue → dynamic
Custom value for the discriminator property
final
generateMethods int?
Specify which methods to generate for this class
final
hashCode int
The hash code for this object.
read-onlyinherited
hook MappingHook?
Define custom hooks used only for this class
final
ignoreNull bool?
If true removes all map keys with null values
final
includeCustomMappers Iterable<Type>?
final
includeSubClasses Iterable<Type>?
Specify additional subclasses of this class for polymorphism.
final
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
uniqueId String?
A unique id representing this class
final

Methods

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

Constants

useAsDefault → const MappingFlags
MappingFlags.useAsDefault