contains method

bool contains(
  1. T element
)

Checks if this list contains the specified element.

Implementation

bool contains(T element) {
  final int length = this.length;
  for (int i = 0; i < length; i++) {
    if (_elementAt(i) == element) {
      return true;
    }
    if (length != this.length) {
      throw ConcurrentModificationError(this);
    }
  }
  return false;
}