copyWith method

  1. @override
ImageDrawable copyWith({
  1. bool? hidden,
  2. Set<ObjectDrawableAssist>? assists,
  3. Offset? position,
  4. double? rotation,
  5. double? scale,
  6. Image? image,
  7. bool? flipped,
  8. bool? locked,
})
override

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

Implementation

@override
ImageDrawable copyWith(
    {bool? hidden,
    Set<ObjectDrawableAssist>? assists,
    Offset? position,
    double? rotation,
    double? scale,
    Image? image,
    bool? flipped,
    bool? locked}) {
  return ImageDrawable(
    hidden: hidden ?? this.hidden,
    assists: assists ?? this.assists,
    position: position ?? this.position,
    rotationAngle: rotation ?? rotationAngle,
    scale: scale ?? this.scale,
    image: image ?? this.image,
    flipped: flipped ?? this.flipped,
    locked: locked ?? this.locked,
  );
}