DVPageData class

A page's data, resolved on request: what the head, the structured data and the crawler-visible text are made from. Every value is untrusted -- a title is whatever is in the database -- and escaped where it lands.

Constructors

DVPageData({required String title, String? description, String? image, String? favicon, List<String> text = const <String>[], Map<String, Object?>? structuredData, DVPageVisibility visibility = DVPageVisibility.public})
const
DVPageData.fromJson(Map<String, Object?> json)
A page from what toJson wrote. Throws FormatException for anything that is not one, so a cache holding something else is ignored rather than served as a page with no title.
factory

Properties

description → String?
final
favicon → String?
A favicon for this page, replacing the shell's.
final
hashCode → int
The hash code for this object.
no setterinherited
image → String?
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
structuredData → Map<String, Object?>?
JSON-LD, written as the page's structured data.
final
text → List<String>
final
title → String
final
visibility → DVPageVisibility
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, Object?>
The page as JSON, for a cache shared between servers.
toString() → String
A string representation of this object.
inherited

Operators

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