isIn function

bool isIn(
  1. String str,
  2. Iterable<String> values
)

Checks if the string is one of the values.

Example:

isIn('red', ['red', 'green', 'blue']); // true
isIn('yellow', ['red', 'green', 'blue']); // false

Implementation

bool isIn(String str, Iterable<String> values) => _isIn(str, values);