terminalCursor property

Cursor? get terminalCursor

Returns a Cursor for rendering a real cursor in a TUI program. This requires that useVirtualCursor is set to false.

Implementation

Cursor? get terminalCursor {
  if (useVirtualCursor || !_focused) return null;

  // This is a simplified calculation. Real textarea would need to account
  // for scrolling, line numbers, and soft wrapping.
  final promptWidth = _getPromptWidth(0);
  final x = _col + promptWidth;
  final y = _row;

  return Cursor(
    position: Position(x, y),
    color: styles.cursor.color,
    shape: styles.cursor.shape,
    blink: styles.cursor.blink,
  );
}