required property

  1. @override
  2. @Accessor(key: 'aria-required')
bool? required

Indicates that user input is required on the element before a form may be submitted.

For example, if the user needs to fill in an address field, the author will need to set the field's aria-required attribute to true.

Note: The fact that the element is required is often presented visually (such as a sign or symbol after the widget). Using the aria-required attribute allows the author to explicitly convey to assistive technologies that an element is required.

Unless an exactly equivalent native attribute is available, host languages SHOULD allow authors to use the aria-required attribute on host language form elements that require input or selection by the user.

See: developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-required

Implementation

@override
@Accessor(key: 'aria-required')
bool? get required =>
    (props[_$key__required___$AriaPropsMixin] ?? null) as bool?;
  1. @override
  2. @Accessor(key: 'aria-required')
void required=(bool? value)

Indicates that user input is required on the element before a form may be submitted.

For example, if the user needs to fill in an address field, the author will need to set the field's aria-required attribute to true.

Note: The fact that the element is required is often presented visually (such as a sign or symbol after the widget). Using the aria-required attribute allows the author to explicitly convey to assistive technologies that an element is required.

Unless an exactly equivalent native attribute is available, host languages SHOULD allow authors to use the aria-required attribute on host language form elements that require input or selection by the user.

See: developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-required

Implementation

@override
@Accessor(key: 'aria-required')
set required(bool? value) => props[_$key__required___$AriaPropsMixin] = value;