ScopeNotificationSettings.fromJson constructor

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

Parses a ScopeNotificationSettings from TDLib JSON.

Implementation

factory ScopeNotificationSettings.fromJson(Map<String, dynamic> json) =>
    ScopeNotificationSettings(
      muteFor: _readInt(json['mute_for']),
      soundId: _readInt(json['sound_id']),
      showPreview: _readBool(json['show_preview']),
      useDefaultMuteStories: _readBool(json['use_default_mute_stories']),
      muteStories: _readBool(json['mute_stories']),
      storySoundId: _readInt(json['story_sound_id']),
      showStorySender: _readBool(json['show_story_sender']),
      disablePinnedMessageNotifications:
          _readBool(json['disable_pinned_message_notifications']),
      disableMentionNotifications:
          _readBool(json['disable_mention_notifications']),
      extra: json['@extra'],
      clientId: _readClientId(json['@client_id']),
    );