HTMLDocument class

Helper class to generate HTML documents.

This can be useful for creating API routes using old-school techniques (HTML+Forms).

Constructors

HTMLDocument({String title = '', String styles = '', String bodyStyles = '', String? bodyColor, String? bodyBackgroundColor, String? bodyFontFamily, String? bodyPadding, Object? top, Object? content, Object? footer})
HTMLDocument.darkTheme({String title = '', String? styles, Object? top, Object? content, Object? footer})
factory

Properties

bodyBackgroundColor String?
The optional body style background-color.
final
bodyColor String?
The optional body style color.
final
bodyFontFamily String?
The optional body style font-family.
final
bodyPadding String?
The optional body style padding.
final
bodyStyles String
no setter
content Object?
The HTML content. See resolve
getter/setter pair
The optional HTML footer content. See resolve
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
styles String
The style of the HTML.
final
title String
The title of the HTML.
final
top Object?
The optional HTML top content. See resolve
getter/setter pair

Methods

build() String
Builds the HTML string.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

resolve(Object? o) String
Resolves o to an HTML string. Accepts: