PremiumState.fromMap constructor
PremiumState.fromMap(
- Map<String, dynamic> map
)
Implementation
PremiumState.fromMap(Map<String, dynamic> map) {
extra = map['@extra'];
client_id = map['@client_id'];
if (map['state'] != null) {
state = TdApiMap.fromMap(map['state']) as FormattedText;
}
if (map['payment_options'] != null) {
payment_options = [];
for (var someValue in map['payment_options']) {
if (someValue != null) {
payment_options?.add(TdApiMap.fromMap(someValue) as PremiumPaymentOption);
}
}
}
if (map['animations'] != null) {
animations = [];
for (var someValue in map['animations']) {
if (someValue != null) {
animations?.add(TdApiMap.fromMap(someValue) as PremiumFeaturePromotionAnimation);
}
}
}
}