AlarmSettings.fromJson constructor
Constructs an AlarmSettings
instance from the given JSON data.
Implementation
factory AlarmSettings.fromJson(Map<String, dynamic> json) => AlarmSettings(
id: json['id'] as int,
dateTime: DateTime.fromMicrosecondsSinceEpoch(json['dateTime'] as int),
assetAudioPath: json['assetAudioPath'] as String,
loopAudio: json['loopAudio'] as bool,
vibrate: json['vibrate'] as bool? ?? true,
volume: json['volume'] as double?,
fadeDuration: json['fadeDuration'] as double,
notificationTitle: json['notificationTitle'] as String? ?? '',
notificationBody: json['notificationBody'] as String? ?? '',
enableNotificationOnKill:
json['enableNotificationOnKill'] as bool? ?? true,
androidFullScreenIntent:
json['androidFullScreenIntent'] as bool? ?? true,
);