brackets library

Classes

MarkupNode
Base class for all markup nodes.
MarkupTag
Represents a markup tag with a name, attributes, and optional children.
MarkupText
Represents a text node in the markup.

Extensions

RenderMarkupX on Markup
Extension on Markup to render it as a string.
TagConstructorX on String
Extension on String to create a markup tag using function call syntax.
TextConstructorX on String
Extension on String to create a text node using the $ getter.

Functions

html(Markup children, {Attributes attrs = const {}}) Markup
Wraps the given children in an HTML doctype and <html> tag with optional attrs.
pair(String key, String value) MarkupNode
Creates a markup node representing a key-value pair with the given key and value.
pairs(List<(String, String)> entries) Markup
Creates markup nodes from a list of key-value entries.
xml(Markup children) Markup
Wraps the given children in an XML declaration.

Typedefs

Attributes = Map<String, String?>
Attributes for markup tags, represented as a map of strings to nullable strings.
Markup = Iterable<MarkupNode>
A collection of markup nodes, forming a markup document.