confirm method

Future<bool> confirm(
  1. String? message, {
  2. bool defaultValue = false,
})

Asks a yes / no question. Enter returns defaultValue.

Implementation

Future<bool> confirm(String? message, {bool defaultValue = false}) async =>
    await _ask(() => promptConfirm('$message',
        defaultValue: defaultValue, options: _options)) ??
    defaultValue;