post method

void post({
  1. TSource? value,
})

Implementation

void post({TSource? value}) {
  if (value == _internalValue) return;

  _internalValue = value ?? _internalValue;

  final val = _getValue(_internalValue);

  if (val == null && !_nullable) {
    errors = [ValidationErrorsLocalized.REQUIRED];
  } else {
    _value = val!;
    errors = validate(val);
  }

  eventSubject.sink.add(FieldPostedEvent(this, _value));
}