InlineQueryResultCachedVoice.fromJson constructor
Constructs an InlineQueryResultCachedVoice object from a JSON map
Implementation
factory InlineQueryResultCachedVoice.fromJson(Map<String, dynamic> json) {
return InlineQueryResultCachedVoice(
voiceFileId: json['voice_file_id'] 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(),
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>,
),
);
}