InlineQueryResultVoice class abstract

Represents a link to a voice recording in an .OGG container encoded with OPUS. By default, this voice recording will be sent by the user. Alternatively, you can use input_message_content to send a message with the specified content instead of the the voice message.

Note: This will only work in Telegram versions released after 9 April, 2016. Older clients will ignore them.

Implemented types
Available extensions
Annotations
  • @freezed

Constructors

InlineQueryResultVoice({@JsonKey.new(name: 'type') @Default.new(InlineQueryResultType.voice) InlineQueryResultType type, @JsonKey.new(name: 'id') required String id, @JsonKey.new(name: 'voice_url') required String voiceUrl, @JsonKey.new(name: 'title') required String title, @JsonKey.new(name: 'caption') String? caption, @JsonKey.new(name: 'parse_mode') ParseMode? parseMode, @JsonKey.new(name: 'caption_entities') List<MessageEntity>? captionEntities, @JsonKey.new(name: 'voice_duration') int? voiceDuration, @JsonKey.new(name: 'reply_markup') InlineKeyboardMarkup? replyMarkup, @JsonKey.new(name: 'input_message_content') @InputMessageContentConverter() InputMessageContent? inputMessageContent})
Constructs the InlineQueryResultVoice
const
factory
InlineQueryResultVoice.fromJson(Map<String, dynamic> json)
Creates an InlineQueryResultVoice instance from JSON data
factory

Properties

caption → String?
Optional. Caption, 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 → $InlineQueryResultVoiceCopyWith<InlineQueryResultVoice>
Create a copy of InlineQueryResultVoice with the given fields replaced by the non-null parameter values.
no setterinherited
hashCode → int
The hash code for this object.
no setterinherited
id → String
Unique identifier for this result, 1-64 Bytes
no setterinherited
inputMessageContent → InputMessageContent?
Optional. Content of the message to be sent instead of the voice recording
no setterinherited
parseMode → ParseMode?
Optional. Mode for parsing entities in the voice message caption. See formatting options for more details.
no setterinherited
replyMarkup → InlineKeyboardMarkup?
Optional. Inline keyboard attached to the message
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
title → String
Recording title
no setterinherited
type → InlineQueryResultType
Type of the result, always InlineQueryResultType.voice
no setterinherited
voiceDuration → int?
Optional. Recording duration in seconds
no setterinherited
voiceUrl → String
A valid URL for the voice recording
no setterinherited

Methods

map<TResult extends Object?>(TResult $default(_InlineQueryResultVoice value)) → TResult

Available on InlineQueryResultVoice, provided by the InlineQueryResultVoicePatterns extension

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

Available on InlineQueryResultVoice, provided by the InlineQueryResultVoicePatterns extension

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

Available on InlineQueryResultVoice, provided by the InlineQueryResultVoicePatterns 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 InlineQueryResultVoice to a JSON map.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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