DVDocumentBlock class
One piece of a page's server-rendered document: a heading, a paragraph or a link. Typed rather than HTML, so the framework escapes every value and decides which links are safe to write -- a resolver reads untrusted rows.
Constructors
-
DVDocumentBlock.fromJson(Map<
String, Object?> json) -
The block from what toJson wrote; an unknown kind reads as a paragraph.
factory
- DVDocumentBlock.heading(String text, {int level = 2})
-
const
- DVDocumentBlock.link(String text, String? href)
-
const
- DVDocumentBlock.paragraph(String text)
-
const
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toHtml(
) → String - The block as HTML. A link is written only for a relative address or an http, https or mailto one; anything else (javascript:, data:, a protocol-relative //host) is written as its text alone.
-
toJson(
) → Map< String, Object?> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited