cursorMove function

String cursorMove(
  1. int x,
  2. int y
)

Implementation

String cursorMove(int x, int y) {
  final move = StringBuffer();
  // dart format off
  // ignore: curly_braces_in_flow_control_structures
  if (x < 0) move.write(cursorBackward(-x));
  // ignore: curly_braces_in_flow_control_structures
  else if (x > 0) move.write(cursorForward(x));
  // ignore: curly_braces_in_flow_control_structures
  if (y < 0) move.write(cursorUp(-y));
  // ignore: curly_braces_in_flow_control_structures
  else if (y > 0) move.write(cursorDown(y));
  // dart format on
  return move.toString();
}