BloomFormControl class abstract
Abstract base contract for all reactive Bloom form controls.
Provides a unified reactive state surface across single-value inputs (BloomFormField, BloomTypedFormField), file attachments (BloomFileField), repeating collections (BloomFieldArray), and nested sub-forms (BloomFormGroup).
Both browser DOM mounting and SSR evaluate these signals seamlessly.
void inspectControl(BloomFormControl control) {
if (!control.isValid.value) {
print('Validation errors: ${control.errors.value}');
}
}
Constructors
Properties
-
errors
→ Signal<
List< String> > -
Reactive signal containing validation error messages generated by validate or validateAsync.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
-
isDirty
→ ReadonlySignal<
bool> -
Reactive signal indicating whether user actions have modified the initial value.
no setter
-
isTouched
→ Signal<
bool> -
Reactive signal indicating whether the user has interacted with or blurred this control.
no setter
-
isValid
→ ReadonlySignal<
bool> -
Computed signal that evaluates to
truewhen errors is empty and all children are valid.no setter -
isValidating
→ ReadonlySignal<
bool> -
Reactive signal indicating whether asynchronous validation is currently executing.
no setter
- rawValue → dynamic
-
Raw untyped value of the control used during form serialization and aggregation.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
reset(
) → void - Resets this control to its initial state, clearing errors, isDirty, and isTouched.
-
toString(
) → String -
A string representation of this object.
inherited
-
touch(
) → void - Marks this control as touched (e.g. on blur or user interaction).
-
validate(
) → bool - Validates this control and any child controls synchronously, updating errors.
-
validateAsync(
{bool debounce = false}) → Future< bool> - Validates this control and any child controls asynchronously, updating errors.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited