StarSubscriptions.fromJson constructor

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

Parses a StarSubscriptions from TDLib JSON.

Implementation

factory StarSubscriptions.fromJson(Map<String, dynamic> json) =>
    StarSubscriptions(
      starAmount: _readObject(json['star_amount'], StarAmount.fromJson),
      subscriptions: _readList<StarSubscription>(
        json['subscriptions'],
        (e) => _readObject(e, StarSubscription.fromJson),
      ),
      requiredStarCount: _readInt(json['required_star_count']),
      nextOffset: _readString(json['next_offset']),
      extra: json['@extra'],
      clientId: _readClientId(json['@client_id']),
    );