InlineQueryResultMpeg4Gif.fromJson constructor

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

Constructs an InlineQueryResultMpeg4Gif object from a JSON object

Implementation

factory InlineQueryResultMpeg4Gif.fromJson(Map<String, dynamic> json) {
  return InlineQueryResultMpeg4Gif(
    mpeg4Url: json['mpeg4_url'] as String,
    thumbnailUrl: json['thumbnail_url'] as String,
    id: json['id'] as String,
    mpeg4Width: json['mpeg4_width'] as int?,
    mpeg4Height: json['mpeg4_height'] as int?,
    mpeg4Duration: json['mpeg4_duration'] as int?,
    thumbnailMimeType: json['thumbnail_mime_type'] as String?,
    title: json['title'] 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>,
          ),
    showCaptionAboveMedia: json['show_caption_above_media'],
  );
}