confirm method

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

Prompts the user for a Yes/No confirmation.

Implementation

bool confirm(String message, {bool defaultValue = false}) {
  final selection = _logger.chooseOne(
    message,
    choices: ['Yes', 'No'],
    defaultValue: defaultValue ? 'Yes' : 'No',
  );
  return selection == 'Yes';
}