showMenuGetValue static method

Future<String> showMenuGetValue(
  1. String title,
  2. List<String> options, {
  3. int? defaultIndex,
})

Show a menu and return the selected option string

Implementation

static Future<String> showMenuGetValue(
  String title,
  List<String> options, {
  int? defaultIndex,
}) async {
  final int index = await showMenu(title, options, defaultIndex: defaultIndex);
  return options[index];
}