fromJson static method

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

Implementation

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

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

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

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

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

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

    default:
      return null;
  }
}