AlarmSettings.fromJson constructor

AlarmSettings.fromJson(
  1. Map<String, dynamic> json
)

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,
      fadeDuration: json['fadeDuration'] as double,
      notificationTitle: json['notificationTitle'] as String?,
      notificationBody: json['notificationBody'] as String?,
    );