copyWith method
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,
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,
);
}