@Field¶
Use @Field on a getter that maps one scalar or value field to storage.
The annotation constructor is:
nameis the stored field name. If omitted, the annotated getter name is used.defaultValuesupplies a generated default when the input does not provide one. A nullable field without an explicit default can default tonull.
The Dart return type supplies the field's value type to the generator and JSON conversion layer. The generated schema retains the stored name for filters, serialization, and engine mapping.
@Field is also the base annotation for @ForeignField,
@ModelField, and @DerivedField. Those
annotations add relationship, embedded-value, or derived-value semantics to a
mapped getter.