copyWith method

AnimatedEmoji copyWith({
  1. Sticker? sticker()?,
  2. int? stickerWidth,
  3. int? stickerHeight,
  4. int? fitzpatrickType,
  5. File? sound()?,
  6. dynamic extra,
  7. int? clientId,
})

Returns a copy with the given fields replaced. For a nullable field pass a function, e.g. field: () => null to clear it.

Implementation

AnimatedEmoji copyWith({
  Sticker? Function()? sticker,
  int? stickerWidth,
  int? stickerHeight,
  int? fitzpatrickType,
  File? Function()? sound,
  dynamic extra,
  int? clientId,
}) =>
    AnimatedEmoji(
      sticker: sticker != null ? sticker() : this.sticker,
      stickerWidth: stickerWidth ?? this.stickerWidth,
      stickerHeight: stickerHeight ?? this.stickerHeight,
      fitzpatrickType: fitzpatrickType ?? this.fitzpatrickType,
      sound: sound != null ? sound() : this.sound,
      extra: extra ?? this.extra,
      clientId: clientId ?? this.clientId,
    );