prompts library

Classes

Option
Object that represents an option in a select prompt.

Functions

confirm(String message, {bool? defaultValue, required Logger logger}) Future<bool>
Prompts the user to confirm an action. Returns true if the user confirms, false otherwise. If defaultValue is provided, the user can skip the prompt by pressing Enter.
input(String message, {String? defaultValue, required Logger logger}) Future<String>
Prompts the user for input. If defaultValue is provided, the user can skip the prompt by pressing Enter.
multiselect(String prompt, {required List<Option> options, required Logger logger}) Future<List<Option>>
Prompts the user to select multiple options from a list of options. If no options are selected the returned list will be empty.
select(String prompt, {required List<Option> options, required Logger logger}) Future<Option>
Prompts the user to select an option from a list of options.