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

Implementation

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