Asks the user questions in the terminal.
Every method throws an SmfCancelledException when the user cancels the question instead of answering it, such as with Ctrl-C, or when the input ends.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
confirm(
String message, {bool defaultValue = false}) → Future< bool> - Asks a yes or no question.
-
input(
String message, {String? defaultValue}) → Future< String> - Asks for a line of text.
-
multiSelect<
T extends Object> (String message, List< T> choices, {String display(T choice)?, List<T> defaultValues = const []}) → Future<List< T> > -
Asks the user to pick any number of
choices, shown withdisplay. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
select<
T extends Object> (String message, List< T> choices, {String display(T choice)?, T? defaultValue}) → Future<T> -
Asks the user to pick one of
choices, shown withdisplay. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited