This commit is contained in:
parent
6d2023ba1b
commit
ea876bd55c
@ -364,25 +364,26 @@ Map<String, dynamic> getChanged(
|
|||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, dynamic> changedSettings = {};
|
Map<String, dynamic> changed = {};
|
||||||
original.forEach((key, value) {
|
original.forEach((key, value) {
|
||||||
if (DeepCollectionEquality().equals(value, updated[key])) {
|
if (DeepCollectionEquality().equals(value, updated[key])) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (value is Map<String, dynamic>) {
|
if (value is Map<String, dynamic>) {
|
||||||
changedSettings[key] = <String, dynamic>{};
|
changed[key] = <String, dynamic>{};
|
||||||
value.forEach((subKey, subValue) {
|
value.forEach((subKey, subValue) {
|
||||||
if (DeepCollectionEquality().equals(subValue, updated[key][subKey])) {
|
if (DeepCollectionEquality().equals(subValue, updated[key][subKey])) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
changedSettings[key][subKey] = updated[key][subKey];
|
changed[key][subKey] = updated[key][subKey];
|
||||||
});
|
});
|
||||||
} else {
|
return;
|
||||||
changedSettings[key] = updated[key];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
changed[key] = updated[key];
|
||||||
});
|
});
|
||||||
|
|
||||||
return changedSettings;
|
return changed;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user