createDiv function

DivElement createDiv([
  1. bool inline = false,
  2. String? html,
  3. NodeValidator? validator
])

Creates a div. inline If true sets display: inline-block. html The HTML to parse as content.

Implementation

DivElement createDiv(
    [bool inline = false, String? html, NodeValidator? validator]) {
  var div = DivElement();

  if (inline) div.style.display = 'inline-block';

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

  return div;
}