fromJson static method
Implementation
static ScopeNotificationSettings? fromJson(Map<String, dynamic>? json) {
if (json == null) {
return null;
}
return ScopeNotificationSettings(
muteFor: (json['mute_for'] as int?) ?? 0,
soundId:
int.tryParse((json['sound_id'] as dynamic)?.toString() ?? '') ?? 0,
showPreview: (json['show_preview'] as bool?) ?? false,
useDefaultMuteStories:
(json['use_default_mute_stories'] as bool?) ?? false,
muteStories: (json['mute_stories'] as bool?) ?? false,
storySoundId:
int.tryParse((json['story_sound_id'] as dynamic)?.toString() ?? '') ??
0,
showStoryPoster: (json['show_story_poster'] as bool?) ?? false,
disablePinnedMessageNotifications:
(json['disable_pinned_message_notifications'] as bool?) ?? false,
disableMentionNotifications:
(json['disable_mention_notifications'] as bool?) ?? false,
);
}