MapField class

When applied as an annotation to a field, indicates the code generator to map that field.

This annotation can be particularly useful to map fields that should have a different name when mapped to the Map<String, dynamic>.

Constructors

MapField({String? name, bool? isKey, String? nullFallback})
const

Properties

hashCode int
The hash code for this object.
no setterinherited
isKey bool?
final
name String?
final
nullFallback String?
Expression to be added as a null fallback for when the map doesn't include the value for a new non-nullable property.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

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