merge method
Creates a copy of this SheetStyleByVariant but with the given fields replaced with the new values.
Implementation
SheetStyleByVariant merge(SheetStyleByVariant? variants) {
final entries = SheetVariant.values.map((key) {
final other = variants?[key];
final style = this[key]?.merge(other) ?? other;
return MapEntry(key, style);
});
return Map.fromEntries(entries);
}