confirm method
Prompts user with a yes/no question.
Implementation
bool confirm(String message, {bool defaultValue = false}) {
info(message);
final input = stdin.readLineSync()?.trim();
final response = input == null || input.isEmpty
? defaultValue
: input.toBoolean() ?? defaultValue;
stdout.writeln('$message: ${response ? 'Yes' : 'No'}');
return response;
}