equalsTo method

bool equalsTo(
  1. Set<T>? other
)

Whether current set equals to other.

Implementation

bool equalsTo(Set<T>? other) {
  if (other == null || length != other.length) {
    return false;
  }
  if (identical(this, other)) {
    return true;
  }
  for (final value in this) {
    if (!other.contains(value)) {
      return false;
    }
  }
  return true;
}