PremiumSource.fromJson constructor

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

Implementation

factory PremiumSource.fromJson(Map<String, dynamic> json) {
  switch (json["@type"]) {
    case PremiumSourceLimitExceeded.CONSTRUCTOR:
      return PremiumSourceLimitExceeded.fromJson(json);
    case PremiumSourceFeature.CONSTRUCTOR:
      return PremiumSourceFeature.fromJson(json);
    case PremiumSourceLink.CONSTRUCTOR:
      return PremiumSourceLink.fromJson(json);
    case PremiumSourceSettings.CONSTRUCTOR:
      return PremiumSourceSettings.fromJson(json);
    default:
      return const PremiumSource();
  }
}