copyWith method

  1. @override
ScrollerPainterData copyWith({
  1. ScrollDirection? direction,
  2. ScrollerShape? shape,
  3. Color? backgroundColor,
  4. Color? color,
  5. double? shapeWidth,
  6. double? spaceBetweenShapes,
  7. bool? fadeEdges,
  8. ScrollerShapeOffset? shapeOffset,
})
override

Returns a copy of this object with its field values replaced by the ones provided to this method.

Implementation

@override
ScrollerPainterData copyWith({
  ScrollDirection? direction,
  ScrollerShape? shape,
  Color? backgroundColor,
  Color? color,
  double? shapeWidth,
  double? spaceBetweenShapes,
  bool? fadeEdges,
  ScrollerShapeOffset? shapeOffset,
}) {
  return ScrollerPainterData(
    direction: direction ?? this.direction,
    shape: shape ?? this.shape,
    backgroundColor: backgroundColor ?? this.backgroundColor,
    color: color ?? this.color,
    shapeWidth: shapeWidth ?? this.shapeWidth,
    spaceBetweenShapes: spaceBetweenShapes ?? this.spaceBetweenShapes,
    fadeEdges: fadeEdges ?? this.fadeEdges,
    shapeOffset: shapeOffset ?? this.shapeOffset,
  );
}