composeAttributes function
Implementation
Attributes? composeAttributes(
Attributes? base,
Attributes? other, {
keepNull = false,
}) {
base ??= {};
other ??= {};
Attributes attributes = {
...base,
...other,
};
if (!keepNull) {
attributes = Attributes.from(attributes)
..removeWhere((_, value) => value == null);
}
return attributes.isNotEmpty ? attributes : null;
}