$br function

DOMElement $br({
  1. int amount = 1,
  2. bool commented = false,
})

Creates a br node.

Implementation

DOMElement $br({int amount = 1, bool commented = false}) {
  if (amount <= 0) {
    return $tag('br', commented: true);
  } else if (amount == 1) {
    return $tag('br', commented: commented);
  } else {
    var list = <DOMElement>[];
    while (list.length < amount) {
      list.add($tag('br', commented: commented));
    }
    return $span(content: list, commented: commented);
  }
}