isEqualTo method
检查两个列表是否相同 >>>
Implementation
bool isEqualTo(List<T> other, {bool Function(T, T)? compare}) {
if (this.length != other.length) {
return false;
}
for (int i = 0; i < this.length; ++i) {
if (compare == null) {
if (this[i] != other[i]) {
return false;
}
} else {
if (!compare(this[i], other[i])) {
return false;
}
}
}
return true;
}