invalid property
bool
get
invalid
Implementation
bool get invalid {
if (_error?.isNotEmpty ?? false) return true;
// If there is a Control, then it is already using this as a Validator, and
// possibly others.
if (_cd != null && _cd?.control != null) {
// Show errors only when a control is invalid, and a user has interacted
// with it. This conforms to the material spec:
// https://material.google.com/patterns/errors.html
return !_cd!.valid! && (_cd!.touched! || _cd!.dirty!);
}
// otherwise, just do our local validation
return _isLocallyValid(false) != null;
}