promptForValueInput method

  1. @override
Future<int> promptForValueInput(
  1. String message, {
  2. int defaultValue = 0,
})
override

Implementation

@override
Future<int> promptForValueInput(String message,
    {int defaultValue = 0}) async {
  stdout.write("$message (default: $defaultValue): ");
  String input = stdin.readLineSync()!;
  return input.isNotEmpty ? int.parse(input) : defaultValue;
}