copyWith method

EmojiReaction copyWith({
  1. String? emoji,
  2. String? title,
  3. bool? isActive,
  4. Sticker? staticIcon,
  5. Sticker? appearAnimation,
  6. Sticker? selectAnimation,
  7. Sticker? activateAnimation,
  8. Sticker? effectAnimation,
  9. Sticker? aroundAnimation()?,
  10. Sticker? centerAnimation()?,
  11. dynamic extra,
  12. 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

EmojiReaction copyWith({
  String? emoji,
  String? title,
  bool? isActive,
  Sticker? staticIcon,
  Sticker? appearAnimation,
  Sticker? selectAnimation,
  Sticker? activateAnimation,
  Sticker? effectAnimation,
  Sticker? Function()? aroundAnimation,
  Sticker? Function()? centerAnimation,
  dynamic extra,
  int? clientId,
}) => EmojiReaction(
  emoji: emoji ?? this.emoji,
  title: title ?? this.title,
  isActive: isActive ?? this.isActive,
  staticIcon: staticIcon ?? this.staticIcon,
  appearAnimation: appearAnimation ?? this.appearAnimation,
  selectAnimation: selectAnimation ?? this.selectAnimation,
  activateAnimation: activateAnimation ?? this.activateAnimation,
  effectAnimation: effectAnimation ?? this.effectAnimation,
  aroundAnimation: aroundAnimation != null
      ? aroundAnimation()
      : this.aroundAnimation,
  centerAnimation: centerAnimation != null
      ? centerAnimation()
      : this.centerAnimation,
  extra: extra ?? this.extra,
  clientId: clientId ?? this.clientId,
);