copyWith method
PostStory
copyWith({
- int? chatId,
- InputStoryContent? content,
- InputStoryAreas? areas()?,
- FormattedText? caption()?,
- InputAudio? music()?,
- StoryPrivacySettings? privacySettings,
- List<
int> ? albumIds, - int? activePeriod,
- StoryFullId? fromStoryFullId()?,
- bool? isPostedToChatPage,
- 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
PostStory copyWith({
int? chatId,
InputStoryContent? content,
InputStoryAreas? Function()? areas,
FormattedText? Function()? caption,
InputAudio? Function()? music,
StoryPrivacySettings? privacySettings,
List<int>? albumIds,
int? activePeriod,
StoryFullId? Function()? fromStoryFullId,
bool? isPostedToChatPage,
bool? protectContent,
}) => PostStory(
chatId: chatId ?? this.chatId,
content: content ?? this.content,
areas: areas != null ? areas() : this.areas,
caption: caption != null ? caption() : this.caption,
music: music != null ? music() : this.music,
privacySettings: privacySettings ?? this.privacySettings,
albumIds: albumIds ?? this.albumIds,
activePeriod: activePeriod ?? this.activePeriod,
fromStoryFullId: fromStoryFullId != null
? fromStoryFullId()
: this.fromStoryFullId,
isPostedToChatPage: isPostedToChatPage ?? this.isPostedToChatPage,
protectContent: protectContent ?? this.protectContent,
);