InputStoryContent class sealed
This object describes the content of a story to post. Currently, it can be one of
- InputStoryContentPhoto
- InputStoryContentVideo
- Annotations
-
- @Freezed(unionKey: 'type', unionValueCase: FreezedUnionCase.snake)
Constructors
-
InputStoryContent.fromJson(Map<
String, dynamic> json) -
Creates an instance of InputStoryContent from JSON data
factory
- InputStoryContent.photo({@JsonKey(name: 'type') @Default(StoryContentType.photo) StoryContentType type, @JsonKey(name: 'photo') @InputFileConverter() required InputFile photo})
-
Describes a photo to post as a story.
constfactory
- InputStoryContent.video({@JsonKey(name: 'type') @Default(StoryContentType.video) StoryContentType type, @JsonKey(name: 'video') @InputFileConverter() required InputFile video, @JsonKey(name: 'duration') double? duration, @JsonKey(name: 'cover_frame_timestamp') double? coverFrameTimestamp, @JsonKey(name: 'is_animation') bool? isAnimation})
-
Describes a video to post as a story.
constfactory
Properties
-
copyWith
→ $InputStoryContentCopyWith<
InputStoryContent> -
Create a copy of InputStoryContent
with the given fields replaced by the non-null parameter values.
no setterinherited
- file → InputFile
-
The InputFile getter
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- type → StoryContentType
-
Type of the content, always "photo"
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Serializes this InputStoryContent to a JSON map.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited