ZardFieldController<T> class

Constructors

ZardFieldController.internal({required ZardFormController form, required String path, required T? initialValue, required bool disabled})
Internal factory used by ZardFormController.register. Not part of the public API — users always create field controllers through the form.
factory

Properties

currentState ZardFieldState<T>
no setter
focusNode FocusNode
Lazily allocates a FocusNode. Subscribed by the controller so blur transitions can drive validation in onBlur / onTouched modes.
no setter
form ZardFormController
final
hasFocusNode bool
Returns true when this field has a lazily-allocated FocusNode.
no setter
hashCode int
The hash code for this object.
no setterinherited
hasTextController bool
Returns true when this field has a lazily-allocated TextEditingController.
no setter
path String
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
state ValueListenable<ZardFieldState<T>>
no setter
textController TextEditingController
Lazily allocates a TextEditingController. Only valid when T is String (or Object/dynamic). Throws if used with a different type.
no setter
value → T?
no setter

Methods

applyExternalValue(T? value, {required bool isDirty}) → void
Internal: apply a value coming from the form (setValue, reset, array mutation) without re-entering setValue.
dispose() → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
renameInternal(String newPath) → void
Internal: rename path (used by ZardFieldArray on move/swap).
replaceStateInternal(ZardFieldState<T> next) → void
Internal: replace just the state (used for diff-then-notify validation).
setDirty(bool dirty) → void
setDisabled(bool disabled) → void
setError(String? message) → void
setErrors(List<String> errors) → void
setTouched(bool touched) → void
setValidating(bool validating) → void
setValue(T? value, {bool shouldValidate = true, bool shouldTouch = false}) → void
Public setter — writes through the form for consistent dirty/touched bookkeeping and validation.
toString() String
A string representation of this object.
inherited

Operators

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