belatuk_html_builder library

Classes

Node
Represents an HTML node.
NodeBuilder
Helper class to build nodes.
Renderer<T>
An object that can render a DOM tree into another representation, i.e. a String.
SelfClosingNode
Represents a self-closing tag, i.e. <br>.
StringRenderer
Renders a DOM tree into a HTML string.
TextNode
Represents a text node.

Functions

h(String tagName, [Map<String, dynamic> attributes = const {}, Iterable<Node> children = const []]) Node
Shorthand function to generate a new Node.
rebuild(NodeBuilder transform(NodeBuilder), {bool selfClosing = false}) Node Function(Node)
Returns a function that rebuilds an arbitrary Node by applying the transform to it.
rebuildRecursive(Node f(Node)) Node Function(Node)
Applies f to all children of this node, recursively.