selectOneTUI function

String? selectOneTUI(
  1. String message,
  2. List<String> choices, {
  3. String? defaultValue,
})

TUI-enhanced single-choice selection.

Uses mason_logger for arrow-key navigation when TUI is enabled. Falls back to numbered list selection when TUI is disabled.

message The selection prompt message. choices List of options to choose from. defaultValue The default selection.

Returns the selected option or null if cancelled.

Implementation

String? selectOneTUI(
  String message,
  List<String> choices, {
  String? defaultValue,
}) {
  if (choices.isEmpty) {
    errorMessage('No choices available');
    return null;
  }

  return chooseOneWithTUI(message, choices, defaultValue: defaultValue);
}