merge method
Merges this mix with the provided Style instances and returns the resulting Style.
This method combines the visual and variant attributes of this mix and the provided Style instances. If a null value is provided for any of the parameters, it is ignored.
This method combines the visual and variant attributes of this mix and the provided mix.
Implementation
Style merge(Style? style) {
if (style == null) return this;
final mergedStyles = styles.merge(style.styles);
final mergedVariants = variants.merge(style.variants);
return copyWith(styles: mergedStyles, variants: mergedVariants);
}