Element.text constructor

Element.text(
  1. String tag,
  2. String text
)

Instantiates a tag Element with a single Text child.

Implementation

Element.text(this.tag, String text)
    : children = [Text(text)],
      attributes = {};