ComponentModel class

Represents a generic Form.io component (form field or layout element).

Each component defines its type (e.g., textfield, checkbox), key, label, validation rules, and other configuration options.

Constructors

ComponentModel({required String type, required String key, required String label, required bool required, dynamic defaultValue, required Map<String, dynamic> raw})
ComponentModel.fromJson(Map<String, dynamic> json)
factory

Properties

conditional → Map<String, dynamic>?
Conditional logic configuration for this component.
no setter
conditionalField → String?
no setter
conditionalValue → dynamic
no setter
defaultValue → dynamic
The default value for the component, if any.
final
hashCode → int
The hash code for this object.
no setterinherited
key → String
Key identifier used for mapping form data.
final
label → String
Display label shown on the UI.
final
raw → Map<String, dynamic>
The original raw JSON structure of the component.
final
required → bool
Whether this component is required to be filled by the user.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
shouldShowConditionally → bool
Normalized conditional.show as bool
no setter
type → String
Type of the component (e.g., "textfield", "select", "checkbox").
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited