isRequired property
Whether the semantics node has a required state.
Do not call the setter for this field if the owning RenderObject doesn't have a required state that can be controlled by the user.
The getter returns null if the owning RenderObject does not have a required state.
See also:
- SemanticsFlag.isRequired, for a full description of required nodes.
Implementation
bool? get isRequired => _flags.hasRequiredState ? _flags.isRequired : null;
Implementation
set isRequired(bool? value) {
_flags = _flags.copyWith(hasRequiredState: true, isRequired: value);
_hasBeenAnnotated = true;
}