setCursorPosition method

void setCursorPosition(
  1. int x,
  2. int y, {
  3. bool visible = true,
})

Set cursor position and visibility.

Dart render coordinates are zero-based terminal cells. OpenTUI's native cursor API follows ANSI cursor coordinates and is one-based, so convert at this boundary.

Implementation

void setCursorPosition(int x, int y, {bool visible = true}) {
  bindings.setCursorPosition(handle, x + 1, y + 1, visible);
}