PostStory class final

Posts a new story on behalf of a chat; requires can_post_stories administrator right for supergroup and channel chats. Returns a temporary story Returns Story

Inheritance
Available extensions
Annotations
  • @immutable

Constructors

PostStory({required int chatId, InputStoryContent? content, InputStoryAreas? areas, FormattedText? caption, StoryPrivacySettings? privacySettings, required List<int> albumIds, required int activePeriod, StoryFullId? fromStoryFullId, required bool isPostedToChatPage, required bool protectContent})

Properties

activePeriod int
activePeriod Period after which the story is moved to archive, in seconds; must be one of 6 * 3600, 12 * 3600, 86400, or 2 * 86400 for Telegram Premium users, and 86400 otherwise
final
albumIds List<int>
albumIds Identifiers of story albums to which the story will be added upon posting. An album can have up to getOption("story_album_size_max") stories
final
areas InputStoryAreas?
areas Clickable rectangle areas to be shown on the story media; pass null if none
final
caption FormattedText?
caption Story caption; pass null to use an empty caption; 0-getOption("story_caption_length_max") characters; can have entities only if getOption("can_use_text_entities_in_story_caption")
final
chatId int
chatId Identifier of the chat that will post the story. Pass Saved Messages chat identifier when posting a story on behalf of the current user
final
content InputStoryContent?
content Content of the story
final
fromStoryFullId StoryFullId?
fromStoryFullId Full identifier of the original story, which content was used to create the story; pass null if the story isn't repost of another story
final
hashCode int
The hash code for this object.
no setteroverride
isPostedToChatPage bool
isPostedToChatPage Pass true to keep the story accessible after expiration
final
privacySettings StoryPrivacySettings?
privacySettings The privacy settings for the story; ignored for stories posted on behalf of supergroup and channel chats
final
protectContent bool
protectContent Pass true if the content of the story must be protected from forwarding and screenshotting
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

copyWith({int? chatId, InputStoryContent? content, InputStoryAreas? areas, FormattedText? caption, StoryPrivacySettings? privacySettings, List<int>? albumIds, int? activePeriod, StoryFullId? fromStoryFullId, bool? isPostedToChatPage, bool? protectContent}) PostStory

Available on PostStory, provided by the PostStoryExtensions extension

getConstructor() String
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
override

Constants

constructor → const String