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(json['reply_markup'] as Map<String, dynamic>?),
    inputMessageContent: InputMessageContent.fromJson(
        json['input_message_content'] as Map<String, dynamic>?)!,
  );
}