BlockNoteTransactionOp class
A single transaction operation.
Represents one operation in a transaction (insert, update, delete, reorder).
Constructors
-
BlockNoteTransactionOp({required BlockNoteTransactionOperation operation, required String blockId, BlockNoteBlock? block, String? parentId, String? afterChildId, String? beforeChildId, List<
String> ? orderedChildIds, int? index}) -
Creates a new transaction operation.
const
-
BlockNoteTransactionOp.fromJson(Map<
String, dynamic> json) -
Creates a BlockNoteTransactionOp from a JSON map.
factory
Properties
- afterChildId → String?
-
The ID of the block that comes after this block (next sibling).
final
- beforeChildId → String?
-
The ID of the block that comes before this block (previous sibling).
final
- block → BlockNoteBlock?
-
The block data (for insert/update operations).
final
- blockId → String
-
The ID of the block being operated on (empty for BlockNoteTransactionOperation.reorder).
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- index → int?
-
Optional 0-based index of this operation within the transaction (for consumers that need order).
final
- operation → BlockNoteTransactionOperation
-
The type of operation.
final
-
orderedChildIds
→ List<
String> ? -
For BlockNoteTransactionOperation.reorder, the list of block ids that were reordered.
final
- parentId → String?
-
The parent block ID (for nested structures; for reorder this is the "from" parent).
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
copyWith(
{BlockNoteTransactionOperation? operation, String? blockId, Object? block = _unset, Object? parentId = _unset, Object? afterChildId = _unset, Object? beforeChildId = _unset, Object? orderedChildIds = _unset, Object? index = _unset}) → BlockNoteTransactionOp - Creates a copy of this transaction operation with the given fields replaced.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Converts this transaction op to JSON.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override