merge method
merge other
into this preset. Works as copyWith
with all it's entry arguments assigned to other
's
corresponding fields.
Implementation
@override
Chrome merge(other) {
//...
return Chrome(
swatch: other?._swatch ?? _swatch,
foreground: other?.foreground ?? foreground,
background: other?.background ?? background,
//...surface
primary: other?.primary ?? primary,
secondary: other?.secondary ?? secondary,
ascent: other?.ascent ?? ascent,
//...on surface
onPrimary: other?._primary ?? _primary,
onSecondary: other?._secondary ?? _secondary,
onAscent: other?._ascent ?? _ascent,
//...extras
success: other?.success ?? success,
error: other?.error ?? error,
warning: other?.warning ?? warning,
shade: other?.shade ?? shade,
tint: other?.tint ?? tint,
);
}