copyWith method

EditStory copyWith({
  1. int? storySenderChatId,
  2. int? storyId,
  3. InputStoryContent? content()?,
  4. InputStoryAreas? areas()?,
  5. FormattedText? caption()?,
})

Returns a copy with the given fields replaced. For a nullable field pass a function, e.g. field: () => null to clear it.

Implementation

EditStory copyWith({
  int? storySenderChatId,
  int? storyId,
  InputStoryContent? Function()? content,
  InputStoryAreas? Function()? areas,
  FormattedText? Function()? caption,
}) =>
    EditStory(
      storySenderChatId: storySenderChatId ?? this.storySenderChatId,
      storyId: storyId ?? this.storyId,
      content: content != null ? content() : this.content,
      areas: areas != null ? areas() : this.areas,
      caption: caption != null ? caption() : this.caption,
    );