Line class base

A line of rich text in a Quill document.

Line serves as a container for Leafs, like QuillText and Embed.

When a line contains an embed, it fully occupies the line, no other embeds or text nodes are allowed.

Inheritance

Constructors

Line()

Properties

childCount → int
Returns total number of child nodes in this container.
no setterinherited
children → LinkedList<Node>
List of children.
no setterinherited
defaultChild → Leaf
Returns an instance of default child for this container node.
no setter
documentOffset → int
Offset in characters of this node in the document.
no setterinherited
first → Node?
Returns the first child Node.
no setterinherited
hasEmbed → bool
Returns true if this line contains an embedded object.
no setter
hashCode → int
The hash code for this object.
no setterinherited
isEmpty → bool
Returns true if this container has no child nodes.
no setterinherited
isFirst → bool
Returns true if this node is the first node in the parent list.
no setterinherited
isLast → bool
Returns true if this node is the last node in the parent list.
no setterinherited
isNotEmpty → bool
Returns true if this container has at least 1 child.
no setterinherited
last → Node
Returns the last child Node.
no setterinherited
length → int
Length of this node in characters.
no setter
list → LinkedList<Node>?
The linked list containing this element.
no setterinherited
next → Node?
The successor of this element in its linked list.
no setterinherited
nextLine → Line?
Returns next Line or null if this is the last line in the document.
no setter
offset → int
Offset in characters of this node relative to parent node.
no setterinherited
parent ↔ QuillContainer<Node?>?
Current parent of this node. May be null if this node is not mounted.
getter/setter pairinherited
previous → Node?
The predecessor of this element in its linked list.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
style → Style
The style attributes Note: This is not the same as style attribute of css
no setterinherited

Methods

add(Leaf? node) → void
Adds node to the end of this container children list.
inherited
addFirst(Leaf? node) → void
Adds node to the beginning of this container children list.
inherited
adjust() → void
inherited
applyAttribute(Attribute attribute) → void
inherited
applyStyle(Style value) → void
inherited
clearLengthCache() → void
inherited
clearOffsetCache() → void
inherited
clearStyle() → void
inherited
clone() → Node
inherited
collectAllIndividualStylesAndEmbed(int offset, int len, {int beg = 0}) → List<OffsetValue>
Returns each node segment's offset in selection with its corresponding style or embed as a list
collectAllStyles(int offset, int len) → List<Style>
Returns all styles for any character within the specified text range. In essence, it is UNION of each individual segment's styles
collectAllStylesWithOffsets(int offset, int len, {int beg = 0}) → List<OffsetValue<Style>>
Returns all styles for any character within the specified text range.
collectStyle(int offset, int len) → Style
Returns style for specified text range.
containsOffset(int offset) → bool
Returns true if this node contains character at specified offset in the document.
inherited
delete(int index, int? len) → void
getPlainText(int offset, int len, {Iterable<EmbedBuilder>? embedBuilders, EmbedBuilder? unknownEmbedBuilder}) → String
Returns plain text within the specified text range.
insert(int index, Object data, Style? style) → void
insertAfter(Node entry) → void
Insert an element after this element in this element's linked list.
inherited
insertBefore(Node entry) → void
Insert an element before this element in this element's linked list.
inherited
moveChildToNewParent(QuillContainer<Node?>? newParent) → void
Moves children of this node to newParent.
inherited
newInstance() → Node
abstract methods begin
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
queryChild(int offset, bool inclusive) → ChildQuery
Queries the child Node at offset in this container.
inherited
remove(Leaf? node) → void
Removes node from this container.
inherited
retain(int index, int? len, Style? style) → void
toDelta() → Delta
override
toPlainText([Iterable<EmbedBuilder>? embedBuilders, EmbedBuilder? unknownEmbedBuilder]) → String
toString() → String
A string representation of this object.
Unlink the element from its linked list.
inherited

Operators

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