isEqualsDeep function
Returns true
if o1
and o2
are equals deeply.
Implementation
bool isEqualsDeep(Object? o1, Object? o2) {
if (identical(o1, o2)) return true;
if (o1 is List) {
if (o2 is List) {
return isEquivalentList(o1, o2, deep: true);
}
return false;
} else if (o1 is Map) {
if (o2 is Map) {
return isEquivalentMap(o1, o2, deep: true);
}
return false;
}
return o1 == o2;
}