different method
Implementation
@override
bool different(a, b) {
if (a == null) {
return b != null;
} else if (b == null) {
return true;
} else if (identical(a, b)) {
// same object
return false;
} else if (a is Map) {
// check key-values
return !(b is Map && mapEquals(a, b));
} else if (a is List) {
// check items
return !(b is List && listEquals(a, b));
} else {
// other types
return a != b;
}
}