enabled property

bool get enabled

Implementation

bool get enabled => _status.enabled;
set enabled (bool enabled)

set field enable or not

if field is disabled

  1. field can not be focused
  2. field's validation is unnecessary
  3. field is readOnly

Implementation

set enabled(bool enabled) {
  _enabled = enabled;
  setState(() {
    _validateGen++;
    if (!_isEnabled) {
      _hasInteractedByUser = false;
    }
    _status = _status._copyWith(
      enabled: FormeOptional(_isEnabled),
      readOnly: FormeOptional(_isReadOnly),
      validation: FormeOptional(_validation),
    );
  });
}