getRtlSegments method

List<(int, int)> getRtlSegments()

Get only RTL segments (useful for rendering)

Implementation

List<(int start, int end)> getRtlSegments() {
  return bidiSegments
      .where((s) => s.direction == TextDirection.rtl)
      .map((s) => (s.start, s.end))
      .toList();
}