equals method
does what you expect from ==
if the iterables are identical will return true
else false
Implementation
bool equals(M other) {
if (length != other.length) {
return false;
}
for (final entry in entries) {
if (!other.containsKey(entry.key)) {
return false;
}
if (other[entry.key] != entry.value) {
return false;
}
}
return true;
}