ChatNotificationSettings.fromJson constructor
Parses a ChatNotificationSettings from TDLib JSON.
Implementation
factory ChatNotificationSettings.fromJson(Map<String, dynamic> json) =>
ChatNotificationSettings(
useDefaultMuteFor: _readBool(json['use_default_mute_for']),
muteFor: _readInt(json['mute_for']),
useDefaultSound: _readBool(json['use_default_sound']),
soundId: _readInt(json['sound_id']),
useDefaultShowPreview: _readBool(json['use_default_show_preview']),
showPreview: _readBool(json['show_preview']),
useDefaultMuteStories: _readBool(json['use_default_mute_stories']),
muteStories: _readBool(json['mute_stories']),
useDefaultStorySound: _readBool(json['use_default_story_sound']),
storySoundId: _readInt(json['story_sound_id']),
useDefaultShowStoryPoster: _readBool(
json['use_default_show_story_poster'],
),
showStoryPoster: _readBool(json['show_story_poster']),
useDefaultDisablePinnedMessageNotifications: _readBool(
json['use_default_disable_pinned_message_notifications'],
),
disablePinnedMessageNotifications: _readBool(
json['disable_pinned_message_notifications'],
),
useDefaultDisableMentionNotifications: _readBool(
json['use_default_disable_mention_notifications'],
),
disableMentionNotifications: _readBool(
json['disable_mention_notifications'],
),
);