copyWith method
SendStory
copyWith({
- int? chatId,
- InputStoryContent? content,
- InputStoryAreas? areas()?,
- FormattedText? caption()?,
- StoryPrivacySettings? privacySettings,
- int? activePeriod,
- StoryFullId? fromStoryFullId,
- bool? isPinned,
- bool? protectContent,
Returns a copy with the given fields replaced. For a nullable
field pass a function, e.g. field: () => null to clear it.
Implementation
SendStory copyWith({
int? chatId,
InputStoryContent? content,
InputStoryAreas? Function()? areas,
FormattedText? Function()? caption,
StoryPrivacySettings? privacySettings,
int? activePeriod,
StoryFullId? fromStoryFullId,
bool? isPinned,
bool? protectContent,
}) =>
SendStory(
chatId: chatId ?? this.chatId,
content: content ?? this.content,
areas: areas != null ? areas() : this.areas,
caption: caption != null ? caption() : this.caption,
privacySettings: privacySettings ?? this.privacySettings,
activePeriod: activePeriod ?? this.activePeriod,
fromStoryFullId: fromStoryFullId ?? this.fromStoryFullId,
isPinned: isPinned ?? this.isPinned,
protectContent: protectContent ?? this.protectContent,
);