confirmWithTUI function

bool confirmWithTUI(
  1. String message, {
  2. bool defaultValue = false,
})

Enhanced confirmation prompt with TUI support

Returns true if user confirms (y/yes), false otherwise. Falls back to basic confirmation if TUI is disabled.

Implementation

bool confirmWithTUI(String message, {bool defaultValue = false}) {
  if (!_tuiEnabled || !_isTTY()) {
    return _basicConfirm(message, defaultValue: defaultValue);
  }

  return tuiLogger.confirm(message, defaultValue: defaultValue);
}