Rope class

Constructors

Rope([String initialText = ''])

Properties

bidiSegments List<BiDiSegment>
Get BiDi segments for the entire rope
no setter
cachedLines List<String>
no setter
containsRtl bool
Returns true if this rope contains any RTL characters
no setter
hashCode int
The hash code for this object.
no setterinherited
isLtr bool
Returns true if this rope is primarily LTR
no setter
isMixed bool
Returns true if this rope contains both RTL and LTR characters
no setter
isRtl bool
Returns true if this rope is primarily RTL
no setter
length int
no setter
lineCount int
no setter
lines Iterable<String>
no setter
primaryDirection TextDirection
Returns the primary direction based on character count For mixed text, returns the direction with more characters
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
textDirection TextDirection
Returns the overall text direction of this rope
no setter

Methods

charAt(int position) String
chunks() Iterable<String>
concatImmutable(Rope other) Rope
Creates a new Rope by concatenating another Rope (immutable)
copy() Rope
Creates a deep copy of this Rope
delete(int start, int end) → void
Mutable delete - modifies this rope in place For immutable version, use deleteImmutable
deleteImmutable(int start, int end) Rope
Creates a new Rope with text deleted between start and end (immutable)
findLineEnd(int offset) int
findLineStart(int offset) int
getBiDiSegmentsForLine(int lineIndex) List<BiDiSegment>
Get BiDi segments for a specific line
getBiDiSegmentsInRange(int start, int end) List<BiDiSegment>
Get BiDi segments within a character range
getLineAtOffset(int charOffset) int
getLineStartOffset(int lineIndex) int
getLineText(int lineIndex) String
getRtlSegments() List<(int, int)>
Get only RTL segments (useful for rendering)
getText() String
insert(int position, String text) → void
Mutable insert - modifies this rope in place For immutable version, use insertImmutable
insertImmutable(int position, String text) Rope
Creates a new Rope with text inserted at position (immutable)
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
splitImmutable(int position) → (Rope, Rope)
Splits this rope at position, returning two new Ropes (immutable)
substring(int start, [int? end]) String
toString() String
A string representation of this object.
inherited
toStringWithBiDiControls() String
Wrap text with appropriate BiDi control characters for rendering

Operators

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