copyWith method
Creates a copy of this TimerSettings with the given fields replaced with new values.
Implementation
TimerSettings copyWith({
int? workDuration,
int? shortBreakDuration,
int? longBreakDuration,
int? pomodorosUntilLongBreak,
}) {
return TimerSettings(
workDuration: workDuration ?? this.workDuration,
shortBreakDuration: shortBreakDuration ?? this.shortBreakDuration,
longBreakDuration: longBreakDuration ?? this.longBreakDuration,
pomodorosUntilLongBreak:
pomodorosUntilLongBreak ?? this.pomodorosUntilLongBreak,
);
}