copyWith method

AlarmSettings copyWith({
  1. int? id,
  2. DateTime? dateTime,
  3. String? assetAudioPath,
  4. NotificationSettings? notificationSettings,
  5. bool? loopAudio,
  6. bool? vibrate,
  7. double? volume,
  8. double? fadeDuration,
  9. String? notificationTitle,
  10. String? notificationBody,
  11. bool? warningNotificationOnKill,
  12. bool? androidFullScreenIntent,
})

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

Implementation

AlarmSettings copyWith({
  int? id,
  DateTime? dateTime,
  String? assetAudioPath,
  NotificationSettings? notificationSettings,
  bool? loopAudio,
  bool? vibrate,
  double? volume,
  double? fadeDuration,
  String? notificationTitle,
  String? notificationBody,
  bool? warningNotificationOnKill,
  bool? androidFullScreenIntent,
}) {
  return AlarmSettings(
    id: id ?? this.id,
    dateTime: dateTime ?? this.dateTime,
    assetAudioPath: assetAudioPath ?? this.assetAudioPath,
    notificationSettings: notificationSettings ?? this.notificationSettings,
    loopAudio: loopAudio ?? this.loopAudio,
    vibrate: vibrate ?? this.vibrate,
    volume: volume ?? this.volume,
    fadeDuration: fadeDuration ?? this.fadeDuration,
    warningNotificationOnKill:
        warningNotificationOnKill ?? this.warningNotificationOnKill,
    androidFullScreenIntent:
        androidFullScreenIntent ?? this.androidFullScreenIntent,
  );
}