InputPaidMedia class sealed
This object describes the paid media to be sent. Currently, it can be one of
InputPaidMediaPhoto
or InputPaidMediaVideo
.
- Annotations
-
- @Freezed(fromJson: false, toJson: true)
Constructors
- InputPaidMedia.photo({@Default(InputPaidMediaType.photo) InputPaidMediaType type, @InputFileConverter() required InputFile media})
-
The paid media to send is a photo.
constfactory
- InputPaidMedia.video({@Default(InputPaidMediaType.video) @JsonKey(name: 'type') InputPaidMediaType type, @InputFileConverter() @JsonKey(name: 'media') required InputFile media, @InputFileConverter() @JsonKey(name: 'thumbnail') InputFile? thumbnail, @JsonKey(name: 'width') int? width, @JsonKey(name: 'height') int? height, @JsonKey(name: 'duration') int? duration, @JsonKey(name: 'supports_streaming') bool? supportsStreaming, @JsonKey(name: 'start_timestamp') int? startTimestamp, @InputFileConverter() @JsonKey(name: 'cover') InputFile? cover})
-
The paid media to send is a video.
constfactory
Properties
-
copyWith
→ $InputPaidMediaCopyWith<
InputPaidMedia> -
Create a copy of InputPaidMedia
with the given fields replaced by the non-null parameter values.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- media → InputFile
-
File to send.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- type → InputPaidMediaType
-
Type of the media, must be "photo"
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Serializes this InputPaidMedia to a JSON map.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited