copyWith method

SendStory copyWith({
  1. int? chatId,
  2. InputStoryContent? content,
  3. InputStoryAreas? areas()?,
  4. FormattedText? caption()?,
  5. StoryPrivacySettings? privacySettings,
  6. int? activePeriod,
  7. StoryFullId? fromStoryFullId,
  8. bool? isPinned,
  9. 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,
    );