copyWith method

Story copyWith({
  1. int? id,
  2. int? posterChatId,
  3. MessageSender? posterId,
  4. int? date,
  5. bool? isBeingPosted,
  6. bool? isBeingEdited,
  7. bool? isEdited,
  8. bool? isPostedToChatPage,
  9. bool? isVisibleOnlyForSelf,
  10. bool? canBeAddedToAlbum,
  11. bool? canBeDeleted,
  12. bool? canBeEdited,
  13. bool? canBeForwarded,
  14. bool? canBeReplied,
  15. bool? canSetPrivacySettings,
  16. bool? canToggleIsPostedToChatPage,
  17. bool? canGetStatistics,
  18. bool? canGetInteractions,
  19. bool? hasExpiredViewers,
  20. StoryRepostInfo? repostInfo,
  21. StoryInteractionInfo? interactionInfo,
  22. ReactionType? chosenReactionType,
  23. StoryPrivacySettings? privacySettings,
  24. StoryContent? content,
  25. List<StoryArea>? areas,
  26. FormattedText? caption,
  27. Audio? music,
  28. List<int>? albumIds,
})

Implementation

Story copyWith({
  int? id,
  int? posterChatId,
  MessageSender? posterId,
  int? date,
  bool? isBeingPosted,
  bool? isBeingEdited,
  bool? isEdited,
  bool? isPostedToChatPage,
  bool? isVisibleOnlyForSelf,
  bool? canBeAddedToAlbum,
  bool? canBeDeleted,
  bool? canBeEdited,
  bool? canBeForwarded,
  bool? canBeReplied,
  bool? canSetPrivacySettings,
  bool? canToggleIsPostedToChatPage,
  bool? canGetStatistics,
  bool? canGetInteractions,
  bool? hasExpiredViewers,
  StoryRepostInfo? repostInfo,
  StoryInteractionInfo? interactionInfo,
  ReactionType? chosenReactionType,
  StoryPrivacySettings? privacySettings,
  StoryContent? content,
  List<StoryArea>? areas,
  FormattedText? caption,
  Audio? music,
  List<int>? albumIds,
}) =>
    Story(
      id: id ?? this.id,
      posterChatId: posterChatId ?? this.posterChatId,
      posterId: posterId ?? this.posterId,
      date: date ?? this.date,
      isBeingPosted: isBeingPosted ?? this.isBeingPosted,
      isBeingEdited: isBeingEdited ?? this.isBeingEdited,
      isEdited: isEdited ?? this.isEdited,
      isPostedToChatPage: isPostedToChatPage ?? this.isPostedToChatPage,
      isVisibleOnlyForSelf: isVisibleOnlyForSelf ?? this.isVisibleOnlyForSelf,
      canBeAddedToAlbum: canBeAddedToAlbum ?? this.canBeAddedToAlbum,
      canBeDeleted: canBeDeleted ?? this.canBeDeleted,
      canBeEdited: canBeEdited ?? this.canBeEdited,
      canBeForwarded: canBeForwarded ?? this.canBeForwarded,
      canBeReplied: canBeReplied ?? this.canBeReplied,
      canSetPrivacySettings:
          canSetPrivacySettings ?? this.canSetPrivacySettings,
      canToggleIsPostedToChatPage:
          canToggleIsPostedToChatPage ?? this.canToggleIsPostedToChatPage,
      canGetStatistics: canGetStatistics ?? this.canGetStatistics,
      canGetInteractions: canGetInteractions ?? this.canGetInteractions,
      hasExpiredViewers: hasExpiredViewers ?? this.hasExpiredViewers,
      repostInfo: repostInfo ?? this.repostInfo,
      interactionInfo: interactionInfo ?? this.interactionInfo,
      chosenReactionType: chosenReactionType ?? this.chosenReactionType,
      privacySettings: privacySettings ?? this.privacySettings,
      content: content ?? this.content,
      areas: areas ?? this.areas,
      caption: caption ?? this.caption,
      music: music ?? this.music,
      albumIds: albumIds ?? this.albumIds,
    );