fromJson static method

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

Implementation

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

  return InputInlineQueryResultContact(
    id: (json['id'] as String?) ?? '',
    contact: Contact.fromJson(tdMapFromJson(json['contact'])),
    thumbnailUrl: (json['thumbnail_url'] as String?) ?? '',
    thumbnailWidth: (json['thumbnail_width'] as int?) ?? 0,
    thumbnailHeight: (json['thumbnail_height'] as int?) ?? 0,
    replyMarkup: ReplyMarkup.fromJson(tdMapFromJson(json['reply_markup'])),
    inputMessageContent: InputMessageContent.fromJson(
      tdMapFromJson(json['input_message_content']),
    ),
  );
}