copyWith method

AlarmSettings copyWith({
  1. int? id,
  2. DateTime? dateTime,
  3. String? assetAudioPath,
  4. VolumeSettings? volumeSettings,
  5. NotificationSettings? notificationSettings,
  6. bool? loopAudio,
  7. bool? vibrate,
  8. double? volume,
  9. bool? volumeEnforced,
  10. double? fadeDuration,
  11. List<double>? fadeStopTimes,
  12. List<double>? fadeStopVolumes,
  13. String? notificationTitle,
  14. String? notificationBody,
  15. bool? warningNotificationOnKill,
  16. bool? androidFullScreenIntent,
  17. bool? allowAlarmOverlap,
  18. bool? iOSBackgroundAudio,
})

Creates a copy of AlarmSettings but with the given fields replaced with the new values.

Implementation

AlarmSettings copyWith({
  int? id,
  DateTime? dateTime,
  String? assetAudioPath,
  VolumeSettings? volumeSettings,
  NotificationSettings? notificationSettings,
  bool? loopAudio,
  bool? vibrate,
  double? volume,
  bool? volumeEnforced,
  double? fadeDuration,
  List<double>? fadeStopTimes,
  List<double>? fadeStopVolumes,
  String? notificationTitle,
  String? notificationBody,
  bool? warningNotificationOnKill,
  bool? androidFullScreenIntent,
  bool? allowAlarmOverlap,
  bool? iOSBackgroundAudio,
}) {
  return AlarmSettings(
    id: id ?? this.id,
    dateTime: dateTime ?? this.dateTime,
    assetAudioPath: assetAudioPath ?? this.assetAudioPath,
    volumeSettings: volumeSettings ?? this.volumeSettings,
    notificationSettings: notificationSettings ?? this.notificationSettings,
    loopAudio: loopAudio ?? this.loopAudio,
    vibrate: vibrate ?? this.vibrate,
    warningNotificationOnKill:
        warningNotificationOnKill ?? this.warningNotificationOnKill,
    androidFullScreenIntent:
        androidFullScreenIntent ?? this.androidFullScreenIntent,
    allowAlarmOverlap: allowAlarmOverlap ?? this.allowAlarmOverlap,
    iOSBackgroundAudio: iOSBackgroundAudio ?? this.iOSBackgroundAudio,
  );
}