TextNodeLayoutBuilder class abstract

Stateful helper that lays out an InlineTextNode one line at a time.

Lines may only be broken at whitespace, so pieces of adjacent nodes that touch without whitespace in between (like **Bold**,) form a single unbreakable run. leadingRunWidth, hasBreakOpportunity and the trailingWidth parameter of layOutNextLine let a parent keep such runs on the same line.

Constructors

TextNodeLayoutBuilder()

Properties

hasBreakOpportunity → bool
Whether the remaining content contains any whitespace a line could be broken at. If not, a run glued to its start continues past its end.
no setter
hashCode → int
The hash code for this object.
no setterinherited
isDone → bool
Whether all of the content has been laid out so far.
no setter
leadingRunWidth → double
The width of the remaining content up to its first whitespace (all of it if hasBreakOpportunity is false), which is glued to any content that precedes it without whitespace.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

layOutNextLine(double availableWidth, {required bool isStartOfLine, double trailingWidth = 0}) → InlineTextElement?
Lays out as much of the remaining content as fits in availableWidth, or returns null if not even its first word fits.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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