equals method

bool equals(
  1. S other
)

does what you expect from == if the iterables are identical will return true else false

Implementation

bool equals(S other) {
  if (length != other.length) {
    return false;
  }
  for (var i = 0; i < length; ++i) {
    if (other.elementAt(i) != elementAt(i)) {
      return false;
    }
  }
  return true;
}