fromJson static method

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

Implementation

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

  switch (json['@type']) {
    case ChatPhotoStickerTypeCustomEmoji.constructor:
      return ChatPhotoStickerTypeCustomEmoji.fromJson(json);

    case ChatPhotoStickerTypeRegularOrMask.constructor:
      return ChatPhotoStickerTypeRegularOrMask.fromJson(json);

    default:
      return null;
  }
}