copyWith method
Creates a copy of AlarmSettings
but with the given fields replaced with
the new values.
Implementation
AlarmSettings copyWith({
DateTime? dateTime,
String? assetAudioPath,
bool? loopAudio,
bool? vibrate,
double? fadeDuration,
String? notificationTitle,
String? notificationBody,
}) {
return AlarmSettings(
id: id,
dateTime: dateTime ?? this.dateTime,
assetAudioPath: assetAudioPath ?? this.assetAudioPath,
loopAudio: loopAudio ?? this.loopAudio,
vibrate: vibrate ?? this.vibrate,
fadeDuration: fadeDuration ?? this.fadeDuration,
notificationTitle: notificationTitle ?? this.notificationTitle,
notificationBody: notificationBody ?? this.notificationBody,
);
}