ask method
Use this method to retrieve the results from your CLI dialog. A map is being returned which you can query using your keys.
final dialog = CLI_Dialog();
dialog.addQuestion('What is your name?', 'name');
var answers = dialog.ask();
print('Your name is ${answers["name"]}');
Implementation
Map ask() {
_navigationIndex = 0; // reset navigation
if (order == null) {
_standardOrder();
} else {
_customOrder();
}
return answers;
}