currentLineIndex property
Gets or sets the current line where the cursor is located.
Implementation
int get currentLineIndex => value.currentLineIndex;
Implementation
set currentLineIndex(int value) {
var cursorPosition = lines.take(value.clamp(0, lines.length - 1).clampMin(0)).join(breakline).length;
selection = TextSelection.collapsed(offset: cursorPosition);
}