45 lines
1.4 KiB
Dart
45 lines
1.4 KiB
Dart
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
|
|
part of 'timetable_favorites_settings.dart';
|
|
|
|
// **************************************************************************
|
|
// JsonSerializableGenerator
|
|
// **************************************************************************
|
|
|
|
FavoriteTimetableElement _$FavoriteTimetableElementFromJson(
|
|
Map<String, dynamic> json,
|
|
) => FavoriteTimetableElement(
|
|
type: $enumDecode(_$TimetableElementTypeEnumMap, json['type']),
|
|
id: (json['id'] as num).toInt(),
|
|
label: json['label'] as String,
|
|
);
|
|
|
|
Map<String, dynamic> _$FavoriteTimetableElementToJson(
|
|
FavoriteTimetableElement instance,
|
|
) => <String, dynamic>{
|
|
'type': _$TimetableElementTypeEnumMap[instance.type]!,
|
|
'id': instance.id,
|
|
'label': instance.label,
|
|
};
|
|
|
|
const _$TimetableElementTypeEnumMap = {
|
|
TimetableElementType.student: 'student',
|
|
TimetableElementType.teacher: 'teacher',
|
|
TimetableElementType.room: 'room',
|
|
TimetableElementType.schoolClass: 'schoolClass',
|
|
};
|
|
|
|
TimetableFavoritesSettings _$TimetableFavoritesSettingsFromJson(
|
|
Map<String, dynamic> json,
|
|
) => TimetableFavoritesSettings(
|
|
favorites: (json['favorites'] as List<dynamic>)
|
|
.map((e) => FavoriteTimetableElement.fromJson(e as Map<String, dynamic>))
|
|
.toList(),
|
|
);
|
|
|
|
Map<String, dynamic> _$TimetableFavoritesSettingsToJson(
|
|
TimetableFavoritesSettings instance,
|
|
) => <String, dynamic>{
|
|
'favorites': instance.favorites.map((e) => e.toJson()).toList(),
|
|
};
|