PremiumFeatures.fromJson constructor

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

Parses a PremiumFeatures from TDLib JSON.

Implementation

factory PremiumFeatures.fromJson(Map<String, dynamic> json) =>
    PremiumFeatures(
      features: _readList<PremiumFeature>(
        json['features'],
        (e) => _readObject(e, PremiumFeature.fromJson),
      ),
      limits: _readList<PremiumLimit>(
        json['limits'],
        (e) => _readObject(e, PremiumLimit.fromJson),
      ),
      paymentLink: _readOptional(
        json['payment_link'],
        InternalLinkType.fromJson,
      ),
      extra: json['@extra'],
      clientId: _readClientId(json['@client_id']),
    );