SequenceNode class Null safety

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

Constructors

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

Properties

children List<SequenceNode>
final
hashCode int
The hash code for this object. [...]
read-only, inherited
hasId bool
Checks if this node has an ID, otherwise it is a root node
read-only
id int
The ID, the root node has an ID of -1
final
isEmpty bool
Checks if this node has no children
read-only
isNotEmpty bool
Checks if this node has children
read-only
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
read-only
length int
Retrieves the number of children of this node
read-only
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

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 non-existent 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