ChatBoostSource.fromJson constructor
Creates a ChatBoostSource
object from a JSON object.
Implementation
factory ChatBoostSource.fromJson(Map<String, dynamic> json) {
return switch (ChatBoostSourceType.fromJson(json['type'])) {
ChatBoostSourceType.premium => ChatBoostSourcePremium.fromJson(json),
ChatBoostSourceType.giftCode => ChatBoostSourceGiftCode.fromJson(json),
ChatBoostSourceType.giveaway => ChatBoostSourceGiveaway.fromJson(json),
};
}