Field class final

Mapping configuration of target object's field.

Constructors

Field(String field, {String? from, Object? custom, bool ignore = false, Object? whenNull, bool? ignoreNull})
Universal constructor.
const
Field.custom(String field, {required Object? custom, Object? whenNull})
Field custom mapping.
const
Field.from(String field, {required String? from, Object? whenNull})
Field renaming using from or assigning default value with whenNull.
const
Field.ignore(String field)
Field ignoring.
const

Properties

custom → Object?
Custom mapping of target field.
final
field → String
Which field is mapped.
final
from → String?
Target field should be mapped from source from.
final
hashCode → int
The hash code for this object.
no setterinherited
ignore → bool
Marks target field as ignored.
final
ignoreNull → bool?
Force non-nullable value if SOURCE's field is nullable and TARGET's field not.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
whenNull → Object?
Default value to be used when source field is null.
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