copyWith method

ShapeSettings copyWith({
  1. ShapeFactory<ShapeDrawable>? factory = _NoShapePassedFactory.instance,
  2. bool? drawOnce,
  3. Paint? paint,
})

Creates a copy of this but with the given fields replaced with the new values.

Implementation

ShapeSettings copyWith({
  ShapeFactory? factory = _NoShapePassedFactory.instance,
  bool? drawOnce,
  Paint? paint,
}) =>
    ShapeSettings(
      factory:
          factory == _NoShapePassedFactory.instance ? this.factory : factory,
      drawOnce: drawOnce ?? this.drawOnce,
      paint: paint ?? this.paint,
    );