value property

T value
inherited

The value of the Field

Implementation

T get value => snapState.state;
  1. @override
void value=(T v)
override

Implementation

@override
set value(T v) {
  if (isReadOnly) {
    return;
  }

  if (v == value) {
    return;
  }
  isDirty = v != _initialIsDirtyText;
  snapValue = snapValue.copyToHasData(v);
  onValueChange?.call(this);

  if (form != null && _validateOnValueChange != true) {
    //If form is not null than override the autoValidate of this Injected
    _validateOnValueChange =
        form!.autovalidateMode != AutovalidateMode.disabled;
  }
  if (_validateOnValueChange ?? !(_validateOnLoseFocus ?? false)) {
    validate(); //will be notified in error setter
  } else {
    notify();
  }
}