InputMediaLivePhoto class abstract

Represents a live photo to be sent.

Implemented types
Available extensions
Annotations
  • @Freezed.new(fromJson: false, toJson: true)

Constructors

InputMediaLivePhoto({@JsonKey.new(name: 'type') @Default.new(InputMediaType.livePhoto) InputMediaType type, @JsonKey.new(name: 'media') @InputFileConverter() required InputFile media, @JsonKey.new(name: 'photo') @InputFileConverter() required InputFile photo, @JsonKey.new(name: 'caption') String? caption, @JsonKey.new(name: 'parse_mode') ParseMode? parseMode, @JsonKey.new(name: 'caption_entities') List<MessageEntity>? captionEntities, @JsonKey.new(name: 'show_caption_above_media') bool? showCaptionAboveMedia, @JsonKey.new(name: 'has_spoiler') bool? hasSpoiler})
Creates a new InputMediaLivePhoto object.
const
factory

Properties

caption String?
Optional. Caption of the live photo to be sent, 0-1024 characters after entities parsing
no setterinherited
captionEntities List<MessageEntity>?
Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
no setterinherited
copyWith → $InputMediaLivePhotoCopyWith<InputMediaLivePhoto>
Create a copy of InputMediaLivePhoto with the given fields replaced by the non-null parameter values.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
hasSpoiler bool?
Optional. Pass True if the live photo needs to be covered with a spoiler animation
no setterinherited
media InputFile
Video of the live photo to send. Pass a file_id to send a file that exists on the Telegram servers (recommended) or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. Sending live photos by a URL is currently unsupported.
no setterinherited
parseMode ParseMode?
Optional. Mode for parsing entities in the live photo caption. See formatting options for more details.
no setterinherited
photo InputFile
The static photo to send. Pass a file_id to send a file that exists on the Telegram servers (recommended) or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. Sending live photos by a URL is currently unsupported.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showCaptionAboveMedia bool?
Optional. Pass True, if the caption must be shown above the message media
no setterinherited
type InputMediaType
Type of the media, must be live_photo
no setterinherited

Methods

getInputFiles() Iterable<InputFile?>
Returns an iterable of files
map<TResult extends Object?>(TResult $default(_InputMediaLivePhoto value)) → TResult

Available on InputMediaLivePhoto, provided by the InputMediaLivePhotoPatterns extension

A switch-like method, using callbacks.
mapOrNull<TResult extends Object?>(TResult? $default(_InputMediaLivePhoto value)?) → TResult?

Available on InputMediaLivePhoto, provided by the InputMediaLivePhotoPatterns extension

A variant of map that fallback to returning null.
maybeMap<TResult extends Object?>(TResult $default(_InputMediaLivePhoto value)?, {required TResult orElse()}) → TResult

Available on InputMediaLivePhoto, provided by the InputMediaLivePhotoPatterns extension

A variant of map that fallback to returning orElse.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Serializes this InputMediaLivePhoto to a JSON map.
inherited
toString() String
A string representation of this object.
inherited

Operators

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