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
StickerSetInfo copyWith({
int? id,
String? title,
String? name,
Thumbnail? Function()? thumbnail,
Outline? Function()? thumbnailOutline,
bool? isOwned,
bool? isInstalled,
bool? isArchived,
bool? isOfficial,
StickerType? stickerType,
bool? needsRepainting,
bool? isAllowedAsChatEmojiStatus,
bool? isViewed,
int? size,
List<Sticker>? covers,
}) => StickerSetInfo(
id: id ?? this.id,
title: title ?? this.title,
name: name ?? this.name,
thumbnail: thumbnail != null ? thumbnail() : this.thumbnail,
thumbnailOutline: thumbnailOutline != null
? thumbnailOutline()
: this.thumbnailOutline,
isOwned: isOwned ?? this.isOwned,
isInstalled: isInstalled ?? this.isInstalled,
isArchived: isArchived ?? this.isArchived,
isOfficial: isOfficial ?? this.isOfficial,
stickerType: stickerType ?? this.stickerType,
needsRepainting: needsRepainting ?? this.needsRepainting,
isAllowedAsChatEmojiStatus:
isAllowedAsChatEmojiStatus ?? this.isAllowedAsChatEmojiStatus,
isViewed: isViewed ?? this.isViewed,
size: size ?? this.size,
covers: covers ?? this.covers,
);