ListChooser class

Implementation of list questions. Can be used without CLI_Dialog.

Constructors

ListChooser(List<String>? items, {bool navigationMode = false})
Default constructor for the list chooser. It is as simple as passing your items as a List of strings
ListChooser.std(StdinService _std_input, StdoutService _std_output, List<String>? items, {bool navigationMode = false})
Named constructor mostly for unit testing. For context and an example see CLI_Dialog, README.md and the test/ folder.

Properties

hashCode int
The hash code for this object.
no setterinherited
items List<String>?
The options which are presented to the user
getter/setter pair
Select the navigation mode. See dialog.dart for details.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

choose() String
Similar to ask this actually triggers the dialog and returns the chosen item = option.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited