dart format
This commit is contained in:
@@ -15,7 +15,8 @@ abstract class TimetableState with _$TimetableState {
|
||||
const TimetableState._();
|
||||
|
||||
const factory TimetableState({
|
||||
@Default(<String, GetTimetableResponse>{}) Map<String, GetTimetableResponse> weekCache,
|
||||
@Default(<String, GetTimetableResponse>{})
|
||||
Map<String, GetTimetableResponse> weekCache,
|
||||
GetRoomsResponse? rooms,
|
||||
GetSubjectsResponse? subjects,
|
||||
GetHolidaysResponse? schoolHolidays,
|
||||
@@ -26,10 +27,15 @@ abstract class TimetableState with _$TimetableState {
|
||||
@Default(0) int dataVersion,
|
||||
}) = _TimetableState;
|
||||
|
||||
factory TimetableState.fromJson(Map<String, Object?> json) => _$TimetableStateFromJson(json);
|
||||
factory TimetableState.fromJson(Map<String, Object?> json) =>
|
||||
_$TimetableStateFromJson(json);
|
||||
|
||||
Iterable<GetTimetableResponseObject> getAllKnownLessons() =>
|
||||
weekCache.values.expand((response) => response.result);
|
||||
|
||||
bool get hasReferenceData => rooms != null && subjects != null && schoolHolidays != null && customEvents != null;
|
||||
bool get hasReferenceData =>
|
||||
rooms != null &&
|
||||
subjects != null &&
|
||||
schoolHolidays != null &&
|
||||
customEvents != null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user