fromJson static method
Implementation
static NotificationSound? fromJson(Map<String, dynamic>? json) {
if (json == null) {
return null;
}
return NotificationSound(
id: (json['id'] is int
? json['id'] as int
: int.tryParse(json['id']?.toString() ?? '')) ??
0,
duration: (json['duration'] as int?) ?? 0,
date: (json['date'] as int?) ?? 0,
title: (json['title'] as String?) ?? '',
data: (json['data'] as String?) ?? '',
sound: File.fromJson(json['sound'] as Map<String, dynamic>?)!,
);
}