UpgradedGiftColors.fromJson constructor

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

Parses a UpgradedGiftColors from TDLib JSON.

Implementation

factory UpgradedGiftColors.fromJson(Map<String, dynamic> json) =>
    UpgradedGiftColors(
      id: _readInt(json['id']),
      modelCustomEmojiId: _readInt(json['model_custom_emoji_id']),
      symbolCustomEmojiId: _readInt(json['symbol_custom_emoji_id']),
      lightThemeAccentColor: _readInt(json['light_theme_accent_color']),
      lightThemeColors: _readList<int>(json['light_theme_colors'], _readInt),
      darkThemeAccentColor: _readInt(json['dark_theme_accent_color']),
      darkThemeColors: _readList<int>(json['dark_theme_colors'], _readInt),
    );