InlineQueryResultGif.fromJson constructor

InlineQueryResultGif.fromJson(
  1. Map<String, dynamic> json
)

Constructs an InlineQueryResultGif object from a JSON map

Implementation

factory InlineQueryResultGif.fromJson(Map<String, dynamic> json) {
  return InlineQueryResultGif(
    gifUrl: json['gif_url'],
    thumbnailUrl: json['thumbnail_url'],
    id: json['id'],
    gifWidth: json['gif_width'],
    gifHeight: json['gif_height'],
    gifDuration: json['gif_duration'],
    thumbnailMimeType: json['thumbnail_mime_type'],
    title: json['title'],
    caption: json['caption'],
    parseMode: json['parse_mode'] != null
        ? ParseMode.fromJson(json['parse_mode'])
        : null,
    captionEntities: (json['caption_entities'] as List<dynamic>?)
        ?.map((e) => MessageEntity.fromJson(e))
        .toList(),
    replyMarkup: json['reply_markup'] != null
        ? InlineKeyboardMarkup.fromJson(json['reply_markup'])
        : null,
    inputMessageContent: json['input_message_content'] != null
        ? InputMessageContent.fromJson(json['input_message_content'])
        : null,
    showCaptionAboveMedia: json['show_caption_above_media'],
  );
}