select method

int select(
  1. String msg,
  2. List<String> options
)

Prompts the user to select one option from a list of options.

Returns the 0-based index of the selected option.

Implementation

int select(String msg, List<String> options) =>
    Select(prompt: msg, options: options).interact();