fromJson static method
Inherited by: EmojiStatusTypeCustomEmoji EmojiStatusTypeUpgradedGift
Implementation
static EmojiStatusTypeUpgradedGift? fromJson(Map<String, dynamic>? json) {
if (json == null) {
return null;
}
return EmojiStatusTypeUpgradedGift(
upgradedGiftId:
int.tryParse(
(json['upgraded_gift_id'] as dynamic)?.toString() ?? '',
) ??
0,
giftTitle: (json['gift_title'] as String?) ?? '',
giftName: (json['gift_name'] as String?) ?? '',
modelCustomEmojiId:
int.tryParse(
(json['model_custom_emoji_id'] as dynamic)?.toString() ?? '',
) ??
0,
symbolCustomEmojiId:
int.tryParse(
(json['symbol_custom_emoji_id'] as dynamic)?.toString() ?? '',
) ??
0,
backdropColors: UpgradedGiftBackdropColors.fromJson(
tdMapFromJson(json['backdrop_colors']),
),
);
}