option to change custom timetable event colors
This commit is contained in:
@ -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);
|
||||
|
@ -14,6 +14,7 @@ CustomTimetableEvent _$CustomTimetableEventFromJson(
|
||||
description: json['description'] as String,
|
||||
startDate: MhslApi.dateTimeFromJson(json['startDate'] as String),
|
||||
endDate: MhslApi.dateTimeFromJson(json['endDate'] as String),
|
||||
color: json['color'] as String?,
|
||||
rrule: json['rrule'] as String,
|
||||
createdAt: MhslApi.dateTimeFromJson(json['createdAt'] as String),
|
||||
updatedAt: MhslApi.dateTimeFromJson(json['updatedAt'] as String),
|
||||
@ -27,6 +28,7 @@ Map<String, dynamic> _$CustomTimetableEventToJson(
|
||||
'description': instance.description,
|
||||
'startDate': MhslApi.dateTimeToJson(instance.startDate),
|
||||
'endDate': MhslApi.dateTimeToJson(instance.endDate),
|
||||
'color': instance.color,
|
||||
'rrule': instance.rrule,
|
||||
'createdAt': MhslApi.dateTimeToJson(instance.createdAt),
|
||||
'updatedAt': MhslApi.dateTimeToJson(instance.updatedAt),
|
||||
|
Reference in New Issue
Block a user