Embed class Null safety

An embed node inside of a line in a Quill document.

Embed node is a leaf node similar to Text. It represents an arbitrary piece of non-textual content embedded into a document, such as, image, horizontal rule, video, or any other object with defined structure, like a tweet, for instance.

Embed node's length is always 1 character and it is represented with unicode object replacement character in the document text.

Any inline style can be applied to an embed, however this does not necessarily mean the embed will look according to that style. For instance, applying "bold" style to an image gives no effect, while adding a "link" to an image actually makes the image react to user's action.

Inheritance

Constructors

Embed(Embeddable data)

Properties

documentOffset int
Offset in characters of this node in the document.
read-only, inherited
hashCode int
The hash code for this object. [...]
read-only, inherited
isFirst bool
Returns true if this node is the first node in the parent list.
read-only, inherited
isLast bool
Returns true if this node is the last node in the parent list.
read-only, inherited
length int
Length of this node in characters.
read-only, inherited
list LinkedList<Node>?
The linked list containing this element. [...]
read-only, inherited
next → Node?
The successor of this element in its linked list. [...]
read-only, inherited
offset int
Offset in characters of this node relative to parent node. [...]
read-only, inherited
parent ↔ Line?
Current parent of this node. May be null if this node is not mounted.
read / write, inherited
previous → Node?
The predecessor of this element in its linked list. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
style Style
read-only, inherited
value Embeddable
Contents of this node, either a String if this is a Text or an Embed if this is an BlockEmbed.
read-only, override

Methods

adjust() → void
Adjust this text node by merging it with adjacent nodes if they share the same style.
inherited
applyAttribute(Attribute attribute) → void
inherited
applyStyle(Style value) → void
inherited
clearStyle() → void
inherited
clone() → Node
inherited
containsOffset(int offset) bool
Returns true if this node contains character at specified offset in the document.
inherited
cutAt(int index) Leaf?
Cuts a leaf from index to the end of this node and returns new node in detached state (e.g. mounted returns false). [...]
inherited
delete(int index, int? len) → void
inherited
format(Style? style) → void
Formats this node and optimizes it with adjacent leaf nodes if needed.
inherited
insert(int index, Object data, Style? style) → void
inherited
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
newInstance() → Node
abstract methods begin
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
retain(int index, int? len, Style? style) → void
inherited
splitAt(int index) Leaf?
Splits this leaf node at index and returns new node. [...]
inherited
toDelta() Delta
inherited
toPlainText() String
toString() String
A string representation of this object. [...]
override
Unlink the element from its linked list. [...]
inherited

Operators

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

Constants

kObjectReplacementCharacter → const String
'\uFFFC'
kObjectReplacementInt → const int
65532