copyWith method
Returns a copy of this object with its field values replaced by the ones provided to this method.
Implementation
@override
FaderPainterData copyWith({
FaderBehavior? behavior,
List<Color>? colors,
}) {
return FaderPainterData(
behavior: behavior ?? this.behavior,
colors: colors ?? List.from(this.colors),
);
}