// GENERATED CODE - DO NOT MODIFY BY HAND part of 'cache.dart'; // ************************************************************************** // JsonSerializableGenerator // ************************************************************************** Cache _$CacheFromJson(Map json) => Cache( libraryTracks: (json['libraryTracks'] as List?) ?.map((e) => e as String) .toList(), ) ..history = (json['history'] as List?) ?.map((e) => Track.fromJson(e as Map)) .toList() ?? [] ..sorts = (json['sorts'] as List?) ?.map((e) => Sorting.fromJson(e as Map)) .toList() ?? [] ..searchHistory = Cache._searchHistoryFromJson(json['searchHistory2'] as List?) ..threadsWarning = json['threadsWarning'] as bool? ?? false ..lastUpdateCheck = (json['lastUpdateCheck'] as num?)?.toInt() ?? 0; Map _$CacheToJson(Cache instance) => { 'libraryTracks': instance.libraryTracks, 'history': instance.history, 'sorts': instance.sorts, 'searchHistory2': Cache._searchHistoryToJson(instance.searchHistory), 'threadsWarning': instance.threadsWarning, 'lastUpdateCheck': instance.lastUpdateCheck, }; SearchHistoryItem _$SearchHistoryItemFromJson(Map json) => SearchHistoryItem( json['data'], $enumDecode(_$SearchHistoryItemTypeEnumMap, json['type']), ); Map _$SearchHistoryItemToJson(SearchHistoryItem instance) => { 'data': instance.data, 'type': _$SearchHistoryItemTypeEnumMap[instance.type]!, }; const _$SearchHistoryItemTypeEnumMap = { SearchHistoryItemType.TRACK: 'TRACK', SearchHistoryItemType.ALBUM: 'ALBUM', SearchHistoryItemType.ARTIST: 'ARTIST', SearchHistoryItemType.PLAYLIST: 'PLAYLIST', };