fromJson static method

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

Implementation

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

  return InputInlineQueryResultLocation(
    id: (json['id'] as String?) ?? '',
    location: Location.fromJson(tdMapFromJson(json['location'])),
    livePeriod: (json['live_period'] as int?) ?? 0,
    title: (json['title'] as String?) ?? '',
    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']),
    ),
  );
}