AlarmSettings constructor

const AlarmSettings({
  1. required int id,
  2. required DateTime dateTime,
  3. required String assetAudioPath,
  4. bool loopAudio = true,
  5. bool vibrate = true,
  6. bool volumeMax = true,
  7. double fadeDuration = 0.0,
  8. String? notificationTitle,
  9. String? notificationBody,
  10. bool enableNotificationOnKill = true,
  11. bool stopOnNotificationOpen = true,
})

Model that contains all the settings to customize and set an alarm.

Note that if you want to show a notification when alarm is triggered, both notificationTitle and notificationBody must not be null nor empty.

Implementation

const AlarmSettings({
  required this.id,
  required this.dateTime,
  required this.assetAudioPath,
  this.loopAudio = true,
  this.vibrate = true,
  this.volumeMax = true,
  this.fadeDuration = 0.0,
  this.notificationTitle,
  this.notificationBody,
  this.enableNotificationOnKill = true,
  this.stopOnNotificationOpen = true,
});