transformAttributes static method
Transforms two attribute sets.
Implementation
static Map<String, dynamic>? transformAttributes(
Map<String, dynamic>? a, Map<String, dynamic>? b, bool priority) {
if (a == null) return b;
if (b == null) return null;
if (!priority) return b;
final result = b.keys.fold<Map<String, dynamic>>({}, (attributes, key) {
if (!a.containsKey(key)) attributes[key] = b[key];
return attributes;
});
return result.isEmpty ? null : result;
}