Client/lib/view/pages/timetable/arbitraryAppointment.dart

20 lines
629 B
Dart

import '../../../api/mhsl/customTimetableEvent/customTimetableEvent.dart';
import '../../../api/webuntis/queries/getTimetable/getTimetableResponse.dart';
class ArbitraryAppointment {
GetTimetableResponseObject? webuntis;
CustomTimetableEvent? custom;
ArbitraryAppointment({this.webuntis, this.custom});
bool hasWebuntis() => webuntis != null;
bool hasCustom() => custom != null;
void handlers(void Function(GetTimetableResponseObject webuntisData) webuntis, void Function(CustomTimetableEvent customData) custom) {
if(hasWebuntis()) webuntis(this.webuntis!);
if(hasCustom()) custom(this.custom!);
}
}