implemented custom subject colors for the timetable and unified the color palette system
This commit is contained in:
+5
@@ -10,10 +10,15 @@ class McSubject {
|
||||
final String shortName;
|
||||
final String longName;
|
||||
|
||||
/// Persönliche Fach-Farbe (Palette-Name aus [SubjectColor]), serverseitig pro
|
||||
/// Nutzer gepflegt. `null`, wenn für dieses Fach keine Farbe gesetzt ist.
|
||||
final String? color;
|
||||
|
||||
McSubject({
|
||||
required this.id,
|
||||
required this.shortName,
|
||||
required this.longName,
|
||||
this.color,
|
||||
});
|
||||
|
||||
factory McSubject.fromJson(Map<String, dynamic> json) =>
|
||||
|
||||
+2
@@ -10,12 +10,14 @@ McSubject _$McSubjectFromJson(Map<String, dynamic> json) => McSubject(
|
||||
id: (json['id'] as num).toInt(),
|
||||
shortName: json['shortName'] as String,
|
||||
longName: json['longName'] as String,
|
||||
color: json['color'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$McSubjectToJson(McSubject instance) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'shortName': instance.shortName,
|
||||
'longName': instance.longName,
|
||||
'color': instance.color,
|
||||
};
|
||||
|
||||
TimetableGetSubjectsResponse _$TimetableGetSubjectsResponseFromJson(
|
||||
|
||||
Reference in New Issue
Block a user