equals<T> static method
Check whether the two arrays/lists are equal (element-wise).
Returns true if a and b have the same length and every element
at the same index is equal (same object or ==).
Implementation
static bool equals<T>(List<T> a, List<T> b) {
if (identical(a, b)) {
// same object
return true;
} else if (a.length != b.length) {
// different size
return false;
}
for (int index = 0; index < a.length; ++index) {
// check values
if (a[index] != b[index]) {
return false;
}
}
return true;
}