FdcFieldDef class abstract
Base metadata definition for a dataset field.
This class is intentionally abstract and contains only metadata that is
valid for every field type. Type-specific options such as string size,
decimal precision/scale, and numeric min/max constraints live on concrete
field classes from fields/.
Constructors
- FdcFieldDef({required String name, required FdcDataType dataType, String? label, bool required = false, bool isKey = false, Object? defaultValue, FdcCalculatedFieldValue? calculatedValue, bool? persistent, FdcFieldValidator? validator, FdcFieldStorage storage = const FdcFieldStorage()})
-
Creates a FdcFieldDef.
const
Properties
- calculatedValue → FdcCalculatedFieldValue?
-
Optional expression used to derive this field from the current row.
final
- dataType → FdcDataType
-
Logical data type used for normalization, validation, filtering, and editors.
final
- defaultValue → Object?
-
Static default value or a zero-argument default factory.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isCalculated → bool
-
True when the field value is derived by calculatedValue.
no setter
- isKey → bool
-
Whether this field participates in the dataset record identity.
final
- isPersistent → bool
-
True when the field participates in persistence-oriented dataset output.
no setter
- isReadOnly → bool
-
True when normal dataset editing must not write this field.
no setter
- label → String?
-
Display label shown to the user.
final
- name → String
-
Original field name casing used for export/display metadata.
final
- persistent → bool?
-
Controls whether the field participates in persistence-oriented outputs
such as
FdcDataSet.changeSetandFdcDataSet.toMaps.final - required → bool
-
Whether null or empty values are rejected by built-in validation.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- storage → FdcFieldStorage
-
Persistence/storage metadata consumed by adapters.
final
- validator → FdcFieldValidator?
-
Optional field-level validator executed after built-in validation.
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
-
validateSchema(
) → void - Validates runtime schema invariants that cannot rely on debug-only asserts.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited