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. bool? volumeEnforced,
  9. double? fadeDuration,
  10. String? notificationTitle,
  11. String? notificationBody,
  12. bool? warningNotificationOnKill,
  13. 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,
  bool? volumeEnforced,
  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,
    volumeEnforced: volumeEnforced ?? this.volumeEnforced,
    fadeDuration: fadeDuration ?? this.fadeDuration,
    warningNotificationOnKill:
        warningNotificationOnKill ?? this.warningNotificationOnKill,
    androidFullScreenIntent:
        androidFullScreenIntent ?? this.androidFullScreenIntent,
  );
}