promptYesNo static method
Implementation
static Future<bool> promptYesNo(String question) async {
while (true) {
stdout.write('$question (Y/N): ');
String? input = stdin.readLineSync()?.trim().toLowerCase();
if (input == 'yes' || input == 'y') {
return true;
}
return false;
}
}