isAnyOf method

bool isAnyOf(
  1. List<String> items
)

Returns true if this string is equal to any string in items.

Example:

'apple'.isAnyOf(['orange', 'apple', 'banana']); // returns: true

Implementation

bool isAnyOf(List<String> items) {
  return items.contains(this);
}