PostDocument class

Documento de um post rico: uma sequência ordenada de PostBlock (estilo G1). É a representação que o editor manipula. Serializa para:

  • JSON → persistência estruturada (coluna blocks ou frontmatter);
  • Markdown → corpo do post, renderizado pelo pipeline existente.

Constructors

PostDocument(List<PostBlock> blocks)
const
PostDocument.fromJson(List json)
factory
PostDocument.parse(String? raw)
Aceita uma String JSON (lista de blocos). Vazio/ inválido → documento vazio.
factory

Properties

blocks → List<PostBlock>
final
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → List<Map<String, Object?>>
toJsonString() → String
toMarkdown() → String
Junta os blocos em um Markdown único (separados por linha em branco).
toString() → String
A string representation of this object.
inherited

Operators

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