fromJson static method

InputInlineQueryResultVideo? fromJson(
  1. Map<String, dynamic>? json
)
override

Implementation

static InputInlineQueryResultVideo? fromJson(Map<String, dynamic>? json) {
  if (json == null) {
    return null;
  }

  return InputInlineQueryResultVideo(
    id: (json['id'] as String?) ?? '',
    title: (json['title'] as String?) ?? '',
    description: (json['description'] as String?) ?? '',
    thumbnailUrl: (json['thumbnail_url'] as String?) ?? '',
    videoUrl: (json['video_url'] as String?) ?? '',
    mimeType: (json['mime_type'] as String?) ?? '',
    videoWidth: (json['video_width'] as int?) ?? 0,
    videoHeight: (json['video_height'] as int?) ?? 0,
    videoDuration: (json['video_duration'] as int?) ?? 0,
    replyMarkup: ReplyMarkup.fromJson(tdMapFromJson(json['reply_markup'])),
    inputMessageContent: InputMessageContent.fromJson(
      tdMapFromJson(json['input_message_content']),
    ),
  );
}