SequenceNode class

A message sequence to handle nested IDs like in the IMAP THREAD extension.

Constructors

SequenceNode(int id, {required bool isUid})
Creates a sequence node with the given id and true in isUid if this belongs to a UID sequence.
SequenceNode.root({required bool isUid})
Creates a root node with true in isUid if this belongs to a UID sequence.

Properties

children List<SequenceNode>
Children of this node
final
hashCode int
The hash code for this object.
no setterinherited
hasId bool
Checks if this node has an ID, otherwise it is a root node
no setter
id int
The ID, the root node has an ID of -1
final
isEmpty bool
Checks if this node has no children
no setter
isNotEmpty bool
Checks if this node has children
no setter
isUid bool
Defines if this is a UID (when true) or a sequenceId (when false).
final
latestId int
Retrieves the ID of the latest message node
no setter
length int
Retrieves the number of children of this node
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addChild(int childId) SequenceNode
Adds a child with the given ID.
flatten({int depth = 2}) SequenceNode
Flattens the structure with the given depth so that only the returned node is actually a root node.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
render(StringBuffer buffer) → void
Renders this node into the given buffer.
toMessageSequence({SequenceNodeSelectionMode mode = SequenceNodeSelectionMode.all}) MessageSequence
Converts this node to a message sequence in the specified mode.
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited
operator [](int index) SequenceNode
Retrieves the child node at the given index