equals method

bool equals(
  1. List<T> other
)

Determines if the contents of this list and other are equal.

Implementation

bool equals(List<T> other) {
  if (identical(this, other)) {
    return true;
  }

  if (length != other.length) {
    return false;
  }

  for (var i = 0; i < length; i++) {
    if (this[i] != other[i]) {
      return false;
    }
  }

  return true;
}