option to change custom timetable event colors

This commit is contained in:
2024-03-17 17:01:18 +01:00
parent 9cb3a93a51
commit a2f1ccae7b
5 changed files with 78 additions and 2 deletions

View File

@ -13,6 +13,7 @@ class CustomTimetableEvent {
DateTime startDate;
@JsonKey(toJson: MhslApi.dateTimeToJson, fromJson: MhslApi.dateTimeFromJson)
DateTime endDate;
String? color;
String rrule;
@JsonKey(toJson: MhslApi.dateTimeToJson, fromJson: MhslApi.dateTimeFromJson)
DateTime createdAt;
@ -20,7 +21,7 @@ class CustomTimetableEvent {
DateTime updatedAt;
CustomTimetableEvent({required this.id, required this.title, required this.description, required this.startDate,
required this.endDate, required this.rrule, required this.createdAt, required this.updatedAt});
required this.endDate, required this.color, required this.rrule, required this.createdAt, required this.updatedAt});
factory CustomTimetableEvent.fromJson(Map<String, dynamic> json) => _$CustomTimetableEventFromJson(json);
Map<String, dynamic> toJson() => _$CustomTimetableEventToJson(this);