PremiumFeatures.fromJson constructor

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

Parse from a json

Implementation

factory PremiumFeatures.fromJson(Map<String, dynamic> json) =>
    PremiumFeatures(
      features: List<PremiumFeature>.from((json['features'] ?? [])
          .map((item) => PremiumFeature.fromJson(item))
          .toList()),
      limits: List<PremiumLimit>.from((json['limits'] ?? [])
          .map((item) => PremiumLimit.fromJson(item))
          .toList()),
      paymentLink: json['payment_link'] == null
          ? null
          : InternalLinkType.fromJson(json['payment_link']),
      extra: json['@extra'],
      clientId: json['@client_id'],
    );