FormComponent<T extends DataEntity> class
Data Object that represents a entry in a Form
T
is the DataEntity type of data
Constructors
- FormComponent({required String property, required T data, FormComponentOptions options = const FormComponentOptions(), bool required = false, required GridField field, String? type, bool enabled = true})
- Creates a new FormComponent
Properties
- data → T
-
Value of the Component
final
- enabled → bool
-
Flag whether the component is enabled. Defaults to
true
final - field → GridField
-
The GridField this FormComponent is associated with
final
- fieldId → String
-
Id of this FormComponent
no setter
- hashCode → int
-
The hash code for this object.
no setteroverride
- options → FormComponentOptions
-
Additional options of a component
final
- property → String
-
Name of the Component
final
- required → bool
-
Shows if the field can be
null
final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- type → String
-
Type of the Component
final
Methods
-
cast<
U extends DataEntity> () → FormComponent< U> - Casts this FormComponent to a FormComponent with a specific DataEntity Type
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Saves this into a Map that can be encoded using
json.encode
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Static Methods
-
fromJson(
dynamic json, List< GridField> fields, {List<FormFieldProperties> additionalProperties = const []}) → FormComponent<DataEntity> -
Mapping to a concrete implementation based on
json
andschema