fromJson static method
Implementation
static ReactionNotificationSettings? fromJson(Map<String, dynamic>? json) {
if (json == null) {
return null;
}
return ReactionNotificationSettings(
messageReactionSource: ReactionNotificationSource.fromJson(
json['message_reaction_source'] as Map<String, dynamic>?)!,
storyReactionSource: ReactionNotificationSource.fromJson(
json['story_reaction_source'] as Map<String, dynamic>?)!,
pollVoteSource: ReactionNotificationSource.fromJson(
json['poll_vote_source'] as Map<String, dynamic>?)!,
soundId: (json['sound_id'] is int
? json['sound_id'] as int
: int.tryParse(json['sound_id']?.toString() ?? '')) ??
0,
showPreview: (json['show_preview'] as bool?) ?? false,
);
}