INNER CODE UNIT · Dart
selected
livekit/client-sdk-flutter · scripts/create_change.dart:120
selected = (selected + 1) % options.length;
}
} else if (key.length == 1 && (key[0] == 10 || key[0] == 13)) {
// Enter
stdout.write(_showCursor);
// Clear the list and show selection
stdout.write('${_esc}${options.length}A'); // Move up
stdout.write('${_esc}0J'); // Clear from cursor down
stdout.writeln(' $_green>${_reset} $_bold${options[selected]}$_reset');
return options[selected];
} else if (key.length == 1 && (key[0] == 3 || key[0] == 27)) {
// Ctrl+C or Escape
stdout.write(_showCursor);
exit(0);
}
// Redraw
stdout.write('${_esc}${options.length}A'); // Move up to start of list