copyWith method

MessageEffect copyWith({
  1. int? id,
  2. Sticker? staticIcon()?,
  3. String? emoji,
  4. bool? isPremium,
  5. MessageEffectType? type,
  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

MessageEffect copyWith({
  int? id,
  Sticker? Function()? staticIcon,
  String? emoji,
  bool? isPremium,
  MessageEffectType? type,
  dynamic extra,
  int? clientId,
}) => MessageEffect(
  id: id ?? this.id,
  staticIcon: staticIcon != null ? staticIcon() : this.staticIcon,
  emoji: emoji ?? this.emoji,
  isPremium: isPremium ?? this.isPremium,
  type: type ?? this.type,
  extra: extra ?? this.extra,
  clientId: clientId ?? this.clientId,
);