shiftEventTo method

void shiftEventTo(
  1. DateTime newStartTime
)

Shifts the start and end times, so that the event's duration is unaltered and the event now starts in newStartTime.

Implementation

void shiftEventTo(DateTime newStartTime) {
  end = end.add(newStartTime.difference(start));
  start = newStartTime;
}