mapContainEqual static method
Implementation
static bool mapContainEqual(Map json1, Map json2) {
var isContain = true;
json2.forEach((key, value) {
if (json1.containsKey(key)) {
var tempValue = json1[key];
if (tempValue.runtimeType == value.runtimeType) {
if (value is List) {
var temp = compareList(tempValue, value);
if (!temp) {
isContain = false;
}
} else if (value is Map) {
var temp = mapContainEqual(tempValue, value);
if (!temp) {
isContain = false;
}
} else if (tempValue != value) {
isContain = false;
}
} else {
isContain = false;
}
} else {
isContain = false;
}
});
return isContain;
}