Rope class

A high-fanout B-tree rope.

Leaves contain bounded Unicode chunks. Internal nodes cache character and newline counts, allowing edits and line/character seeks to descend the tree without materialising the document.

Constructors

Rope([String initialText = ''])

Properties

bidiSegments → List<BiDiSegment>
no setter
cachedLines → List<String>
no setter
containsRtl → bool
no setter
core → Rope
no setter
hashCode → int
The hash code for this object.
no setterinherited
isLtr → bool
no setter
isMixed → bool
no setter
isRtl → bool
no setter
length → int
no setter
lineCount → int
no setter
lines → Iterable<String>
no setter
primaryDirection → TextDirection
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
selection → TextSelection
no setter
textDirection → TextDirection
no setter

Methods

cachedLinesRange(int startLine, int endLine) → List<String>
charAt(int position) → String
concatImmutable(Rope other) → Rope
copy() → Rope
delete(int start, int end) → void
deleteImmutable(int start, int end) → Rope
findLineEnd(int offset) → int
findLineStart(int offset) → int
getBiDiSegmentsForLine(int lineIndex) → List<BiDiSegment>
getBiDiSegmentsInRange(int start, int end) → List<BiDiSegment>
getLineAtOffset(int charOffset) → int
getLineStartOffset(int lineIndex) → int
getLineText(int lineIndex) → String
getRtlSegments() → List<(int, int)>
getText() → String
insert(int position, String text) → void
insertImmutable(int position, String text) → Rope
lineLengthAt(int lineIndex) → int
lineLengths() → List<int>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
replaceRangeAndUpdateSelection({required int start, required int end, required String replacement, required bool preserveOldCursor, required int oldBase, required int oldExtent}) → SelectionState
setSelection(TextSelection value) → void
slice(int start, int end) → String
splitImmutable(int position) → (Rope, Rope)
substring(int start, [int? end]) → String
toString() → String
A string representation of this object.
inherited
toStringWithBiDiControls() → String

Operators

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