FlutterDiagramTextLine class final
A view of one visual line in a retained, already-shaped paragraph. All offsets are UTF-16 offsets relative to this line, never document offsets.
- Implemented types
Constructors
- FlutterDiagramTextLine(TextPainter _paragraph, {required int start, required int end, required double top, required double height, double? emptyCaretX, double minWidth = 0, double maxWidth = double.infinity})
Properties
- emptyCaretX → double?
-
Empty paragraphs have geometry even when the backend reports no lines.
final
- end → int
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- height → double
-
final
- paragraphIdentity → Object
-
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- start → int
-
final
- top → double
-
final
-
visualCaretPositions
→ List<
DiagramTextPosition> -
Grapheme-boundary positions in visual left-to-right order for this line.
Equal visual locations may represent distinct logical positions.
latefinal
Methods
-
caretOffset(
int offset) → DiagramPoint -
override
-
caretPosition(
DiagramTextPosition position) → DiagramPoint -
Resolves an exact line-local UTF-16 position, including boundary affinity.
override
-
hitOffset(
DiagramPoint point) → int -
override
-
hitPosition(
DiagramPoint point) → DiagramTextPosition -
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
paintParagraph(
Canvas canvas, Offset lineOrigin, {ColorAdaptation adapt = ColorAdaptation.none}) → void -
Paints the shared paragraph; a non-identity
adaptpaints a copy with re-mapped colors and identical line layout. -
selectionBoxes(
int from, int to) → List< DiagramRect> -
override
-
toString(
) → String -
A string representation of this object.
inherited
-
wordBoundary(
int offset) → (int, int) -
override
-
wordBoundaryAt(
DiagramPoint point) → (int, int) -
Word containing the shaped glyph at a line-local point.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited