LineView class

A view representing a single line of text.

LineView is a container for the inline content of a line, including text spans and inline widgets.

Inheritance

Constructors

LineView()

Properties

breakAfter int
Line break after this view (0 or 1).
getter/setter pairinherited
children List<ContentView>
Child views.
final
flags int
Bit flags for dirty status.
getter/setter pairinherited
hashCode int
The hash code for this object.
no setterinherited
isEditable bool
Whether this view is editable.
no setterinherited
isHidden bool
Whether this view is hidden.
no setterinherited
isWidget bool
Whether this view is a widget.
no setterinherited
length int
The length of content this view represents.
getter/setter pairoverride-getter
parent ContentView?
Parent view in the tree.
getter/setter pairinherited
posAtEnd int
Get the position at the end of this view.
no setterinherited
posAtStart int
Get the position at the start of this view.
no setterinherited
rootView ContentView
Get the root view of the tree.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

append(ContentView content, int openStart) → void
Append content to this line.
become(ContentView other) bool
Try to become another view (reuse its content).
inherited
canReuseDOM(ContentView other) bool
Check if this view can reuse another view's DOM.
inherited
childCursor([int? pos]) ChildCursor
Get a cursor for iterating children from a position.
inherited
childPos(int pos, [int bias = 1]) ChildPos
Find the child at a position.
inherited
coordsAt(int pos, int side) EditorRect?
Get coordinates at a position within this view.
override
destroy() → void
Destroy this view and its children.
inherited
domBoundsAround(int from, int to, [int offset = 0]) ContentBounds?
Get bounds around a range within this view's subtree.
inherited
getSide() int
Get the side of this view (for zero-length views).
inherited
localPosFromAbsolute(int absPos) int
Find the local position from an absolute position.
inherited
markDirty([bool andParent = false]) → void
Mark this view as dirty.
inherited
markParentsDirty(bool childList) → void
Mark parent views as having dirty children.
inherited
measureTextSize() → ({double charWidth, double lineHeight, double textHeight})?
Measure text size using this line's content.
merge(int from, int to, ContentView? source, bool hasStart, int openStart, int openEnd) bool
Try to merge content from another view.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
posAfter(ContentView view) int
Get the position after a child view.
inherited
posBefore(ContentView view) int
Get the position before a child view.
inherited
replaceChildren(int from, int to, [List<ContentView>? newChildren]) → void
Replace a range of children with new children.
inherited
setParent(ContentView newParent) → void
Set the parent of this view.
inherited
split(int at) ContentView
Split this view at a position.
override
sync(dynamic view, {SyncTrack? track}) → void
Synchronize this view with its children.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

find(ContentView parent, int pos) LineView?
Find a line view containing a position.