enabled property
Implementation
bool get enabled => _status.enabled;
set field enable or not
if field is disabled
- field can not be focused
- field's validation is unnecessary
- 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),
);
});
}