copyWith method
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,
bool? volumeMax,
double? fadeDuration,
String? notificationTitle,
String? notificationBody,
bool? enableNotificationOnKill,
bool? stopOnNotificationOpen,
}) {
return AlarmSettings(
id: id ?? this.id,
dateTime: dateTime ?? this.dateTime,
assetAudioPath: assetAudioPath ?? this.assetAudioPath,
loopAudio: loopAudio ?? this.loopAudio,
vibrate: vibrate ?? this.vibrate,
volumeMax: volumeMax ?? this.volumeMax,
fadeDuration: fadeDuration ?? this.fadeDuration,
notificationTitle: notificationTitle ?? this.notificationTitle,
notificationBody: notificationBody ?? this.notificationBody,
enableNotificationOnKill:
enableNotificationOnKill ?? this.enableNotificationOnKill,
stopOnNotificationOpen:
stopOnNotificationOpen ?? this.stopOnNotificationOpen,
);
}