isRequired property

bool? isRequired
final

If non-null, whether the node should be considered required.

If true, user input is required on the semantics node before a form can be submitted. If false, the node is optional before a form can be submitted. If null, the node does not have a required semantics.

For example, a login form requires its email text field to be non-empty.

On web, this will set a aria-required attribute on the DOM element that corresponds to the semantics node.

See also:

Implementation

final bool? isRequired;