createLabel function

LabelElement createLabel([
  1. String? html,
  2. NodeValidator? validator
])

Creates a label element.

html The HTML to parse as content.

Implementation

LabelElement createLabel([String? html, NodeValidator? validator]) {
  var label = LabelElement();

  if (html != null) {
    setElementInnerHTML(label, html, validator: validator);
  }

  return label;
}