freezer/lib/settings.g.dart
Pato05 950969b774
use dartfix, make more stuff constant +
add favorite button in notifications\nfix android tv\ntry to fix library tracks (unsuccessful)\nbetter MenuSheet
2023-10-13 00:09:37 +02:00

483 lines
16 KiB
Dart

// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'settings.dart';
// **************************************************************************
// TypeAdapterGenerator
// **************************************************************************
class SettingsAdapter extends TypeAdapter<Settings> {
@override
final int typeId = 24;
@override
Settings read(BinaryReader reader) {
final numOfFields = reader.readByte();
final fields = <int, dynamic>{
for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
};
return Settings()
..language = fields[0] as String?
..ignoreInterruptions = fields[1] as bool
..enableEqualizer = fields[2] as bool
..arl = fields[3] as String?
..wifiQuality = fields[4] as AudioQuality
..mobileQuality = fields[5] as AudioQuality
..offlineQuality = fields[6] as AudioQuality
..downloadQuality = fields[7] as AudioQuality
..downloadPath = fields[8] as String?
..downloadFilename = fields[9] as String
..albumFolder = fields[10] as bool
..artistFolder = fields[11] as bool
..albumDiscFolder = fields[12] as bool
..overwriteDownload = fields[13] as bool
..downloadThreads = fields[14] as int
..playlistFolder = fields[15] as bool
..downloadLyrics = fields[16] as bool
..trackCover = fields[17] as bool
..albumCover = fields[18] as bool
..nomediaFiles = fields[19] as bool
..artistSeparator = fields[20] as String
..singletonFilename = fields[21] as String
..albumArtResolution = fields[22] as int
..tags = (fields[23] as List).cast<String>()
..theme = fields[24] as Themes
..useSystemTheme = fields[25] as bool
..colorGradientBackground = fields[26] as bool
..blurPlayerBackground = fields[27] as bool
..font = fields[28] as String
..lyricsVisualizer = fields[29] as bool
..displayMode = fields[30] as int?
..enableFilledPlayButton = fields[31] == null ? true : fields[31] as bool
..playerBackgroundOnLyrics =
fields[32] == null ? false : fields[32] as bool
..navigatorRouteType = fields[33] == null
? NavigatorRouteType.material
: fields[33] as NavigatorRouteType
..primaryColor = fields[34] == null ? Colors.blue : fields[34] as Color
..useArtColor = fields[35] as bool
..deezerLanguage = fields[36] as String
..deezerCountry = fields[37] as String
..logListen = fields[38] as bool
..proxyAddress = fields[39] as String?
..lastFMUsername = fields[40] as String?
..lastFMPassword = fields[41] as String?
..spotifyClientId = fields[42] as String?
..spotifyClientSecret = fields[43] as String?
..spotifyCredentials = fields[44] as SpotifyCredentialsSave?
..materialYouAccent = fields[45] == null ? false : fields[45] as bool
..playerAlbumArtDropShadow =
fields[46] == null ? true : fields[46] as bool
..seekAsSkip = fields[47] == null ? false : fields[47] as bool;
}
@override
void write(BinaryWriter writer, Settings obj) {
writer
..writeByte(48)
..writeByte(0)
..write(obj.language)
..writeByte(1)
..write(obj.ignoreInterruptions)
..writeByte(2)
..write(obj.enableEqualizer)
..writeByte(3)
..write(obj.arl)
..writeByte(4)
..write(obj.wifiQuality)
..writeByte(5)
..write(obj.mobileQuality)
..writeByte(6)
..write(obj.offlineQuality)
..writeByte(7)
..write(obj.downloadQuality)
..writeByte(8)
..write(obj.downloadPath)
..writeByte(9)
..write(obj.downloadFilename)
..writeByte(10)
..write(obj.albumFolder)
..writeByte(11)
..write(obj.artistFolder)
..writeByte(12)
..write(obj.albumDiscFolder)
..writeByte(13)
..write(obj.overwriteDownload)
..writeByte(14)
..write(obj.downloadThreads)
..writeByte(15)
..write(obj.playlistFolder)
..writeByte(16)
..write(obj.downloadLyrics)
..writeByte(17)
..write(obj.trackCover)
..writeByte(18)
..write(obj.albumCover)
..writeByte(19)
..write(obj.nomediaFiles)
..writeByte(20)
..write(obj.artistSeparator)
..writeByte(21)
..write(obj.singletonFilename)
..writeByte(22)
..write(obj.albumArtResolution)
..writeByte(23)
..write(obj.tags)
..writeByte(24)
..write(obj.theme)
..writeByte(25)
..write(obj.useSystemTheme)
..writeByte(26)
..write(obj.colorGradientBackground)
..writeByte(27)
..write(obj.blurPlayerBackground)
..writeByte(28)
..write(obj.font)
..writeByte(29)
..write(obj.lyricsVisualizer)
..writeByte(30)
..write(obj.displayMode)
..writeByte(31)
..write(obj.enableFilledPlayButton)
..writeByte(32)
..write(obj.playerBackgroundOnLyrics)
..writeByte(33)
..write(obj.navigatorRouteType)
..writeByte(34)
..write(obj.primaryColor)
..writeByte(35)
..write(obj.useArtColor)
..writeByte(36)
..write(obj.deezerLanguage)
..writeByte(37)
..write(obj.deezerCountry)
..writeByte(38)
..write(obj.logListen)
..writeByte(39)
..write(obj.proxyAddress)
..writeByte(40)
..write(obj.lastFMUsername)
..writeByte(41)
..write(obj.lastFMPassword)
..writeByte(42)
..write(obj.spotifyClientId)
..writeByte(43)
..write(obj.spotifyClientSecret)
..writeByte(44)
..write(obj.spotifyCredentials)
..writeByte(45)
..write(obj.materialYouAccent)
..writeByte(46)
..write(obj.playerAlbumArtDropShadow)
..writeByte(47)
..write(obj.seekAsSkip);
}
@override
int get hashCode => typeId.hashCode;
@override
bool operator ==(Object other) =>
identical(this, other) ||
other is SettingsAdapter &&
runtimeType == other.runtimeType &&
typeId == other.typeId;
}
class SpotifyCredentialsSaveAdapter
extends TypeAdapter<SpotifyCredentialsSave> {
@override
final int typeId = 25;
@override
SpotifyCredentialsSave read(BinaryReader reader) {
final numOfFields = reader.readByte();
final fields = <int, dynamic>{
for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
};
return SpotifyCredentialsSave(
accessToken: fields[0] as String?,
refreshToken: fields[1] as String?,
scopes: (fields[2] as List?)?.cast<String>(),
expiration: fields[3] as DateTime?,
);
}
@override
void write(BinaryWriter writer, SpotifyCredentialsSave obj) {
writer
..writeByte(4)
..writeByte(0)
..write(obj.accessToken)
..writeByte(1)
..write(obj.refreshToken)
..writeByte(2)
..write(obj.scopes)
..writeByte(3)
..write(obj.expiration);
}
@override
int get hashCode => typeId.hashCode;
@override
bool operator ==(Object other) =>
identical(this, other) ||
other is SpotifyCredentialsSaveAdapter &&
runtimeType == other.runtimeType &&
typeId == other.typeId;
}
class AudioQualityAdapter extends TypeAdapter<AudioQuality> {
@override
final int typeId = 29;
@override
AudioQuality read(BinaryReader reader) {
switch (reader.readByte()) {
case 0:
return AudioQuality.MP3_128;
case 1:
return AudioQuality.MP3_320;
case 2:
return AudioQuality.FLAC;
case 3:
return AudioQuality.ASK;
default:
return AudioQuality.MP3_128;
}
}
@override
void write(BinaryWriter writer, AudioQuality obj) {
switch (obj) {
case AudioQuality.MP3_128:
writer.writeByte(0);
break;
case AudioQuality.MP3_320:
writer.writeByte(1);
break;
case AudioQuality.FLAC:
writer.writeByte(2);
break;
case AudioQuality.ASK:
writer.writeByte(3);
break;
}
}
@override
int get hashCode => typeId.hashCode;
@override
bool operator ==(Object other) =>
identical(this, other) ||
other is AudioQualityAdapter &&
runtimeType == other.runtimeType &&
typeId == other.typeId;
}
class ThemesAdapter extends TypeAdapter<Themes> {
@override
final int typeId = 28;
@override
Themes read(BinaryReader reader) {
switch (reader.readByte()) {
case 0:
return Themes.Light;
case 1:
return Themes.Dark;
case 2:
return Themes.Deezer;
case 3:
return Themes.Black;
default:
return Themes.Light;
}
}
@override
void write(BinaryWriter writer, Themes obj) {
switch (obj) {
case Themes.Light:
writer.writeByte(0);
break;
case Themes.Dark:
writer.writeByte(1);
break;
case Themes.Deezer:
writer.writeByte(2);
break;
case Themes.Black:
writer.writeByte(3);
break;
}
}
@override
int get hashCode => typeId.hashCode;
@override
bool operator ==(Object other) =>
identical(this, other) ||
other is ThemesAdapter &&
runtimeType == other.runtimeType &&
typeId == other.typeId;
}
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
Settings _$SettingsFromJson(Map<String, dynamic> json) => Settings()
..language = json['language'] as String?
..ignoreInterruptions = json['ignoreInterruptions'] as bool
..enableEqualizer = json['enableEqualizer'] as bool
..arl = json['arl'] as String?
..offlineMode = json['offlineMode'] as bool
..wifiQuality = $enumDecode(_$AudioQualityEnumMap, json['wifiQuality'])
..mobileQuality = $enumDecode(_$AudioQualityEnumMap, json['mobileQuality'])
..offlineQuality = $enumDecode(_$AudioQualityEnumMap, json['offlineQuality'])
..downloadQuality =
$enumDecode(_$AudioQualityEnumMap, json['downloadQuality'])
..downloadPath = json['downloadPath'] as String?
..downloadFilename = json['downloadFilename'] as String
..albumFolder = json['albumFolder'] as bool
..artistFolder = json['artistFolder'] as bool
..albumDiscFolder = json['albumDiscFolder'] as bool
..overwriteDownload = json['overwriteDownload'] as bool
..downloadThreads = json['downloadThreads'] as int
..playlistFolder = json['playlistFolder'] as bool
..downloadLyrics = json['downloadLyrics'] as bool
..trackCover = json['trackCover'] as bool
..albumCover = json['albumCover'] as bool
..nomediaFiles = json['nomediaFiles'] as bool
..artistSeparator = json['artistSeparator'] as String
..singletonFilename = json['singletonFilename'] as String
..albumArtResolution = json['albumArtResolution'] as int
..tags = (json['tags'] as List<dynamic>).map((e) => e as String).toList()
..theme = $enumDecode(_$ThemesEnumMap, json['theme'])
..useSystemTheme = json['useSystemTheme'] as bool
..colorGradientBackground = json['colorGradientBackground'] as bool
..blurPlayerBackground = json['blurPlayerBackground'] as bool
..font = json['font'] as String
..lyricsVisualizer = json['lyricsVisualizer'] as bool
..displayMode = json['displayMode'] as int?
..enableFilledPlayButton = json['enableFilledPlayButton'] as bool
..playerBackgroundOnLyrics = json['playerBackgroundOnLyrics'] as bool
..navigatorRouteType =
$enumDecode(_$NavigatorRouteTypeEnumMap, json['navigatorRouteType'])
..primaryColor = Settings._colorFromJson(json['primaryColor'] as int?)
..useArtColor = json['useArtColor'] as bool
..deezerLanguage = json['deezerLanguage'] as String
..deezerCountry = json['deezerCountry'] as String
..logListen = json['logListen'] as bool
..proxyAddress = json['proxyAddress'] as String?
..lastFMUsername = json['lastFMUsername'] as String?
..lastFMPassword = json['lastFMPassword'] as String?
..spotifyClientId = json['spotifyClientId'] as String?
..spotifyClientSecret = json['spotifyClientSecret'] as String?
..spotifyCredentials = json['spotifyCredentials'] == null
? null
: SpotifyCredentialsSave.fromJson(
json['spotifyCredentials'] as Map<String, dynamic>)
..materialYouAccent = json['materialYouAccent'] as bool
..playerAlbumArtDropShadow = json['playerAlbumArtDropShadow'] as bool
..seekAsSkip = json['seekAsSkip'] as bool;
Map<String, dynamic> _$SettingsToJson(Settings instance) => <String, dynamic>{
'language': instance.language,
'ignoreInterruptions': instance.ignoreInterruptions,
'enableEqualizer': instance.enableEqualizer,
'arl': instance.arl,
'wifiQuality': _$AudioQualityEnumMap[instance.wifiQuality]!,
'mobileQuality': _$AudioQualityEnumMap[instance.mobileQuality]!,
'offlineQuality': _$AudioQualityEnumMap[instance.offlineQuality]!,
'downloadQuality': _$AudioQualityEnumMap[instance.downloadQuality]!,
'downloadPath': instance.downloadPath,
'downloadFilename': instance.downloadFilename,
'albumFolder': instance.albumFolder,
'artistFolder': instance.artistFolder,
'albumDiscFolder': instance.albumDiscFolder,
'overwriteDownload': instance.overwriteDownload,
'downloadThreads': instance.downloadThreads,
'playlistFolder': instance.playlistFolder,
'downloadLyrics': instance.downloadLyrics,
'trackCover': instance.trackCover,
'albumCover': instance.albumCover,
'nomediaFiles': instance.nomediaFiles,
'artistSeparator': instance.artistSeparator,
'singletonFilename': instance.singletonFilename,
'albumArtResolution': instance.albumArtResolution,
'tags': instance.tags,
'theme': _$ThemesEnumMap[instance.theme]!,
'useSystemTheme': instance.useSystemTheme,
'colorGradientBackground': instance.colorGradientBackground,
'blurPlayerBackground': instance.blurPlayerBackground,
'font': instance.font,
'lyricsVisualizer': instance.lyricsVisualizer,
'displayMode': instance.displayMode,
'enableFilledPlayButton': instance.enableFilledPlayButton,
'playerBackgroundOnLyrics': instance.playerBackgroundOnLyrics,
'navigatorRouteType':
_$NavigatorRouteTypeEnumMap[instance.navigatorRouteType]!,
'primaryColor': Settings._colorToJson(instance.primaryColor),
'useArtColor': instance.useArtColor,
'deezerLanguage': instance.deezerLanguage,
'deezerCountry': instance.deezerCountry,
'logListen': instance.logListen,
'proxyAddress': instance.proxyAddress,
'lastFMUsername': instance.lastFMUsername,
'lastFMPassword': instance.lastFMPassword,
'spotifyClientId': instance.spotifyClientId,
'spotifyClientSecret': instance.spotifyClientSecret,
'spotifyCredentials': instance.spotifyCredentials?.toJson(),
'materialYouAccent': instance.materialYouAccent,
'playerAlbumArtDropShadow': instance.playerAlbumArtDropShadow,
'seekAsSkip': instance.seekAsSkip,
};
const _$AudioQualityEnumMap = {
AudioQuality.MP3_128: 'MP3_128',
AudioQuality.MP3_320: 'MP3_320',
AudioQuality.FLAC: 'FLAC',
AudioQuality.ASK: 'ASK',
};
const _$ThemesEnumMap = {
Themes.Light: 'Light',
Themes.Dark: 'Dark',
Themes.Deezer: 'Deezer',
Themes.Black: 'Black',
};
const _$NavigatorRouteTypeEnumMap = {
NavigatorRouteType.blur_slide: 'blur_slide',
NavigatorRouteType.fade: 'fade',
NavigatorRouteType.fade_blur: 'fade_blur',
NavigatorRouteType.material: 'material',
NavigatorRouteType.cupertino: 'cupertino',
};
SpotifyCredentialsSave _$SpotifyCredentialsSaveFromJson(
Map<String, dynamic> json) =>
SpotifyCredentialsSave(
accessToken: json['accessToken'] as String?,
refreshToken: json['refreshToken'] as String?,
scopes:
(json['scopes'] as List<dynamic>?)?.map((e) => e as String).toList(),
expiration: json['expiration'] == null
? null
: DateTime.parse(json['expiration'] as String),
);
Map<String, dynamic> _$SpotifyCredentialsSaveToJson(
SpotifyCredentialsSave instance) =>
<String, dynamic>{
'accessToken': instance.accessToken,
'refreshToken': instance.refreshToken,
'scopes': instance.scopes,
'expiration': instance.expiration?.toIso8601String(),
};