fromJson static method

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

Implementation

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

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

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

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

    default:
      return null;
  }
}