choose method

Answer choose()

Implementation

Answer choose() {
  // final dialog = CLI_Dialog(listQuestions: [
  //   [
  //     {'question': title, 'options': choices},
  //     'result'
  //   ]
  // ]);

  // final answer = dialog.ask();
  // final result = answer['result'] as String;
  print("");
  final result = menu(title, options: choices, defaultOption: choices[0]);
  final index = choices.indexOf(result);

  return Answer(result: result, index: index);
}