Document class final

A document is a content item that represents a structured document. It contains a set of fields like title, description, and content that are defined by the document's schema. The document is used to display structured content in the app.

Inheritance
Annotations
  • @JsonSerializable.new()

Constructors

Document({String? title, String? description, List<ContentItem>? items, LayoutConfiguration<ContentItem>? layout, List<ContentModifierConfiguration>? modifiers})
Creates a new document with the given title, description, and content.
Document.fromJson(Map<String, dynamic> json)
factory

Properties

description String?
The description of the document. This is an optional field and is used to provide additional information about the document.
final
hashCode int
The hash code for this object.
no setterinherited
items List<ContentItem>?
The content of the document. This is the actual content of the document. The content is typically displayed in the document's body.
final
layout → LayoutConfiguration<ContentItem>?
The layout configuration for the content item.
finalinherited
modifiers List<ContentModifierConfiguration>?
finalinherited
parent ↔ ContentItem?
The parent content item of this content item. This is used internally by the content system.
getter/setter pairinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
schemaType String
The schema type of the content item.
finalinherited
title String?
The title of the document. This is used to display the title of the document in the app. The title is typically displayed in the app's top navigation bar or in the document's header.
final

Methods

getLayout() → LayoutConfiguration<ContentItem>?
Gets the layout to use for the ContentItem. By default its the layout itself. However this acts as an extension point for custom ContentItems that may have a different strategy for applying layouts.
inherited
getModifiers() List<ContentModifierConfiguration>?
Gets the modifiers to use for the ContentItem. By default its the modifiers itself. However this acts as an extension point for custom ContentItems that may have a different strategy for applying modifiers.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setParent(Iterable<ContentItem?> children) → void
Sets the parent content item for the given list of children.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

contentBuilder → ContentBuilder<Document>
The default content builder for documents, which assembles all the descriptors and constructs the final document representation.
final
descriptor → ContentDescriptorFactory<ContentItem>
Used for extending the layouts of documents
final
typeDescriptor → TypeDescriptor<Document>
The default type descriptor for documents. Used for deserialization.
final

Static Methods

itemsList(dynamic json) List<ContentItem>?

Constants

schemaName → const String