inList static method

AskValidator inList(
  1. List<Object> validItems, {
  2. bool caseSensitive = false,
})

Checks that the input matches one of the provided validItems. If the validator fails it prints out the list of available inputs. By default caseSensitive matches are off.

Implementation

static AskValidator inList(
  List<Object> validItems, {
  bool caseSensitive = false,
}) =>
    _AskValidatorList(validItems, caseSensitive: caseSensitive);