ReactionNotificationSettings.fromJson constructor

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

Parses a ReactionNotificationSettings from TDLib JSON.

Implementation

factory ReactionNotificationSettings.fromJson(Map<String, dynamic> json) =>
    ReactionNotificationSettings(
      messageReactionSource: _readObject(
        json['message_reaction_source'],
        ReactionNotificationSource.fromJson,
      ),
      storyReactionSource: _readObject(
        json['story_reaction_source'],
        ReactionNotificationSource.fromJson,
      ),
      pollVoteSource: _readObject(
        json['poll_vote_source'],
        ReactionNotificationSource.fromJson,
      ),
      soundId: _readInt(json['sound_id']),
      showPreview: _readBool(json['show_preview']),
    );