copyWith method
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,
);