setCursorShape method

  1. @override
void setCursorShape(
  1. int style
)
override

Implementation

@override
void setCursorShape(int style) {
  if (style == 0) {
    _modes._applicationCursorType = null;
    _modes._cursorBlinkMode = false;
    return;
  }

  _modes._applicationCursorType = switch (style) {
    1 || 2 => TerminalCursorType.block,
    3 || 4 => TerminalCursorType.underline,
    5 || 6 => TerminalCursorType.verticalBar,
    _ => _modes._applicationCursorType,
  };
  if (style < 1 || style > 6) return;
  _modes._cursorBlinkMode = style.isOdd;
}