Slot.noId constructor

Slot.noId({
  1. required SlotTimeUnit startUnit,
  2. required int duration,
  3. required Weekday weekday,
  4. required String room,
  5. required int size,
})

Creates a Slot without Slot.id, Slot.reservations, Slot.reserved and Slot.supervisors.

Implementation

factory Slot.noId({
  required SlotTimeUnit startUnit,
  required int duration,
  required Weekday weekday,
  required String room,
  required int size,
}) =>
    Slot(
      id: -1,
      startUnit: startUnit,
      duration: duration,
      weekday: weekday,
      room: room,
      size: size,
      reservations: 0,
      reserved: false,
      supervisors: [],
    );