shouldUpdateGlobalExtraProperty static method
bool
shouldUpdateGlobalExtraProperty(
- String incomingPropertyKey,
- TBLExtraPropertyWithLevel incomingExtraProperty,
- Map<
String, TBLExtraPropertyWithLevel> _globalExtraProperties
Determines if a global extra property should be updated.
Returns true if:
- Property doesn't exist globally, or
- Property exists but has a different value
This prevents unnecessary updates when values haven't changed.
Implementation
static bool shouldUpdateGlobalExtraProperty(
String incomingPropertyKey,
TBLExtraPropertyWithLevel incomingExtraProperty,
Map<String, TBLExtraPropertyWithLevel> _globalExtraProperties) {
final globalExtraPropertyWithKey = _globalExtraProperties[incomingPropertyKey];
if (globalExtraPropertyWithKey == null) {
return true;
}
return _isPropertyValueDifferentThanExisting(
globalExtraPropertyWithKey.value, incomingExtraProperty.value);
}