FieldModel class
The model to contain the options of each field of the ClassModel.
- Annotations
-
- @sealed
- @immutable
Constructors
- FieldModel(String key, FieldType type, {String? dartName, String? reference, Object? $default, String? doc, bool? required, bool? nullable, bool? copy, FieldSerialization? serialize, bool? deserialize, bool? compare, FieldEquality? equality, bool? toString, bool? convert, bool? checkType, Object? checkTypeDefault, bool? castIterable})
-
The model to contain the options of each field of the ClassModel.
const
Properties
- $default → Object?
-
The default value of this field.
final
- $toString → bool
-
If this field should be added in object toString method.
final
- castIterable → bool
-
If iterable value type should be processed on deserialize using
Iterable.cast instead of Iterable.whereType.
final
- checkType → bool
-
If value type should be checked on deserialize and replaced for
checkTypeDefault if needed.
final
- checkTypeDefault → Object?
-
The default value of this field to set if checkType resolves to false.
final
- compare → bool
-
If this field should participate in object comparison.
final
- convert → bool
-
If this field name should be converted using
StringUtils.toCamelCase
.final - copy → bool
-
If this field can be copied.
final
- dartName → String
-
The optional dart name of the key.
final
- deserialize → bool
-
If this field can be deserialized.
final
- doc → String?
-
The documentation for this field.
final
- equality → FieldEquality
-
The type of the FieldEquality that should apply to this field.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- key → String
-
The key of this field in the class.
final
- name → String
-
The valid dart name of this field.
no setter
- nullable → bool
-
If this field is nullable.
final
- reference → String
-
The reference to the field type.
final
- required → bool
-
If this field is required.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- serialize → FieldSerialization
-
The type of the FieldSerialization that should apply to this field.
final
- staticKey → String
-
The name of the static key of this field.
no setter
- type → FieldType
-
The type of this field.
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.
override