promptConfirm function
Confirm action
Implementation
Future<bool> promptConfirm(String? text, {Stream<List<int>>? stdin}) async {
stdout.write('${(text?.isNotEmpty ?? false) ? '$text. ' : ''}Continue Y/N? ');
await stdout.safeFlush();
final input = await _promptGetText(stdin: stdin);
if (input.toLowerCase() != 'y') {
return false;
}
return true;
}