askMultiSelectNames static method

Future<List<String>> askMultiSelectNames(
  1. String title,
  2. List<String> options, {
  3. List<String>? defaultSelected,
})

Multi-select that returns the selected option names

Implementation

static Future<List<String>> askMultiSelectNames(
  String title,
  List<String> options, {
  List<String>? defaultSelected,
}) async {
  final List<int> indices = await askMultiSelect(
    title,
    options,
    defaultSelected: defaultSelected,
  );
  return indices.map((int i) => options[i]).toList();
}