promptYesNo static method
Prompts the user with a yes/no question on stdin.
Implementation
static bool promptYesNo(String question, {bool defaultYes = true}) {
final suffix = defaultYes ? '[Y/n]' : '[y/N]';
stdout.write('$question $suffix ');
final input = stdin.readLineSync()?.trim().toLowerCase() ?? '';
if (input.isEmpty) return defaultYes;
return input == 'y' || input == 'yes';
}