promptWithTUI function
Enhanced prompt with TUI support
Falls back to basic stdin prompt if TUI is disabled.
The defaultValue is shown in brackets and used if user presses Enter.
Implementation
String promptWithTUI(
String message, {
String? defaultValue,
bool hidden = false,
}) {
if (!_tuiEnabled || !_isTTY()) {
return _basicPrompt(message, defaultValue: defaultValue, hidden: hidden);
}
return tuiLogger.prompt(message, defaultValue: defaultValue, hidden: hidden);
}