copyWith method

AlarmSettings copyWith({
  1. int? id,
  2. DateTime? dateTime,
  3. String? assetAudioPath,
  4. bool? loopAudio,
  5. bool? vibrate,
  6. double? volume,
  7. double? fadeDuration,
  8. String? notificationTitle,
  9. String? notificationBody,
  10. bool? enableNotificationOnKill,
  11. 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,
  bool? loopAudio,
  bool? vibrate,
  double? volume,
  double? fadeDuration,
  String? notificationTitle,
  String? notificationBody,
  bool? enableNotificationOnKill,
  bool? androidFullScreenIntent,
}) {
  return AlarmSettings(
    id: id ?? this.id,
    dateTime: dateTime ?? this.dateTime,
    assetAudioPath: assetAudioPath ?? this.assetAudioPath,
    loopAudio: loopAudio ?? this.loopAudio,
    vibrate: vibrate ?? this.vibrate,
    volume: volume ?? this.volume,
    fadeDuration: fadeDuration ?? this.fadeDuration,
    notificationTitle: notificationTitle ?? this.notificationTitle,
    notificationBody: notificationBody ?? this.notificationBody,
    enableNotificationOnKill:
        enableNotificationOnKill ?? this.enableNotificationOnKill,
    androidFullScreenIntent:
        androidFullScreenIntent ?? this.androidFullScreenIntent,
  );
}