Slot class
A reservable slot in the school's timetable.
Constructors
-
Slot({required int id, @JsonValue('startunit') required SlotTimeUnit startUnit, required int duration, required Weekday weekday, required String room, required int size, @JsonValue('fullness') required int reservations, @JsonValue('forcuruser') required bool reserved, @Default([]) List<
int> supervisors}) -
A reservable slot in the school's timetable.
constfactory
-
Slot.fromJson(Map<
String, Object?> json) -
Creates a Slot from
json
.factory - Slot.noId({required SlotTimeUnit startUnit, required int duration, required Weekday weekday, required String room, required int size})
-
Creates a Slot without Slot.id, Slot.reservations, Slot.reserved and Slot.supervisors.
factory
Properties
-
copyWith
→ $SlotCopyWith<
Slot> -
Create a copy of Slot
with the given fields replaced by the non-null parameter values.
no setterinherited
- duration → int
-
The duration of this slot interpreted as SlotTimeUnits.
no setterinherited
- endUnit → SlotTimeUnit
-
End time of this slot.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → int
-
Unique identifier of this slot.
no setterinherited
- reservations → int
-
The number of students that have already reserved this slot.
no setterinherited
- reserved → bool
-
true
if the current user has reserved this slot.no setterinherited - room → String
-
The room this slot takes place in.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- size → int
-
The number of students that can attend this slot.
no setterinherited
- startUnit → SlotTimeUnit
-
The start time of this slot.
no setterinherited
-
supervisors
→ List<
int> -
The user ids of those supervising this slot.
no setterinherited
- weekday → Weekday
-
The weekday this slot takes place on.
no setterinherited
Methods
-
join(
{required List< User> users, required List<MoodleCourse> courses, required List<CourseToSlot> mappings}) → SlotAggregate -
Available on Slot, provided by the SlotX extension
Aggregates a Slot with its User supervisors and MoodleCourse. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Serializes this Slot to a JSON map.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited