BlockNode class abstract

Base implementation for a DocumentNode that only supports UpstreamDownstreamNodeSelections.

Inheritance
Implementers
Available extensions
Annotations

Constructors

BlockNode({Map<String, dynamic>? metadata})

Properties

asListItem ListItemNode

Available on DocumentNode, provided by the ListItemNodeType extension

no setter
asTask TaskNode

Available on DocumentNode, provided by the TaskNodeType extension

no setter
asTextNode TextNode

Available on DocumentNode, provided by the TextNodeExtensions extension

no setter
beginningPosition UpstreamDownstreamNodePosition
Returns the NodePosition that corresponds to the beginning of content in this node.
no setteroverride
endPosition UpstreamDownstreamNodePosition
Returns the NodePosition that corresponds to the end of the content in this node.
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
id String
ID that is unique within a Document.
no setterinherited
isDeletable bool
no setterinherited
metadata Map<String, dynamic>
Returns all metadata attached to this DocumentNode.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

computeSelection({required NodePosition base, required NodePosition extent}) UpstreamDownstreamNodeSelection
Returns a node-specific representation of a selection from base to extent.
override
containsPosition(Object position) bool
Returns true if this DocumentNode contains the given position, or false if the position doesn't sit within this node, or if the position type doesn't apply to this DocumentNode.
override
copyAndReplaceMetadata(Map<String, dynamic> newMetadata) DocumentNode
Returns a copy of this DocumentNode, replacing its existing metadata with newMetadata.
inherited
copyContent(NodeSelection selection) String?
Returns a plain-text version of the content in this node within selection, or null if the given selection does not make sense as plain-text.
inherited
copyMetadata() Map<String, dynamic>
Returns a copy of this node's metadata.
inherited
copyWithAddedMetadata(Map<String, dynamic> newProperties) DocumentNode
Returns a copy of this DocumentNode with newProperties added to the node's metadata.
inherited
getAffinityBetween({required NodePosition base, required NodePosition extent}) TextAffinity

Available on DocumentNode, provided by the InspectNodeAffinity extension

Returns the affinity direction implied by the given base and extent.
getMetadataValue(String key) → dynamic
Returns this node's metadata value for the given key.
inherited
hasEquivalentContent(DocumentNode other) bool
Returns true if the other node is the same type as this node, and contains the same content.
inherited
hasMetadataValue(String key) bool
Returns true if this node has a non-null metadata value for the given metadata key, and returns false, otherwise.
inherited
initAddToMetadata(Map<String, dynamic> addedMetadata) → void
Adds addedMetadata to this nodes metadata.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
selectDownstreamPosition(NodePosition position1, NodePosition position2) UpstreamDownstreamNodePosition
Inspects position1 and position2 and returns the one that's positioned further downstream in this DocumentNode.
override
selectUpstreamPosition(NodePosition position1, NodePosition position2) UpstreamDownstreamNodePosition
Inspects position1 and position2 and returns the one that's positioned further upstream in this DocumentNode.
override
toString() String
A string representation of this object.
inherited

Operators

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