copyWith method

  1. @override
RectangleDrawable copyWith({
  1. bool? hidden,
  2. Set<ObjectDrawableAssist>? assists,
  3. Offset? position,
  4. double? rotation,
  5. double? scale,
  6. Size? size,
  7. Paint? paint,
  8. bool? locked,
  9. BorderRadius? borderRadius,
})

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

Implementation

@override
RectangleDrawable copyWith({
  bool? hidden,
  Set<ObjectDrawableAssist>? assists,
  Offset? position,
  double? rotation,
  double? scale,
  Size? size,
  Paint? paint,
  bool? locked,
  BorderRadius? borderRadius,
}) {
  return RectangleDrawable(
    hidden: hidden ?? this.hidden,
    assists: assists ?? this.assists,
    position: position ?? this.position,
    rotationAngle: rotation ?? rotationAngle,
    scale: scale ?? this.scale,
    size: size ?? this.size,
    paint: paint ?? this.paint,
    locked: locked ?? this.locked,
    borderRadius: borderRadius ?? this.borderRadius,
  );
}