fromJson static method

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

Implementation

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

  return InputInlineQueryResultSticker(
    id: (json['id'] as String?) ?? '',
    thumbnailUrl: (json['thumbnail_url'] as String?) ?? '',
    stickerUrl: (json['sticker_url'] as String?) ?? '',
    stickerWidth: (json['sticker_width'] as int?) ?? 0,
    stickerHeight: (json['sticker_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>?)!,
  );
}