TextControlBinder class

Keeps a FormControl<String> and a TextEditingController in sync.

Why this exists:

  • Flutter text inputs are typically driven by a TextEditingController.
  • dart_ng_forms exposes values via FormControl.value / valueNotifier. This binder bridges both worlds, ensuring:
  • User typing updates the control value.
  • Programmatic control updates reflect in the text field.

It also prevents infinite update loops by using an internal _syncing guard.

Constructors

TextControlBinder({required FormControl<String> control, required TextEditingController controller})
Creates a new binder and immediately wires the two-way synchronization.

Properties

control FormControl<String>
The reactive form control that represents the source of truth for text.
final
controller TextEditingController
The controller used by Flutter TextField/TextFormField.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

dispose() → void
Disposes this binder by detaching all listeners.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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