InlineQueryResultAudio.fromJson constructor
Constructs an InlineQueryResultAudio object from a JSON map
Implementation
factory InlineQueryResultAudio.fromJson(Map<String, dynamic> json) {
return InlineQueryResultAudio(
audioUrl: json['audio_url'] as String,
title: json['title'] as String,
id: json['id'] as String,
caption: json['caption'] as String?,
parseMode: json['parse_mode'] == null
? null
: ParseMode.fromJson(json['parse_mode'] as String),
captionEntities: (json['caption_entities'] as List<dynamic>?)
?.map((e) => MessageEntity.fromJson(e as Map<String, dynamic>))
.toList(),
performer: json['performer'] as String?,
audioDuration: json['audio_duration'] as int?,
replyMarkup: json['reply_markup'] == null
? null
: InlineKeyboardMarkup.fromJson(
json['reply_markup'] as Map<String, dynamic>,
),
inputMessageContent: json['input_message_content'] == null
? null
: InputMessageContent.fromJson(
json['input_message_content'] as Map<String, dynamic>,
),
);
}