FormioComponentState class
Runtime dynamic state for a single component instance.
Keeps the source schema immutable while allowing conditional logic, calculated values, and server errors to modify runtime attributes.
- Mixed-in types
Constructors
- FormioComponentState({required FormioComponentSchema schema, required DataPath dataPath, required String instanceId, int pageIndex = 0})
Properties
- dataPath → DataPath
-
The concrete submission data path for this instance (e.g.
items[0].qty).final - description → String?
-
no setter
- disabled → bool
-
no setter
-
errors
→ List<
FormioValidationError> -
no setter
- hasErrors → bool
-
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
-
no setter
- instanceId → String
-
Unique stable runtime instance identity.
final
- isAsyncValidating → bool
-
no setter
- isTouched → bool
-
no setter
- label → String
-
no setter
- pageIndex → int
-
Optional wizard page index on which this component is placed.
final
- required → bool
-
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- schema → FormioComponentSchema
-
The static schema definition.
final
- tooltip → String?
-
no setter
Methods
-
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object changes.
inherited
-
clearErrors(
) → void - Clears validation errors.
-
dispose(
) → void -
Discards any resources used by the object.
inherited
-
markTouched(
) → void -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void -
Call all the registered listeners.
inherited
-
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
reset(
) → void - Resets state to schema initial values.
-
setAsyncValidating(
bool validating) → void -
setDescription(
String? value) → bool - Updates description. Returns true if changed.
-
setDisabled(
bool value) → bool - Updates disabled flag. Returns true if changed.
-
setErrors(
List< FormioValidationError> errors) → void - Sets validation errors.
-
setHidden(
bool value) → bool - Updates visibility flag. Returns true if changed.
-
setLabel(
String value) → bool - Updates label. Returns true if changed.
-
setRequired(
bool value) → bool - Updates required flag. Returns true if changed.
-
setTooltip(
String? value) → bool - Updates tooltip. Returns true if changed.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited