getUserInput static method

Future<String> getUserInput({
  1. required String promptBuilder(
    1. String?,
    2. int?
    ),
  2. String? defaultValue,
  3. Duration? timeOut,
})

Ask for user input asynchronously, You can add a timeout period and a default value (When the timeout runs or when he enters an empty value).

Implementation

static Future<String> getUserInput({
  required String Function(String?, int?) promptBuilder,
  String? defaultValue,
  Duration? timeOut,
}) async =>
    await getUserInputImpl(promptBuilder,
        defaultValue: defaultValue, timeOut: timeOut);