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
const
DVDocumentBlock.paragraph(String text)
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
href → String?
final
kind → String
final
level → int?
h2 to h6: the page's title is its one h1.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
text → String
final

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