fromJson static method

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

Implementation

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

  return InputInlineQueryResultPhoto(
    id: (json['id'] as String?) ?? '',
    title: (json['title'] as String?) ?? '',
    description: (json['description'] as String?) ?? '',
    thumbnailUrl: (json['thumbnail_url'] as String?) ?? '',
    photoUrl: (json['photo_url'] as String?) ?? '',
    photoWidth: (json['photo_width'] as int?) ?? 0,
    photoHeight: (json['photo_height'] as int?) ?? 0,
    replyMarkup: ReplyMarkup.fromJson(tdMapFromJson(json['reply_markup'])),
    inputMessageContent: InputMessageContent.fromJson(
      tdMapFromJson(json['input_message_content']),
    ),
  );
}