copyWith method

  1. @override
StrokeLayer copyWith({
  1. double? blur,
  2. double? dx,
  3. double? dy,
  4. double? opacity,
  5. SceneLayerBox? box,
  6. SceneBlendMode? blend,
  7. double? width,
  8. SceneStrokeJoin? join,
})
override

This pass with the fields given changed and the rest kept. Every edit and every rescale goes through here, so a field added to a pass is carried by all of them rather than dropped by whichever call site respelled the constructor and forgot it.

Implementation

@override
StrokeLayer copyWith({
  double? blur,
  double? dx,
  double? dy,
  double? opacity,
  SceneLayerBox? box,
  SceneBlendMode? blend,
  double? width,
  SceneStrokeJoin? join,
}) => StrokeLayer(
  width: width ?? this.width,
  join: join ?? this.join,
  paint: paint,
  blur: blur ?? this.blur,
  dx: dx ?? this.dx,
  dy: dy ?? this.dy,
  opacity: opacity ?? this.opacity,
  box: box ?? this.box,
  blend: blend ?? this.blend,
);