copyWith method

Schedule copyWith({
  1. Optional<DateTime?>? startTime,
  2. Optional<DateTime?>? finishTime,
  3. List<WeekTimeInterval>? weekTimeIntervals,
})

Implementation

Schedule copyWith({
  Optional<DateTime?>? startTime,
  Optional<DateTime?>? finishTime,
  List<WeekTimeInterval>? weekTimeIntervals
}) {
  return Schedule(
    startTime: startTime != null ? startTime.value : this.startTime,
    finishTime: finishTime != null ? finishTime.value : this.finishTime,
    weekTimeIntervals: weekTimeIntervals ?? this.weekTimeIntervals
  );
}