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 =>
    _hasFlag(SemanticsFlag.hasRequiredState) ? _hasFlag(SemanticsFlag.isRequired) : null;
set isRequired (bool? value)

Implementation

set isRequired(bool? value) {
  _setFlag(SemanticsFlag.hasRequiredState, true);
  _setFlag(SemanticsFlag.isRequired, value!);
}