ListItemNode class
- Inheritance
-
- Object
- DocumentNode
- TextNode
- ListItemNode
- Available extensions
- Annotations
Constructors
-
ListItemNode({required String id, required ListItemType itemType, required AttributedText text, Map<
String, dynamic> ? metadata, int indent = 0}) -
ListItemNode.ordered({required String id, required AttributedText text, Map<
String, dynamic> ? metadata, int indent = 0}) -
ListItemNode.unordered({required String id, required AttributedText text, Map<
String, dynamic> ? metadata, int indent = 0})
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 → TextNodePosition
-
Returns the NodePosition that corresponds to the beginning
of content in this node.
no setterinherited
- endPosition → TextNodePosition
-
Returns the NodePosition that corresponds to the end of the
content in this node.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setteroverride
- id → String
-
ID that is unique within a Document.
finalinherited
- indent → int
-
final
- 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
- text → AttributedText
-
The content text within this TextNode.
finalinherited
- type → ListItemType
-
final
Methods
-
computeSelection(
{required NodePosition base, required NodePosition extent}) → TextNodeSelection -
Returns a node-specific representation of a selection from
basetoextent.inherited -
containsPosition(
Object position) → bool -
Returns
trueif this DocumentNode contains the givenposition, orfalseif thepositiondoesn't sit within this node, or if thepositiontype doesn't apply to this DocumentNode.inherited -
copy(
) → ListItemNode -
override
-
copyAndReplaceMetadata(
Map< String, dynamic> newMetadata) → ListItemNode -
Returns a copy of this DocumentNode, replacing its existing
metadata with
newMetadata.override -
copyContent(
dynamic 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 -
copyListItemWith(
{String? id, ListItemType? itemType, AttributedText? text, int? indent, Map< String, dynamic> ? metadata}) → ListItemNode -
copyMetadata(
) → Map< String, dynamic> -
Returns a copy of this node's metadata.
inherited
-
copyTextNodeWith(
{String? id, AttributedText? text, Map< String, dynamic> ? metadata}) → ListItemNode -
override
-
copyWithAddedMetadata(
Map< String, dynamic> newProperties) → ListItemNode -
Returns a copy of this DocumentNode with
newPropertiesadded to the node's metadata.override -
getAffinityBetween(
{required NodePosition base, required NodePosition extent}) → TextAffinity -
Available on DocumentNode, provided by the InspectNodeAffinity extension
Returns the affinity direction implied by the givenbaseandextent. -
getMetadataValue(
String key) → dynamic -
Returns this node's metadata value for the given
key.inherited -
hasEquivalentContent(
DocumentNode other) → bool -
Returns true if the
othernode is the same type as this node, and contains the same content.override -
hasMetadataValue(
String key) → bool -
Returns
trueif this node has a non-null metadata value for the given metadatakey, and returnsfalse, otherwise.inherited -
initAddToMetadata(
Map< String, dynamic> addedMetadata) → void -
Adds
addedMetadatato this nodes metadata.inherited -
isPositionCloserToEnd(
NodePosition position) → bool -
Returns
trueif the givenpositionis closer to the end of this node's content than it is to the end.inherited -
isPositionCloserToStart(
NodePosition position) → bool -
Returns
trueif the givenpositionis closer to the start of this node's content than it is to the end.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
positionAt(
int index) → DocumentPosition -
Returns a DocumentPosition within this TextNode at the given text
index.inherited -
rangeBetween(
int startIndex, int endIndex) → DocumentRange -
Returns a DocumentRange within this TextNode between
startIndexandendIndex.inherited -
selectDownstreamPosition(
NodePosition position1, NodePosition position2) → NodePosition -
Inspects
position1andposition2and returns the one that's positioned further downstream in this DocumentNode.inherited -
selectionAt(
int collapsedIndex) → DocumentSelection -
Returns a collapsed DocumentSelection, positioned within this TextNode at the
given
collapsedIndex.inherited -
selectionBetween(
int startIndex, int endIndex) → DocumentSelection -
Returns a DocumentSelection within this TextNode from
startIndextoendIndex.inherited -
selectUpstreamPosition(
NodePosition position1, NodePosition position2) → NodePosition -
Inspects
position1andposition2and returns the one that's positioned further upstream in this DocumentNode.inherited -
toHtml(
Document document, InlineHtmlSerializerChain inlineSerializers, {int? start, int? end}) → String -
Available on ListItemNode, provided by the ListItemNodeToHtml extension
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override