contains method Null safety

bool contains(
  1. T element
)

Implementation

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