copyWith method

StickerLayerData copyWith({
  1. Widget? sticker,
  2. Offset? offset,
  3. double? rotation,
  4. double? scale,
  5. String? id,
  6. bool? flipX,
  7. bool? flipY,
  8. bool? enableInteraction,
})

Creates a new instance of StickerLayerData with modified properties.

Each property of the new instance can be replaced by providing a value to the corresponding parameter of this method. Unprovided parameters will default to the current instance's values.

Implementation

StickerLayerData copyWith({
  Widget? sticker,
  Offset? offset,
  double? rotation,
  double? scale,
  String? id,
  bool? flipX,
  bool? flipY,
  bool? enableInteraction,
}) {
  return StickerLayerData(
    sticker: sticker ?? this.sticker,
    offset: offset ?? this.offset,
    rotation: rotation ?? this.rotation,
    scale: scale ?? this.scale,
    id: id ?? this.id,
    flipX: flipX ?? this.flipX,
    flipY: flipY ?? this.flipY,
    enableInteraction: enableInteraction ?? this.enableInteraction,
  );
}