copyWith method

  1. @override
FaderPainterData copyWith({
  1. FaderBehavior? behavior,
  2. List<Color>? colors,
})
override

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),
  );
}