Story class final
Represents a story
Constructors
-
Story({required int id, required int posterChatId, MessageSender? posterId, required int date, required bool isBeingPosted, required bool isBeingEdited, required bool isEdited, required bool isPostedToChatPage, required bool isVisibleOnlyForSelf, required bool canBeAddedToAlbum, required bool canBeDeleted, required bool canBeEdited, required bool canBeForwarded, required bool canBeReplied, required bool canSetPrivacySettings, required bool canToggleIsPostedToChatPage, required bool canGetStatistics, required bool canGetInteractions, required bool hasExpiredViewers, StoryRepostInfo? repostInfo, StoryInteractionInfo? interactionInfo, ReactionType? chosenReactionType, required StoryPrivacySettings privacySettings, required StoryContent content, required List<
StoryArea> areas, required FormattedText caption, Audio? music, required List<int> albumIds, dynamic extra, int? clientId}) -
Represents a story
const
-
Story.fromJson(Map<
String, dynamic> json) -
Parses a Story from TDLib JSON.
factory
Properties
-
albumIds
→ List<
int> -
Identifiers of story albums to which the story is added; only for manageable stories
final
-
areas
→ List<
StoryArea> -
Clickable areas to be shown on the story content
final
- canBeAddedToAlbum → bool
-
True, if the story can be added to an album using createStoryAlbum and addStoryAlbumStories
final
- canBeDeleted → bool
-
True, if the story can be deleted
final
- canBeEdited → bool
-
True, if the story can be edited
final
- canBeForwarded → bool
-
True, if the story can be forwarded as a message or reposted as a story. Otherwise, screenshotting and saving of the story content must be also forbidden
final
- canBeReplied → bool
-
True, if the story can be replied in the chat with the user who posted the story
final
- canGetInteractions → bool
-
True, if interactions with the story can be received through getStoryInteractions
final
- canGetStatistics → bool
-
True, if the story statistics are available through getStoryStatistics
final
- canSetPrivacySettings → bool
-
True, if the story privacy settings can be changed
final
- canToggleIsPostedToChatPage → bool
-
True, if the story's is_posted_to_chat_page value can be changed
final
- caption → FormattedText
-
Caption of the story
final
- chosenReactionType → ReactionType?
-
Type of the chosen reaction; may be null if none
final
- clientId → int?
-
Identifier of the TDLib client that sent this object.
final
- content → StoryContent
-
Content of the story
final
- date → int
-
Point in time (Unix timestamp) when the story was published
final
- extra → dynamic
-
"@extra" of the request this object answers.
final
- hasExpiredViewers → bool
-
True, if users who viewed the story can't be received, because the story has expired more than getOption("story_viewers_expiration_delay") seconds ago
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → int
-
Unique story identifier among stories posted by the given chat
final
- interactionInfo → StoryInteractionInfo?
-
Information about interactions with the story; may be null if the story isn't owned or there were no interactions
final
- isBeingEdited → bool
-
True, if the story is being edited by the current user
final
- isBeingPosted → bool
-
True, if the story is being posted by the current user
final
- isEdited → bool
-
True, if the story was edited
final
- isPostedToChatPage → bool
-
True, if the story is saved in the profile of the chat that posted it and will be available there after expiration
final
- isVisibleOnlyForSelf → bool
-
True, if the story is visible only for the current user
final
- music → Audio?
-
Music attached to the story; may be null if none
final
- posterChatId → int
-
Identifier of the chat that posted the story
final
- posterId → MessageSender?
-
Identifier of the user or chat that posted the story; may be null if the story is posted on behalf of the poster_chat_id
final
- privacySettings → StoryPrivacySettings
-
Privacy rules affecting story visibility; may be approximate for non-owned stories
final
- repostInfo → StoryRepostInfo?
-
Information about the original story; may be null if the story wasn't reposted
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
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, dynamic extra, int? clientId}) → Story -
Returns a copy with the given fields replaced. For a nullable
field pass a function, e.g.
field: () => nullto clear it. -
getConstructor(
) → String -
TDLib type name, e.g.
updateNewMessage.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Converts this object to TDLib JSON.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- CONSTRUCTOR → const String
- TDLib type name.