FieldChangeTrackingMixin<Success, Failure extends Error> mixin

A mixin that provides field value change tracking functionality for forms.

This mixin allows tracking changes in form field values by maintaining initial values and providing methods to check if fields have been modified. It also supports field change listeners for reactive programming patterns.

Superclass constraints
Mixin applications

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
state BondFormState<Success, Failure>
Returns the current state of the form.
getter/setter pairinherited
stopOnFirstError bool
A flag indicating if the validation should stop on encountering the first error.
getter/setter pairinherited

Methods

addFieldListener<T>(String fieldName, void listener(T)) → void
Add a listener for a specific field's changes and returns the current field value
clear() → void
Clears the form state and resets it to its initial pristine state.
inherited
disposeTracking() → void
Cleans up tracking resources
fields() Map<String, FormFieldState>
Returns the map of field names to their corresponding FormFieldState.
inherited
initializeFieldTracking() → void
Initialize field tracking for change detection
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyFieldListeners<T>(String field, T value) → void
Called when a field is updated to notify any registered listeners
onFailure(Failure error) → void
Called when form submission fails. Can be overridden.
inherited
onSubmit() Future<Success>
To be implemented by the subclass, detailing what should happen when a form is submitted.
inherited
onSuccess(Success result) → void
Called when the form is successfully submitted. Can be overridden.
inherited
removeFieldListener<T>(String fieldName, void listener(T)) → void
Remove a listener for a specific field's changes
resetInitialFieldsValue() → void
resets the initial field values
setError(String fieldName, String? error) → void
Sets an error message for the specified field and updates the form state to invalid.
inherited
submit() Future<void>
Initiates the form submission process.
inherited
toString() String
A string representation of this object.
inherited
updateError(String fieldName, String error) → void
Updates the error message for the specified field and performs additional validation.
inherited
updateValue<T extends FormFieldState<G>, G>(String fieldName, G value) → void
Updates the field value and status.
inherited
validate() → void
Validates all fields in the form.
inherited

Operators

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