GiftUpgradeVariants.fromJson constructor

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

Parses a GiftUpgradeVariants from TDLib JSON.

Implementation

factory GiftUpgradeVariants.fromJson(Map<String, dynamic> json) =>
    GiftUpgradeVariants(
      models: _readList<UpgradedGiftModel>(
        json['models'],
        (e) => _readObject(e, UpgradedGiftModel.fromJson),
      ),
      symbols: _readList<UpgradedGiftSymbol>(
        json['symbols'],
        (e) => _readObject(e, UpgradedGiftSymbol.fromJson),
      ),
      backdrops: _readList<UpgradedGiftBackdrop>(
        json['backdrops'],
        (e) => _readObject(e, UpgradedGiftBackdrop.fromJson),
      ),
      extra: json['@extra'],
      clientId: _readClientId(json['@client_id']),
    );