required method

Select required(
  1. bool boolean
)

A attribute indicating that an option with a non-empty string value must be selected. Read more...

Implementation

Select required(bool boolean) {
  if (boolean && node.attrs != null) {
    VirtualAttr attr = VirtualAttr('required', '');
    node.attrs!.add(attr);
  }
  return this;
}