ChatNotificationSettings.fromJson constructor

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

Parse from a json

Implementation

factory ChatNotificationSettings.fromJson(Map<String, dynamic> json) =>
    ChatNotificationSettings(
      useDefaultMuteFor: json['use_default_mute_for'],
      muteFor: json['mute_for'],
      useDefaultSound: json['use_default_sound'],
      soundId: int.parse(json['sound_id']),
      useDefaultShowPreview: json['use_default_show_preview'],
      showPreview: json['show_preview'],
      useDefaultMuteStories: json['use_default_mute_stories'],
      muteStories: json['mute_stories'],
      useDefaultStorySound: json['use_default_story_sound'],
      storySoundId: int.parse(json['story_sound_id']),
      useDefaultShowStorySender: json['use_default_show_story_sender'],
      showStorySender: json['show_story_sender'],
      useDefaultDisablePinnedMessageNotifications:
          json['use_default_disable_pinned_message_notifications'],
      disablePinnedMessageNotifications:
          json['disable_pinned_message_notifications'],
      useDefaultDisableMentionNotifications:
          json['use_default_disable_mention_notifications'],
      disableMentionNotifications: json['disable_mention_notifications'],
    );