dom_builder_dart_html library

Classes

AsDOMElement
Interface for objects that can be cast as DOMElement.
AsDOMNode
Interface for objects that can be cast as DOMNode.
CAPTIONElement
CHECKBOXElement
CSS
CSS entries.
CSSBackground
A CSS background value.
CSSBackgroundGradient
A CSS background gradient value.
CSSBackgroundImage
CSSBorder
A CSS border value.
CSSCalc
A CSS calc(...) value.
CSSColor
Base class for CSS colors.
CSSColorHEX
A CSSColor in HEX (no alpha).
CSSColorHEXAlpha
A CSSColor in HEX with alpha.
CSSColorName
A CSSColor by name.
CSSColorRGB
A CSSColor in RGB.
CSSColorRGBA
CSSEntry<V extends CSSValue>
A CSS entry (a pair of key and CSSValue).
CSSFunction
Base class for a CSSValue that is a CSS function.
CSSGeneric
A generic CSS value.
CSSLength
A CSS value that represents a length with a unit.
CSSMax
A CSS max(...) value.
CSSMin
A CSS min(...) value.
CSSNumber
A CSS value that represents a number (without a unit).
CSSURL
A CSS url(...) value.
CSSValue
Base class for CSSEntry values.
DIVElement
Class for a div element.
DOMAction<T>
DOMActionCall<T>
DOMActionExecutor<T>
DOMActionExecutorDartHTML
DOMActionList<T>
DOMActionSelect<T>
DOMAsync
A DOMNode that will be defined in the future.
DOMAttribute
Represents a DOMElement attribute entry (name and DOMAttributeValue).
DOMAttributeValue
Base class for DOMAttribute value.
DOMAttributeValueBoolean
DOMAttributeValueCollection
Base DOMAttributeValue class for collections.
DOMAttributeValueCSS
A DOMAttributeValue of type CSS.
DOMAttributeValueList
A DOMAttributeValue of type List.
DOMAttributeValueSet
A DOMAttributeValue of type Set.
DOMAttributeValueString
A DOMAttributeValue of type String.
DOMAttributeValueTemplate
Attribute value when has template syntax: {{...}}
DOMContext<T>
Represents the context of this DOM tree.
DOMElement
A node for HTML elements.
DOMEvent<T>
Base class for DOMElement events.
DOMGenerator<T>
Basic class for DOM elements generators.
DOMGeneratorDartHTML<T>
DOMGeneratorDartHTMLImpl
DOMGenerator based in dart:html.
DOMGeneratorDelegate<T>
Delegates operations to another DOMGenerator.
DOMGeneratorDummy<T>
A dummy DOMGenerator implementation.
DOMMouseEvent<T>
Represents a mouse event.
DOMNode
Represents a DOM Node.
DOMNodeMapping<T>
A wrapper for a mapped pair of a DOMTreeMap.
DOMNodeRuntime<T>
Wraps the actual generated node T and allows some operations over it.
DOMNodeRuntimeDartHTMLImpl
DOMNodeRuntimeDummy<T>
DOMTemplate
DOMTemplateBlock
DOMTemplateBlockCondition
DOMTemplateBlockElse
DOMTemplateBlockElseCondition
DOMTemplateBlockElseIf
DOMTemplateBlockElseNot
DOMTemplateBlockIf
DOMTemplateBlockIfCmp
DOMTemplateBlockIfCollection
DOMTemplateBlockNot
DOMTemplateBlockQuery
DOMTemplateBlockVar
DOMTemplateBlockVarElse
DOMTemplateContent
DOMTemplateIntlMessage
DOMTemplateNode
DOMTemplateVariable
DOMTreeMap<T>
Represents a mapping tree. Can be used to map a DOMNode to a generated node T, or a node T to a DOMNode.
DOMTreeMapDummy<T>
A Dummy DOMTreeMap, that won't map anything.
DSX<T>
A DSX object.
DSXResolver<T>
DSXType<T>
ElementGenerator<T>
ElementGeneratorFunctions<T>
ExternalElementNode
Class wrapper for a external element as a DOMNode.
INPUTElement
OPTIONElement
SELECTElement
TABLEElement
TABLENode
TBODYElement
TDElement
TemplateNode
Represents a template node in DOM.
TEXTAREAElement
TextNode
Represents a text node in DOM.
TFOOTElement
THEADElement
THElement
TRowElement
Viewport
Represents browser window Viewport.

