MappableClass class Introduction Models Configuration Polymorphism Mapping Hooks Custom Mappers
Used to annotate a class in order to generate mapping code.
- Inheritance
-
- Object
- MappableInterface
- MappableClass
Constructors
-
MappableClass({CaseStyle? caseStyle, bool? ignoreNull, String? uniqueId, String? discriminatorKey, dynamic discriminatorValue, MappingHook? hook, int? generateMethods, Iterable<
Type> ? includeSubClasses, Iterable<MapperBase< ? includeCustomMappers})Object> > -
const
Properties
- caseStyle → CaseStyle?
-
The case style for the map keys.
finalinherited
- 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.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- hook → MappingHook?
-
Set a custom hook used only for this class.
finalinherited
- ignoreNull → bool?
-
If true removes all map keys with null values.
finalinherited
-
includeCustomMappers
→ Iterable<
MapperBase< ?Object> > -
Specify additional custom mappers that should be included for fields
of this class.
finalinherited
-
includeSubClasses
→ Iterable<
Type> ? -
Specify additional subclasses of this class for polymorphism.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- uniqueId → String?
-
A unique id representing this class.
finalinherited
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
- To be used with discriminatorValue to signal a default subclass.