BlockNoteDocument class
BlockNote document structure.
Represents a complete BlockNote document containing blocks and metadata. Documents are normalized and can be serialized to/from JSON for communication with the JavaScript editor.
- Annotations
-
- @freezed
Constructors
-
BlockNoteDocument({required List<
BlockNoteBlock> blocks, BlockNoteDocumentVersion? version}) -
Creates a new document instance.
constfactory
- BlockNoteDocument.empty()
-
Creates an empty document with a single paragraph block.
factory
-
BlockNoteDocument.fromJson(Map<
String, dynamic> json) -
Creates a BlockNoteDocument from a JSON map.
factory
Properties
-
blocks
→ List<
BlockNoteBlock> -
The blocks that make up this document.
no setterinherited
-
copyWith
→ $BlockNoteDocumentCopyWith<
BlockNoteDocument> -
Create a copy of BlockNoteDocument
with the given fields replaced by the non-null parameter values.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- version → BlockNoteDocumentVersion?
-
Optional schema version for future compatibility.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Serializes this BlockNoteDocument to a JSON map.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited