ChatBoostFeatures.fromJson constructor

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

Parses a ChatBoostFeatures from TDLib JSON.

Implementation

factory ChatBoostFeatures.fromJson(Map<String, dynamic> json) =>
    ChatBoostFeatures(
      features: _readList<ChatBoostLevelFeatures>(
        json['features'],
        (e) => _readObject(e, ChatBoostLevelFeatures.fromJson),
      ),
      minProfileBackgroundCustomEmojiBoostLevel: _readInt(
        json['min_profile_background_custom_emoji_boost_level'],
      ),
      minBackgroundCustomEmojiBoostLevel: _readInt(
        json['min_background_custom_emoji_boost_level'],
      ),
      minEmojiStatusBoostLevel: _readInt(
        json['min_emoji_status_boost_level'],
      ),
      minChatThemeBackgroundBoostLevel: _readInt(
        json['min_chat_theme_background_boost_level'],
      ),
      minCustomBackgroundBoostLevel: _readInt(
        json['min_custom_background_boost_level'],
      ),
      minCustomEmojiStickerSetBoostLevel: _readInt(
        json['min_custom_emoji_sticker_set_boost_level'],
      ),
      minAutomaticTranslationBoostLevel: _readInt(
        json['min_automatic_translation_boost_level'],
      ),
      minSpeechRecognitionBoostLevel: _readInt(
        json['min_speech_recognition_boost_level'],
      ),
      minSponsoredMessageDisableBoostLevel: _readInt(
        json['min_sponsored_message_disable_boost_level'],
      ),
      extra: json['@extra'],
      clientId: _readClientId(json['@client_id']),
    );