isRequired property

bool? get isRequired

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:

Implementation

bool? get isRequired => _flags.isRequired.toBoolOrNull();
set isRequired (bool? value)

Implementation

set isRequired(bool? value) {
  _flags = _flags.copyWith(isRequired: _tristateFromBoolOrNull(value));
  _hasBeenAnnotated = true;
}