Mixins

WithValue

Extensions

DSXFutureExtension on Future<T>
DSX extensions for Future.
DSXFutureOrExtension on FutureOr<T>
DSX extensions for FutureOr.

Functions

$a({Object? id, Object? classes, Object? style, Map<String, String>? attributes, String? href, String? target, Object? content, bool? hidden, bool commented = false}) DOMElement
Creates an a node.
$asyncContent({Object? loading, Future? future, Future function()?}) DOMAsync
Creates a div node with display: inline-block.
$br({int amount = 1, bool commented = false}) DOMElement
Creates a br node.
$button({Object? id, Object? name, Object? classes, Object? style, String? type, Map<String, dynamic>? attributes, Object? content, bool? hidden, bool disabled = false, bool commented = false}) DOMElement
Creates a button node.
$caption({Object? id, Object? classes, Object? style, String? captionSide, Map<String, String>? attributes, Object? content, bool? hidden, bool commented = false}) CAPTIONElement
Creates a caption node.
$checkbox({Object? id, Object? name, Object? classes, Object? style, Object? placeholder, Map<String, String>? attributes, bool? checked, Object? value, bool? hidden, bool disabled = false, bool commented = false}) CHECKBOXElement
Creates an input node of type checkbox.
$div({Object? id, Object? classes, Object? style, Map<String, String>? attributes, Object? content, bool? hidden, bool commented = false}) DIVElement
Creates a div node.
$divCenteredContent({Object? classes, String? style, String width = '100%', String height = '100%', String? cellsClasses, String? cellsStyle, String? cellSpacing, int? cellsPerRow, List? cells, List? rows, Object? content}) DIVElement
Creates a div that centers vertically and horizontally using display table and table-cell.
$divHTML(Object? html) DIVElement?
Creates a div node from HTML.
$divInline({Object? id, Object? classes, Object? style, Map<String, String>? attributes, Object? content, bool? hidden, bool commented = false}) DIVElement
Creates a div node with display: inline-block.
$dsx(dynamic o) List<DOMNode>
Parses o to a List<DOMNode>, resolving DSX objects.
$dsxCall(Function f, [dynamic a1, dynamic a2, dynamic a3, dynamic a4, dynamic a5, dynamic a6, dynamic a7, dynamic a8, dynamic a9, dynamic a10]) DSX
Converts a call to f to a DSX object.
$emsp([int length = 1]) String
$footer({Object? id, Object? classes, Object? style, Map<String, String>? attributes, Object? content, bool? hidden, bool commented = false}) DOMElement
Creates a footer node.
$form({Object? id, Object? classes, Object? style, Map<String, String>? attributes, Object? content, bool? hidden, bool commented = false}) DOMElement
Creates a form node.
$header({Object? id, Object? classes, Object? style, Map<String, String>? attributes, Object? content, bool? hidden, bool commented = false}) DOMElement
Creates a header node.
$hr({Object? id, Object? classes, Object? style, Map<String, String>? attributes, bool? hidden, bool commented = false}) DOMElement
Creates a hr node.
$html<T extends DOMNode>(Object? html) List<DOMNode>
Returns a list of nodes from html.
$htmlRoot(Object? html, {String? defaultRootTag, bool? defaultTagDisplayInlineBlock}) DOMElement?
$img({Object? id, Object? classes, Object? style, Map<String, String>? attributes, String? src, Future<String?>? srcFuture, String? title, Object? content, bool? hidden, bool commented = false}) DOMElement
Creates an img node.
$input({Object? id, Object? name, Object? classes, Object? style, Object? type, Object? placeholder, Map<String, String>? attributes, Object? value, bool? hidden, bool disabled = false, bool commented = false}) INPUTElement
Creates an input node.
$label({Object? id, String? forID, Object? classes, Object? style, Map<String, String>? attributes, Object? content, bool? hidden, bool commented = false}) DOMElement
Creates a label node.
$li({Object? id, Object? classes, Object? style, Map<String, String>? attributes, Object? content, bool? hidden, bool commented = false}) DOMElement
Creates a li node.
$nav({Object? id, Object? classes, Object? style, Map<String, String>? attributes, Object? content, bool? hidden, bool commented = false}) DOMElement
Creates a nav node.
$nbsp([int length = 1]) String
$ol({Object? id, Object? classes, Object? style, Map<String, String>? attributes, Object? content, bool? hidden, bool commented = false}) DOMElement
Creates a ol node.
$option({Object? classes, Object? style, Map<String, String>? attributes, Object? value, String? label, bool? selected, bool disabled = false, Object? text, Object? valueAndText}) OPTIONElement
Creates an option node.
$p({Object? id, Object? classes, Object? style, Map<String, String>? attributes, Object? content, bool? hidden, bool commented = false}) DOMElement
Creates a p node.
$radiobutton({Object? id, Object? name, Object? classes, Object? style, Object? placeholder, Map<String, String>? attributes, Object? value, bool? hidden, bool disabled = false, bool commented = false}) INPUTElement
Creates an input node of type radio.
$select({Object? id, Object? name, Object? classes, Object? style, Map<String, String>? attributes, Object? options, Object? selected, bool? multiple, bool? hidden, bool disabled = false, bool commented = false}) SELECTElement
Creates an select node.
$span({Object? id, Object? classes, Object? style, Map<String, String>? attributes, Object? content, bool? hidden, bool commented = false}) DOMElement
Creates a span node.
$table({Object? id, Object? classes, Object? style, Object? thsStyle, Object? tdsStyle, Object? trsStyle, Map<String, String>? attributes, Object? caption, Object? head, Object? body, Object? foot, bool? hidden, bool commented = false}) TABLEElement
Creates a table node.
$tag(String tag, {Object? id, Object? classes, Object? style, Map<String, dynamic>? attributes, Object? content, bool? hidden, bool commented = false}) DOMElement
Creates a node with tag.
$tagHTML<T extends DOMElement>(Object? html) → T?
Creates a tag node from html.
$tags<T>(String tag, Iterable<T>? iterable, [ContentGenerator<T>? elementGenerator]) List<DOMElement>
Creates a list of nodes of same tag.
$tbody({Object? id, Object? classes, Object? style, Map<String, String>? attributes, Object? rows, bool? hidden, bool commented = false}) TBODYElement
Creates a tbody node.
$td({Object? id, Object? classes, Object? style, Map<String, String>? attributes, int? colspan, int? rowspan, String? headers, Object? content, bool? hidden, bool commented = false}) TDElement
Creates a td node.
$textarea({Object? id, Object? name, Object? classes, Object? style, Object? cols, Object? rows, Map<String, String>? attributes, Object? content, bool? hidden, bool disabled = false, bool commented = false}) TEXTAREAElement
Creates a textarea node.
$tfoot({Object? id, Object? classes, Object? style, Map<String, String>? attributes, Object? rows, bool? hidden, bool commented = false}) TFOOTElement
Creates a tfoot node.
$th({Object? id, Object? classes, Object? style, Map<String, String>? attributes, int? colspan, int? rowspan, String? abbr, String? scope, Object? content, bool? hidden, bool commented = false}) THElement
Creates a th node.
$thead({Object? id, Object? classes, Object? style, Map<String, String>? attributes, Object? rows, bool? hidden, bool commented = false}) THEADElement
Creates a thread node.
$tr({Object? id, Object? classes, Object? style, Map<String, String>? attributes, Object? cells, bool? hidden, bool commented = false}) TRowElement
Creates a tr node.
$ul({Object? id, Object? classes, Object? style, Map<String, String>? attributes, Object? content, bool? hidden, bool commented = false}) DOMElement
Creates a ul node.
$validate<T extends DOMNode>({bool preValidate()?, DOMNodeValidator<T>? validate, T? node, DOMNodeInstantiator<T>? instantiator, bool rethrowErrors = false}) → T?
Validates a DOMNode before return it.
asNodeSelector(Object? selector) NodeSelector?
computeCalcOperationSymbol(CalcOperation op, num a, num b) num
createDOMGeneratorDartHTML<T>() DOMGeneratorDartHTML<T>
createElement(String tag, [DOMElement? domElement]) Element?
Creates an Element using tag name.
createInputElement([String? type]) InputElementBase
createTableCaption(Object? caption) CAPTIONElement?
createTableCells(Object? rowCells, [bool header = false]) List<TABLENode>
createTableContent(dynamic content, dynamic caption, dynamic head, dynamic body, dynamic foot, {bool? header, bool? footer}) List
createTableEntry(Object? entry, {bool? header, bool? footer}) TABLENode?
createTableRow(Object? rowCells, [bool? header]) TRowElement
createTableRows(Object? rows, bool header) List<TRowElement>
domBuilderLog(String message, {bool warning = false, Object? error, StackTrace? stackTrace}) → void
getCalcOperation(String? op) CalcOperation?
getCalcOperationSymbol(CalcOperation? op) String?
getCSSBackgroundAttachmentName(CSSBackgroundAttachment? clip) String?
getCSSBackgroundBoxName(CSSBackgroundBox? clip) String?
getCSSBackgroundRepeatName(CSSBackgroundRepeat? repeat) String?
getCSSBorderStyleName(CSSBorderStyle borderStyle) String?
getCSSUnitName(CSSUnit? unit, [CSSUnit? def]) String?
getDOMTemplateCmpOperator(DOMTemplateCmp? cmp) String
hasHTMLEntity(String s) bool
hasHTMLTag(String s) bool
isCSSViewportUnit(CSSUnit unit) bool
isDOMBuilderDirectHelper(Object? f) bool
Returns true if f is a DOM Builder helper, like $div and $br.
isHTMLElement(String s) bool
parseCSSBackgroundAttachment(String attachment) CSSBackgroundAttachment?
parseCSSBackgroundBox(String clip) CSSBackgroundBox?
parseCSSBackgroundRepeat(String repeat) CSSBackgroundRepeat?
parseCSSBorderStyle(String? borderStyle) CSSBorderStyle?
parseCSSUnit(String? unit, [CSSUnit? def]) CSSUnit?
parseDOMTemplateCmp(Object? cmp) DOMTemplateCmp?
parseHTML(String? html) List<DOMNode>?
Parses a html to nodes.
parseListOfStrings(Object? s, Pattern delimiter, [bool trim = true]) List<String>
Parses s as a flat List<String>.
possiblyWithHTML(String? s) bool
possiblyWithHTMLEntity(String? s) bool
possiblyWithHTMLTag(String? s) bool
toIntlMessageResolver(Object? resolver) IntlMessageResolver?
Converts resolver to IntlMessageResolver.

Typedefs

ContentGenerator<T> = dynamic Function(T? entry)
DOMElementGenerator<T> = T Function(Object? parent)
DOMElementGeneratorFunction<T> = T Function()
DOMNodeInstantiator<T extends DOMNode> = T? Function()
DOMNodeValidator<T extends DOMNode> = bool Function(T? node)
ElementGeneratedMatchingFunction<T> = bool Function(T element)
ElementGeneratorFunction<T> = T Function(DOMGenerator<T> domGenerator, String? tag, T? parent, Map<String, DOMAttribute> attributes, T? contentHolder, List<DOMNode>? contentNodes, DOMContext<T>? context)
ElementRevertFunction<T> = DOMElement Function(DOMGenerator<T> domGenerator, DOMTreeMap<T>? treeMap, DOMElement? domParent, T? parent, T? node)
IntlMessageResolver = String? Function(String key, [Map<String, dynamic>? parameters])
NamedElementGenerator<T> = T Function(String name, DOMGenerator<T>? domGenerator, DOMTreeMap<T> treeMap, DOMElement? domParent, Object? parent, String? tag, Map<String, DOMAttribute> attributes)
NodeSelector = bool Function(DOMNode? node)
QueryElementProvider = dynamic Function(String query)