mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-09-13 07:55:18 +00:00

* chore: fix analyzer issues * fix(updater): dead link (#1408) * docs: broken link in README.md (fixes #1310) (#1311) * docs: remove appimage link in readme #1082 (#1171) * Updating Readme according to #1082 Updating Readme according to #1082 * Added explanation The explanation is now given and the expression is more formal and explanatory, instead of just linking the issue. * Update use_update_checker.dart --------- Co-authored-by: MerkomassDev <70111455+MerkomassDev@users.noreply.github.com> Co-authored-by: Karim <37943746+ksaadDE@users.noreply.github.com> Co-authored-by: Kingkor Roy Tirtho <krtirtho@gmail.com> * fix(linux): tray icon not showing #541 upgrade old packages * fix(search): load more button not working #1417 * fix: spotify friends and user profile icon (mobile) showing when not authenticated #1410 * chore: add docker and m1 based linux arm build * cd: fix sed failing us * cd: use docker cask * fix: windows SSL Certificate error breaking login #905 (#1474) * fix: certificate error by using custom ssl certificate * Cd/docker linux ar (#1468) * cd: use docker buildx * cd: use linux host for linux arm instead of macos m1 m1 doesn't support nested virtualization. (Apple truly sucks) * cd: don't specify arch in Dockerfile * cd: use custom Dockerfile from ubuntu instead of flutter image * cd: add setup java for android * cd: add flutter distributor pre-built docker image for arm * cd: save me from this cursed arm build * cd: ?? * cd: ?? * cd: use docker build * fix: windows SSL Exception for Signing in * refactor: extract update checker as a basic function instead of a hook * cd: fix windows build error due to nightly version format * cd: fix github versioning scheme * chore: remove assets/ca entry in pubspec.yaml * fix(macos): Logs directory not created by default #1353 * refactor: Dart based Github Workflow CLI (#1490) * feat: add build dart script for windows * feat: add android build support * feat: add linux build support * feat: add macos build support * feat: add ios build support * feat: add deps install command and workflow file * cd: what? * cd: what? * cd: what? * cd: update workflow inputs * cd: replace release binary * cd: run flutter pub get * cd: use dpkg zstd instead of xz, windows disable innoInstall, fix channel enum.name and reset pubspec after changing build no for nightly * cd: fix tar copy path * cd: fix copy linux command * cd: fix windows inno depend and fix android aab path * cd: idk * cd: linux why??? * cd: windows choco copy failed * cd: use dart tar archive for creating tar file * cd: fix linux file copy error * cd: use tar command directly * feat: add linux_arm platform * cd: add linux_arm platform * cd: don't know what? * feat: notification about nightly channel update * chore: fix some errors parsing nightly version info * refactor: move dart scripts as commands under CLI * chore: add translated message command to command list * feat(translations): add Basque translation (#1493) * added Basque translation * chore: fix country codes and language native name --------- Co-authored-by: Kingkor Roy Tirtho <krtirtho@gmail.com> * feat(translations): add georgian language (#1450) * feat: add georgian language * feat: translate more georgian words * feat(translations): add Finnish translations (#1449) * docs: broken link in README.md (fixes #1310) (#1311) * docs: remove appimage link in readme #1082 (#1171) * Updating Readme according to #1082 Updating Readme according to #1082 * Added explanation The explanation is now given and the expression is more formal and explanatory, instead of just linking the issue. * added finnish translation * chore: fix arb syntax errors and language in l10n entries --------- Co-authored-by: MerkomassDev <70111455+MerkomassDev@users.noreply.github.com> Co-authored-by: Karim <37943746+ksaadDE@users.noreply.github.com> Co-authored-by: Kingkor Roy Tirtho <krtirtho@gmail.com> Co-authored-by: Onni Nevala <nevalaonni@gmail.com> * feat(translations): add Indonesian translation (#1426) * docs: broken link in README.md (fixes #1310) (#1311) * docs: remove appimage link in readme #1082 (#1171) * Updating Readme according to #1082 Updating Readme according to #1082 * Added explanation The explanation is now given and the expression is more formal and explanatory, instead of just linking the issue. * Add Indonesia translation --------- Co-authored-by: MerkomassDev <70111455+MerkomassDev@users.noreply.github.com> Co-authored-by: Karim <37943746+ksaadDE@users.noreply.github.com> Co-authored-by: Kingkor Roy Tirtho <krtirtho@gmail.com> * feat(translations): Improve tr locales (#1419) * docs: broken link in README.md (fixes #1310) (#1311) * docs: remove appimage link in readme #1082 (#1171) * Updating Readme according to #1082 Updating Readme according to #1082 * Added explanation The explanation is now given and the expression is more formal and explanatory, instead of just linking the issue. * Improve tr locales --------- Co-authored-by: MerkomassDev <70111455+MerkomassDev@users.noreply.github.com> Co-authored-by: Karim <37943746+ksaadDE@users.noreply.github.com> Co-authored-by: Kingkor Roy Tirtho <krtirtho@gmail.com> * feat(player): add volume slider floating label showing percentage (#1445) * docs: broken link in README.md (fixes #1310) (#1311) * docs: remove appimage link in readme #1082 (#1171) * Updating Readme according to #1082 Updating Readme according to #1082 * Added explanation The explanation is now given and the expression is more formal and explanatory, instead of just linking the issue. * add volume level tooltip in volume_slider --------- Co-authored-by: MerkomassDev <70111455+MerkomassDev@users.noreply.github.com> Co-authored-by: Karim <37943746+ksaadDE@users.noreply.github.com> Co-authored-by: Kingkor Roy Tirtho <krtirtho@gmail.com> * fix: fallback to LRCLIB when lyrics line less than 6 lines #1461 * feat: Local music library (#1479) * feat: add one additional library folder This folder just doesn't get downloaded to. I think I'm going to rework it so that it can be multiple folders, but I'm going to commit my progress so far anyway. Signed-off-by: Blake Leonard <me@blakes.dev> * chore: update dependencies so that it builds I'm not sure if this breaks CI or something, but I couldn't build it locally to test my changes, so I made these changes and it builds again. Signed-off-by: Blake Leonard <me@blakes.dev> * feat: index multiple folders of local music If you used a previous commit from this branch, this is a breaking change, because it changes the type of a configuration field. but since this is still in development, it should be fine. Signed-off-by: Blake Leonard <me@blakes.dev> * refactor: manage local library in local tracks tab This also refactors the list to use slivers instead. That's the easiest way to have multiple scrolling lists here... The console keeps getting spammed with some intermediate layout error but I can't hold it long enough to figure out what's causing it. Signed-off-by: Blake Leonard <me@blakes.dev> * refactor: use folder add/remove icons in library Signed-off-by: Blake Leonard <me@blakes.dev> * refactor: remove redundant settings page Signed-off-by: Blake Leonard <me@blakes.dev> * refactor: rename "Local Tracks" to just "Local" Not sure if this would be the recommended way to do it... Signed-off-by: Blake Leonard <me@blakes.dev> * fix: console spam about useless Expanded Signed-off-by: Blake Leonard <me@blakes.dev> * chore: remove completed TODO Signed-off-by: Blake Leonard <me@blakes.dev> * chore: use new Platform constants; regenerate plugins Signed-off-by: Blake Leonard <me@blakes.dev> * refactor: put local libraries on separate pages Signed-off-by: Blake Leonard <me@blakes.dev> --------- Signed-off-by: Blake Leonard <me@blakes.dev> * fix: local track not showing up in queue * feat: local library folder cards * feat: personalized stats based on local music history (#1522) * feat: add playback history provider * feat: implement recently played section * refactor: use route names * feat: add stats summary and top tracks/artists/albums * feat: add top date based filtering * feat: add stream money calculation * refactor: place search in mobile navbar and settings in home appbar * feat: add individual minutes and streams page * feat(stats): add individual minutes and streams page * chore: default period to 1 month * feat: add text to explain user how hypothetical fees are calculated * chore: ensure usage of route names instead of direct paths * cd: add cache key * cd: remove media_kit_event_loop from git * fix: some text are garbled in different parts of the app #1463 #1505 * refactor: use replace http with dio and use it as the default * cd: use dio in cli as well * chore: fix home feed not showing up * chore: downloaded tracks folder not opening * feat: play initially available tracks of playlist/album immediately and fetch rest in background #670 * feat: upgrade to Flutter 3.22.0 * refactor: migrate deprecated warnings * fix(playback): skipping tracks with unplayable sources instead of falling back #1492 * chore: migrate android gradle to declarative config syntax * chore: disable impeller for now * fix(windows): installer tries to install in current directory * chore: upgrade deps and appbar bg fix * chore: podspec update * chore: bump version and generate changelogs --------- Signed-off-by: Blake Leonard <me@blakes.dev> Co-authored-by: Kshamendra <github@ghoulcloud.slmail.me> Co-authored-by: MerkomassDev <70111455+MerkomassDev@users.noreply.github.com> Co-authored-by: Karim <37943746+ksaadDE@users.noreply.github.com> Co-authored-by: Josu Igoa <josuigoa@ni.eus> Co-authored-by: Omari Sopromadze <omari.sopromadze@gmail.com> Co-authored-by: ctih <78687256+ctih1@users.noreply.github.com> Co-authored-by: Onni Nevala <nevalaonni@gmail.com> Co-authored-by: Yusril Rapsanjani <yusriltakeuchi@gmail.com> Co-authored-by: W͏ I͏ N͏ Z͏ O͏ R͏ T͏ <75412448+mikropsoft@users.noreply.github.com> Co-authored-by: Akash Pattnaik <akashjio66666@gmail.com> Co-authored-by: Blake Leonard <blake@1024256.xyz>
752 lines
28 KiB
Dart
752 lines
28 KiB
Dart
// coverage:ignore-file
|
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
// ignore_for_file: type=lint
|
|
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
|
|
|
part of 'user_preferences_state.dart';
|
|
|
|
// **************************************************************************
|
|
// FreezedGenerator
|
|
// **************************************************************************
|
|
|
|
T _$identity<T>(T value) => value;
|
|
|
|
final _privateConstructorUsedError = UnsupportedError(
|
|
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
|
|
|
|
UserPreferences _$UserPreferencesFromJson(Map<String, dynamic> json) {
|
|
return _UserPreferences.fromJson(json);
|
|
}
|
|
|
|
/// @nodoc
|
|
mixin _$UserPreferences {
|
|
SourceQualities get audioQuality => throw _privateConstructorUsedError;
|
|
bool get albumColorSync => throw _privateConstructorUsedError;
|
|
bool get amoledDarkTheme => throw _privateConstructorUsedError;
|
|
bool get checkUpdate => throw _privateConstructorUsedError;
|
|
bool get normalizeAudio => throw _privateConstructorUsedError;
|
|
bool get showSystemTrayIcon => throw _privateConstructorUsedError;
|
|
bool get skipNonMusic => throw _privateConstructorUsedError;
|
|
bool get systemTitleBar => throw _privateConstructorUsedError;
|
|
CloseBehavior get closeBehavior => throw _privateConstructorUsedError;
|
|
@JsonKey(
|
|
fromJson: UserPreferences._accentColorSchemeFromJson,
|
|
toJson: UserPreferences._accentColorSchemeToJson,
|
|
readValue: UserPreferences._accentColorSchemeReadValue)
|
|
SpotubeColor get accentColorScheme => throw _privateConstructorUsedError;
|
|
LayoutMode get layoutMode => throw _privateConstructorUsedError;
|
|
@JsonKey(
|
|
fromJson: UserPreferences._localeFromJson,
|
|
toJson: UserPreferences._localeToJson,
|
|
readValue: UserPreferences._localeReadValue)
|
|
Locale get locale => throw _privateConstructorUsedError;
|
|
Market get recommendationMarket => throw _privateConstructorUsedError;
|
|
SearchMode get searchMode => throw _privateConstructorUsedError;
|
|
String get downloadLocation => throw _privateConstructorUsedError;
|
|
List<String> get localLibraryLocation => throw _privateConstructorUsedError;
|
|
String get pipedInstance => throw _privateConstructorUsedError;
|
|
ThemeMode get themeMode => throw _privateConstructorUsedError;
|
|
AudioSource get audioSource => throw _privateConstructorUsedError;
|
|
SourceCodecs get streamMusicCodec => throw _privateConstructorUsedError;
|
|
SourceCodecs get downloadMusicCodec => throw _privateConstructorUsedError;
|
|
bool get discordPresence => throw _privateConstructorUsedError;
|
|
bool get endlessPlayback => throw _privateConstructorUsedError;
|
|
bool get enableConnect => throw _privateConstructorUsedError;
|
|
|
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
|
@JsonKey(ignore: true)
|
|
$UserPreferencesCopyWith<UserPreferences> get copyWith =>
|
|
throw _privateConstructorUsedError;
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class $UserPreferencesCopyWith<$Res> {
|
|
factory $UserPreferencesCopyWith(
|
|
UserPreferences value, $Res Function(UserPreferences) then) =
|
|
_$UserPreferencesCopyWithImpl<$Res, UserPreferences>;
|
|
@useResult
|
|
$Res call(
|
|
{SourceQualities audioQuality,
|
|
bool albumColorSync,
|
|
bool amoledDarkTheme,
|
|
bool checkUpdate,
|
|
bool normalizeAudio,
|
|
bool showSystemTrayIcon,
|
|
bool skipNonMusic,
|
|
bool systemTitleBar,
|
|
CloseBehavior closeBehavior,
|
|
@JsonKey(
|
|
fromJson: UserPreferences._accentColorSchemeFromJson,
|
|
toJson: UserPreferences._accentColorSchemeToJson,
|
|
readValue: UserPreferences._accentColorSchemeReadValue)
|
|
SpotubeColor accentColorScheme,
|
|
LayoutMode layoutMode,
|
|
@JsonKey(
|
|
fromJson: UserPreferences._localeFromJson,
|
|
toJson: UserPreferences._localeToJson,
|
|
readValue: UserPreferences._localeReadValue)
|
|
Locale locale,
|
|
Market recommendationMarket,
|
|
SearchMode searchMode,
|
|
String downloadLocation,
|
|
List<String> localLibraryLocation,
|
|
String pipedInstance,
|
|
ThemeMode themeMode,
|
|
AudioSource audioSource,
|
|
SourceCodecs streamMusicCodec,
|
|
SourceCodecs downloadMusicCodec,
|
|
bool discordPresence,
|
|
bool endlessPlayback,
|
|
bool enableConnect});
|
|
}
|
|
|
|
/// @nodoc
|
|
class _$UserPreferencesCopyWithImpl<$Res, $Val extends UserPreferences>
|
|
implements $UserPreferencesCopyWith<$Res> {
|
|
_$UserPreferencesCopyWithImpl(this._value, this._then);
|
|
|
|
// ignore: unused_field
|
|
final $Val _value;
|
|
// ignore: unused_field
|
|
final $Res Function($Val) _then;
|
|
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? audioQuality = null,
|
|
Object? albumColorSync = null,
|
|
Object? amoledDarkTheme = null,
|
|
Object? checkUpdate = null,
|
|
Object? normalizeAudio = null,
|
|
Object? showSystemTrayIcon = null,
|
|
Object? skipNonMusic = null,
|
|
Object? systemTitleBar = null,
|
|
Object? closeBehavior = null,
|
|
Object? accentColorScheme = null,
|
|
Object? layoutMode = null,
|
|
Object? locale = null,
|
|
Object? recommendationMarket = null,
|
|
Object? searchMode = null,
|
|
Object? downloadLocation = null,
|
|
Object? localLibraryLocation = null,
|
|
Object? pipedInstance = null,
|
|
Object? themeMode = null,
|
|
Object? audioSource = null,
|
|
Object? streamMusicCodec = null,
|
|
Object? downloadMusicCodec = null,
|
|
Object? discordPresence = null,
|
|
Object? endlessPlayback = null,
|
|
Object? enableConnect = null,
|
|
}) {
|
|
return _then(_value.copyWith(
|
|
audioQuality: null == audioQuality
|
|
? _value.audioQuality
|
|
: audioQuality // ignore: cast_nullable_to_non_nullable
|
|
as SourceQualities,
|
|
albumColorSync: null == albumColorSync
|
|
? _value.albumColorSync
|
|
: albumColorSync // ignore: cast_nullable_to_non_nullable
|
|
as bool,
|
|
amoledDarkTheme: null == amoledDarkTheme
|
|
? _value.amoledDarkTheme
|
|
: amoledDarkTheme // ignore: cast_nullable_to_non_nullable
|
|
as bool,
|
|
checkUpdate: null == checkUpdate
|
|
? _value.checkUpdate
|
|
: checkUpdate // ignore: cast_nullable_to_non_nullable
|
|
as bool,
|
|
normalizeAudio: null == normalizeAudio
|
|
? _value.normalizeAudio
|
|
: normalizeAudio // ignore: cast_nullable_to_non_nullable
|
|
as bool,
|
|
showSystemTrayIcon: null == showSystemTrayIcon
|
|
? _value.showSystemTrayIcon
|
|
: showSystemTrayIcon // ignore: cast_nullable_to_non_nullable
|
|
as bool,
|
|
skipNonMusic: null == skipNonMusic
|
|
? _value.skipNonMusic
|
|
: skipNonMusic // ignore: cast_nullable_to_non_nullable
|
|
as bool,
|
|
systemTitleBar: null == systemTitleBar
|
|
? _value.systemTitleBar
|
|
: systemTitleBar // ignore: cast_nullable_to_non_nullable
|
|
as bool,
|
|
closeBehavior: null == closeBehavior
|
|
? _value.closeBehavior
|
|
: closeBehavior // ignore: cast_nullable_to_non_nullable
|
|
as CloseBehavior,
|
|
accentColorScheme: null == accentColorScheme
|
|
? _value.accentColorScheme
|
|
: accentColorScheme // ignore: cast_nullable_to_non_nullable
|
|
as SpotubeColor,
|
|
layoutMode: null == layoutMode
|
|
? _value.layoutMode
|
|
: layoutMode // ignore: cast_nullable_to_non_nullable
|
|
as LayoutMode,
|
|
locale: null == locale
|
|
? _value.locale
|
|
: locale // ignore: cast_nullable_to_non_nullable
|
|
as Locale,
|
|
recommendationMarket: null == recommendationMarket
|
|
? _value.recommendationMarket
|
|
: recommendationMarket // ignore: cast_nullable_to_non_nullable
|
|
as Market,
|
|
searchMode: null == searchMode
|
|
? _value.searchMode
|
|
: searchMode // ignore: cast_nullable_to_non_nullable
|
|
as SearchMode,
|
|
downloadLocation: null == downloadLocation
|
|
? _value.downloadLocation
|
|
: downloadLocation // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
localLibraryLocation: null == localLibraryLocation
|
|
? _value.localLibraryLocation
|
|
: localLibraryLocation // ignore: cast_nullable_to_non_nullable
|
|
as List<String>,
|
|
pipedInstance: null == pipedInstance
|
|
? _value.pipedInstance
|
|
: pipedInstance // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
themeMode: null == themeMode
|
|
? _value.themeMode
|
|
: themeMode // ignore: cast_nullable_to_non_nullable
|
|
as ThemeMode,
|
|
audioSource: null == audioSource
|
|
? _value.audioSource
|
|
: audioSource // ignore: cast_nullable_to_non_nullable
|
|
as AudioSource,
|
|
streamMusicCodec: null == streamMusicCodec
|
|
? _value.streamMusicCodec
|
|
: streamMusicCodec // ignore: cast_nullable_to_non_nullable
|
|
as SourceCodecs,
|
|
downloadMusicCodec: null == downloadMusicCodec
|
|
? _value.downloadMusicCodec
|
|
: downloadMusicCodec // ignore: cast_nullable_to_non_nullable
|
|
as SourceCodecs,
|
|
discordPresence: null == discordPresence
|
|
? _value.discordPresence
|
|
: discordPresence // ignore: cast_nullable_to_non_nullable
|
|
as bool,
|
|
endlessPlayback: null == endlessPlayback
|
|
? _value.endlessPlayback
|
|
: endlessPlayback // ignore: cast_nullable_to_non_nullable
|
|
as bool,
|
|
enableConnect: null == enableConnect
|
|
? _value.enableConnect
|
|
: enableConnect // ignore: cast_nullable_to_non_nullable
|
|
as bool,
|
|
) as $Val);
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class _$$UserPreferencesImplCopyWith<$Res>
|
|
implements $UserPreferencesCopyWith<$Res> {
|
|
factory _$$UserPreferencesImplCopyWith(_$UserPreferencesImpl value,
|
|
$Res Function(_$UserPreferencesImpl) then) =
|
|
__$$UserPreferencesImplCopyWithImpl<$Res>;
|
|
@override
|
|
@useResult
|
|
$Res call(
|
|
{SourceQualities audioQuality,
|
|
bool albumColorSync,
|
|
bool amoledDarkTheme,
|
|
bool checkUpdate,
|
|
bool normalizeAudio,
|
|
bool showSystemTrayIcon,
|
|
bool skipNonMusic,
|
|
bool systemTitleBar,
|
|
CloseBehavior closeBehavior,
|
|
@JsonKey(
|
|
fromJson: UserPreferences._accentColorSchemeFromJson,
|
|
toJson: UserPreferences._accentColorSchemeToJson,
|
|
readValue: UserPreferences._accentColorSchemeReadValue)
|
|
SpotubeColor accentColorScheme,
|
|
LayoutMode layoutMode,
|
|
@JsonKey(
|
|
fromJson: UserPreferences._localeFromJson,
|
|
toJson: UserPreferences._localeToJson,
|
|
readValue: UserPreferences._localeReadValue)
|
|
Locale locale,
|
|
Market recommendationMarket,
|
|
SearchMode searchMode,
|
|
String downloadLocation,
|
|
List<String> localLibraryLocation,
|
|
String pipedInstance,
|
|
ThemeMode themeMode,
|
|
AudioSource audioSource,
|
|
SourceCodecs streamMusicCodec,
|
|
SourceCodecs downloadMusicCodec,
|
|
bool discordPresence,
|
|
bool endlessPlayback,
|
|
bool enableConnect});
|
|
}
|
|
|
|
/// @nodoc
|
|
class __$$UserPreferencesImplCopyWithImpl<$Res>
|
|
extends _$UserPreferencesCopyWithImpl<$Res, _$UserPreferencesImpl>
|
|
implements _$$UserPreferencesImplCopyWith<$Res> {
|
|
__$$UserPreferencesImplCopyWithImpl(
|
|
_$UserPreferencesImpl _value, $Res Function(_$UserPreferencesImpl) _then)
|
|
: super(_value, _then);
|
|
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? audioQuality = null,
|
|
Object? albumColorSync = null,
|
|
Object? amoledDarkTheme = null,
|
|
Object? checkUpdate = null,
|
|
Object? normalizeAudio = null,
|
|
Object? showSystemTrayIcon = null,
|
|
Object? skipNonMusic = null,
|
|
Object? systemTitleBar = null,
|
|
Object? closeBehavior = null,
|
|
Object? accentColorScheme = null,
|
|
Object? layoutMode = null,
|
|
Object? locale = null,
|
|
Object? recommendationMarket = null,
|
|
Object? searchMode = null,
|
|
Object? downloadLocation = null,
|
|
Object? localLibraryLocation = null,
|
|
Object? pipedInstance = null,
|
|
Object? themeMode = null,
|
|
Object? audioSource = null,
|
|
Object? streamMusicCodec = null,
|
|
Object? downloadMusicCodec = null,
|
|
Object? discordPresence = null,
|
|
Object? endlessPlayback = null,
|
|
Object? enableConnect = null,
|
|
}) {
|
|
return _then(_$UserPreferencesImpl(
|
|
audioQuality: null == audioQuality
|
|
? _value.audioQuality
|
|
: audioQuality // ignore: cast_nullable_to_non_nullable
|
|
as SourceQualities,
|
|
albumColorSync: null == albumColorSync
|
|
? _value.albumColorSync
|
|
: albumColorSync // ignore: cast_nullable_to_non_nullable
|
|
as bool,
|
|
amoledDarkTheme: null == amoledDarkTheme
|
|
? _value.amoledDarkTheme
|
|
: amoledDarkTheme // ignore: cast_nullable_to_non_nullable
|
|
as bool,
|
|
checkUpdate: null == checkUpdate
|
|
? _value.checkUpdate
|
|
: checkUpdate // ignore: cast_nullable_to_non_nullable
|
|
as bool,
|
|
normalizeAudio: null == normalizeAudio
|
|
? _value.normalizeAudio
|
|
: normalizeAudio // ignore: cast_nullable_to_non_nullable
|
|
as bool,
|
|
showSystemTrayIcon: null == showSystemTrayIcon
|
|
? _value.showSystemTrayIcon
|
|
: showSystemTrayIcon // ignore: cast_nullable_to_non_nullable
|
|
as bool,
|
|
skipNonMusic: null == skipNonMusic
|
|
? _value.skipNonMusic
|
|
: skipNonMusic // ignore: cast_nullable_to_non_nullable
|
|
as bool,
|
|
systemTitleBar: null == systemTitleBar
|
|
? _value.systemTitleBar
|
|
: systemTitleBar // ignore: cast_nullable_to_non_nullable
|
|
as bool,
|
|
closeBehavior: null == closeBehavior
|
|
? _value.closeBehavior
|
|
: closeBehavior // ignore: cast_nullable_to_non_nullable
|
|
as CloseBehavior,
|
|
accentColorScheme: null == accentColorScheme
|
|
? _value.accentColorScheme
|
|
: accentColorScheme // ignore: cast_nullable_to_non_nullable
|
|
as SpotubeColor,
|
|
layoutMode: null == layoutMode
|
|
? _value.layoutMode
|
|
: layoutMode // ignore: cast_nullable_to_non_nullable
|
|
as LayoutMode,
|
|
locale: null == locale
|
|
? _value.locale
|
|
: locale // ignore: cast_nullable_to_non_nullable
|
|
as Locale,
|
|
recommendationMarket: null == recommendationMarket
|
|
? _value.recommendationMarket
|
|
: recommendationMarket // ignore: cast_nullable_to_non_nullable
|
|
as Market,
|
|
searchMode: null == searchMode
|
|
? _value.searchMode
|
|
: searchMode // ignore: cast_nullable_to_non_nullable
|
|
as SearchMode,
|
|
downloadLocation: null == downloadLocation
|
|
? _value.downloadLocation
|
|
: downloadLocation // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
localLibraryLocation: null == localLibraryLocation
|
|
? _value._localLibraryLocation
|
|
: localLibraryLocation // ignore: cast_nullable_to_non_nullable
|
|
as List<String>,
|
|
pipedInstance: null == pipedInstance
|
|
? _value.pipedInstance
|
|
: pipedInstance // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
themeMode: null == themeMode
|
|
? _value.themeMode
|
|
: themeMode // ignore: cast_nullable_to_non_nullable
|
|
as ThemeMode,
|
|
audioSource: null == audioSource
|
|
? _value.audioSource
|
|
: audioSource // ignore: cast_nullable_to_non_nullable
|
|
as AudioSource,
|
|
streamMusicCodec: null == streamMusicCodec
|
|
? _value.streamMusicCodec
|
|
: streamMusicCodec // ignore: cast_nullable_to_non_nullable
|
|
as SourceCodecs,
|
|
downloadMusicCodec: null == downloadMusicCodec
|
|
? _value.downloadMusicCodec
|
|
: downloadMusicCodec // ignore: cast_nullable_to_non_nullable
|
|
as SourceCodecs,
|
|
discordPresence: null == discordPresence
|
|
? _value.discordPresence
|
|
: discordPresence // ignore: cast_nullable_to_non_nullable
|
|
as bool,
|
|
endlessPlayback: null == endlessPlayback
|
|
? _value.endlessPlayback
|
|
: endlessPlayback // ignore: cast_nullable_to_non_nullable
|
|
as bool,
|
|
enableConnect: null == enableConnect
|
|
? _value.enableConnect
|
|
: enableConnect // ignore: cast_nullable_to_non_nullable
|
|
as bool,
|
|
));
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
@JsonSerializable()
|
|
class _$UserPreferencesImpl implements _UserPreferences {
|
|
const _$UserPreferencesImpl(
|
|
{this.audioQuality = SourceQualities.high,
|
|
this.albumColorSync = true,
|
|
this.amoledDarkTheme = false,
|
|
this.checkUpdate = true,
|
|
this.normalizeAudio = false,
|
|
this.showSystemTrayIcon = false,
|
|
this.skipNonMusic = false,
|
|
this.systemTitleBar = false,
|
|
this.closeBehavior = CloseBehavior.close,
|
|
@JsonKey(
|
|
fromJson: UserPreferences._accentColorSchemeFromJson,
|
|
toJson: UserPreferences._accentColorSchemeToJson,
|
|
readValue: UserPreferences._accentColorSchemeReadValue)
|
|
this.accentColorScheme = const SpotubeColor(0xFF2196F3, name: "Blue"),
|
|
this.layoutMode = LayoutMode.adaptive,
|
|
@JsonKey(
|
|
fromJson: UserPreferences._localeFromJson,
|
|
toJson: UserPreferences._localeToJson,
|
|
readValue: UserPreferences._localeReadValue)
|
|
this.locale = const Locale("system", "system"),
|
|
this.recommendationMarket = Market.US,
|
|
this.searchMode = SearchMode.youtube,
|
|
this.downloadLocation = "",
|
|
final List<String> localLibraryLocation = const [],
|
|
this.pipedInstance = "https://pipedapi.kavin.rocks",
|
|
this.themeMode = ThemeMode.system,
|
|
this.audioSource = AudioSource.youtube,
|
|
this.streamMusicCodec = SourceCodecs.weba,
|
|
this.downloadMusicCodec = SourceCodecs.m4a,
|
|
this.discordPresence = true,
|
|
this.endlessPlayback = true,
|
|
this.enableConnect = false})
|
|
: _localLibraryLocation = localLibraryLocation;
|
|
|
|
factory _$UserPreferencesImpl.fromJson(Map<String, dynamic> json) =>
|
|
_$$UserPreferencesImplFromJson(json);
|
|
|
|
@override
|
|
@JsonKey()
|
|
final SourceQualities audioQuality;
|
|
@override
|
|
@JsonKey()
|
|
final bool albumColorSync;
|
|
@override
|
|
@JsonKey()
|
|
final bool amoledDarkTheme;
|
|
@override
|
|
@JsonKey()
|
|
final bool checkUpdate;
|
|
@override
|
|
@JsonKey()
|
|
final bool normalizeAudio;
|
|
@override
|
|
@JsonKey()
|
|
final bool showSystemTrayIcon;
|
|
@override
|
|
@JsonKey()
|
|
final bool skipNonMusic;
|
|
@override
|
|
@JsonKey()
|
|
final bool systemTitleBar;
|
|
@override
|
|
@JsonKey()
|
|
final CloseBehavior closeBehavior;
|
|
@override
|
|
@JsonKey(
|
|
fromJson: UserPreferences._accentColorSchemeFromJson,
|
|
toJson: UserPreferences._accentColorSchemeToJson,
|
|
readValue: UserPreferences._accentColorSchemeReadValue)
|
|
final SpotubeColor accentColorScheme;
|
|
@override
|
|
@JsonKey()
|
|
final LayoutMode layoutMode;
|
|
@override
|
|
@JsonKey(
|
|
fromJson: UserPreferences._localeFromJson,
|
|
toJson: UserPreferences._localeToJson,
|
|
readValue: UserPreferences._localeReadValue)
|
|
final Locale locale;
|
|
@override
|
|
@JsonKey()
|
|
final Market recommendationMarket;
|
|
@override
|
|
@JsonKey()
|
|
final SearchMode searchMode;
|
|
@override
|
|
@JsonKey()
|
|
final String downloadLocation;
|
|
final List<String> _localLibraryLocation;
|
|
@override
|
|
@JsonKey()
|
|
List<String> get localLibraryLocation {
|
|
if (_localLibraryLocation is EqualUnmodifiableListView)
|
|
return _localLibraryLocation;
|
|
// ignore: implicit_dynamic_type
|
|
return EqualUnmodifiableListView(_localLibraryLocation);
|
|
}
|
|
|
|
@override
|
|
@JsonKey()
|
|
final String pipedInstance;
|
|
@override
|
|
@JsonKey()
|
|
final ThemeMode themeMode;
|
|
@override
|
|
@JsonKey()
|
|
final AudioSource audioSource;
|
|
@override
|
|
@JsonKey()
|
|
final SourceCodecs streamMusicCodec;
|
|
@override
|
|
@JsonKey()
|
|
final SourceCodecs downloadMusicCodec;
|
|
@override
|
|
@JsonKey()
|
|
final bool discordPresence;
|
|
@override
|
|
@JsonKey()
|
|
final bool endlessPlayback;
|
|
@override
|
|
@JsonKey()
|
|
final bool enableConnect;
|
|
|
|
@override
|
|
String toString() {
|
|
return 'UserPreferences(audioQuality: $audioQuality, albumColorSync: $albumColorSync, amoledDarkTheme: $amoledDarkTheme, checkUpdate: $checkUpdate, normalizeAudio: $normalizeAudio, showSystemTrayIcon: $showSystemTrayIcon, skipNonMusic: $skipNonMusic, systemTitleBar: $systemTitleBar, closeBehavior: $closeBehavior, accentColorScheme: $accentColorScheme, layoutMode: $layoutMode, locale: $locale, recommendationMarket: $recommendationMarket, searchMode: $searchMode, downloadLocation: $downloadLocation, localLibraryLocation: $localLibraryLocation, pipedInstance: $pipedInstance, themeMode: $themeMode, audioSource: $audioSource, streamMusicCodec: $streamMusicCodec, downloadMusicCodec: $downloadMusicCodec, discordPresence: $discordPresence, endlessPlayback: $endlessPlayback, enableConnect: $enableConnect)';
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType &&
|
|
other is _$UserPreferencesImpl &&
|
|
(identical(other.audioQuality, audioQuality) ||
|
|
other.audioQuality == audioQuality) &&
|
|
(identical(other.albumColorSync, albumColorSync) ||
|
|
other.albumColorSync == albumColorSync) &&
|
|
(identical(other.amoledDarkTheme, amoledDarkTheme) ||
|
|
other.amoledDarkTheme == amoledDarkTheme) &&
|
|
(identical(other.checkUpdate, checkUpdate) ||
|
|
other.checkUpdate == checkUpdate) &&
|
|
(identical(other.normalizeAudio, normalizeAudio) ||
|
|
other.normalizeAudio == normalizeAudio) &&
|
|
(identical(other.showSystemTrayIcon, showSystemTrayIcon) ||
|
|
other.showSystemTrayIcon == showSystemTrayIcon) &&
|
|
(identical(other.skipNonMusic, skipNonMusic) ||
|
|
other.skipNonMusic == skipNonMusic) &&
|
|
(identical(other.systemTitleBar, systemTitleBar) ||
|
|
other.systemTitleBar == systemTitleBar) &&
|
|
(identical(other.closeBehavior, closeBehavior) ||
|
|
other.closeBehavior == closeBehavior) &&
|
|
(identical(other.accentColorScheme, accentColorScheme) ||
|
|
other.accentColorScheme == accentColorScheme) &&
|
|
(identical(other.layoutMode, layoutMode) ||
|
|
other.layoutMode == layoutMode) &&
|
|
(identical(other.locale, locale) || other.locale == locale) &&
|
|
(identical(other.recommendationMarket, recommendationMarket) ||
|
|
other.recommendationMarket == recommendationMarket) &&
|
|
(identical(other.searchMode, searchMode) ||
|
|
other.searchMode == searchMode) &&
|
|
(identical(other.downloadLocation, downloadLocation) ||
|
|
other.downloadLocation == downloadLocation) &&
|
|
const DeepCollectionEquality()
|
|
.equals(other._localLibraryLocation, _localLibraryLocation) &&
|
|
(identical(other.pipedInstance, pipedInstance) ||
|
|
other.pipedInstance == pipedInstance) &&
|
|
(identical(other.themeMode, themeMode) ||
|
|
other.themeMode == themeMode) &&
|
|
(identical(other.audioSource, audioSource) ||
|
|
other.audioSource == audioSource) &&
|
|
(identical(other.streamMusicCodec, streamMusicCodec) ||
|
|
other.streamMusicCodec == streamMusicCodec) &&
|
|
(identical(other.downloadMusicCodec, downloadMusicCodec) ||
|
|
other.downloadMusicCodec == downloadMusicCodec) &&
|
|
(identical(other.discordPresence, discordPresence) ||
|
|
other.discordPresence == discordPresence) &&
|
|
(identical(other.endlessPlayback, endlessPlayback) ||
|
|
other.endlessPlayback == endlessPlayback) &&
|
|
(identical(other.enableConnect, enableConnect) ||
|
|
other.enableConnect == enableConnect));
|
|
}
|
|
|
|
@JsonKey(ignore: true)
|
|
@override
|
|
int get hashCode => Object.hashAll([
|
|
runtimeType,
|
|
audioQuality,
|
|
albumColorSync,
|
|
amoledDarkTheme,
|
|
checkUpdate,
|
|
normalizeAudio,
|
|
showSystemTrayIcon,
|
|
skipNonMusic,
|
|
systemTitleBar,
|
|
closeBehavior,
|
|
accentColorScheme,
|
|
layoutMode,
|
|
locale,
|
|
recommendationMarket,
|
|
searchMode,
|
|
downloadLocation,
|
|
const DeepCollectionEquality().hash(_localLibraryLocation),
|
|
pipedInstance,
|
|
themeMode,
|
|
audioSource,
|
|
streamMusicCodec,
|
|
downloadMusicCodec,
|
|
discordPresence,
|
|
endlessPlayback,
|
|
enableConnect
|
|
]);
|
|
|
|
@JsonKey(ignore: true)
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
_$$UserPreferencesImplCopyWith<_$UserPreferencesImpl> get copyWith =>
|
|
__$$UserPreferencesImplCopyWithImpl<_$UserPreferencesImpl>(
|
|
this, _$identity);
|
|
|
|
@override
|
|
Map<String, dynamic> toJson() {
|
|
return _$$UserPreferencesImplToJson(
|
|
this,
|
|
);
|
|
}
|
|
}
|
|
|
|
abstract class _UserPreferences implements UserPreferences {
|
|
const factory _UserPreferences(
|
|
{final SourceQualities audioQuality,
|
|
final bool albumColorSync,
|
|
final bool amoledDarkTheme,
|
|
final bool checkUpdate,
|
|
final bool normalizeAudio,
|
|
final bool showSystemTrayIcon,
|
|
final bool skipNonMusic,
|
|
final bool systemTitleBar,
|
|
final CloseBehavior closeBehavior,
|
|
@JsonKey(
|
|
fromJson: UserPreferences._accentColorSchemeFromJson,
|
|
toJson: UserPreferences._accentColorSchemeToJson,
|
|
readValue: UserPreferences._accentColorSchemeReadValue)
|
|
final SpotubeColor accentColorScheme,
|
|
final LayoutMode layoutMode,
|
|
@JsonKey(
|
|
fromJson: UserPreferences._localeFromJson,
|
|
toJson: UserPreferences._localeToJson,
|
|
readValue: UserPreferences._localeReadValue)
|
|
final Locale locale,
|
|
final Market recommendationMarket,
|
|
final SearchMode searchMode,
|
|
final String downloadLocation,
|
|
final List<String> localLibraryLocation,
|
|
final String pipedInstance,
|
|
final ThemeMode themeMode,
|
|
final AudioSource audioSource,
|
|
final SourceCodecs streamMusicCodec,
|
|
final SourceCodecs downloadMusicCodec,
|
|
final bool discordPresence,
|
|
final bool endlessPlayback,
|
|
final bool enableConnect}) = _$UserPreferencesImpl;
|
|
|
|
factory _UserPreferences.fromJson(Map<String, dynamic> json) =
|
|
_$UserPreferencesImpl.fromJson;
|
|
|
|
@override
|
|
SourceQualities get audioQuality;
|
|
@override
|
|
bool get albumColorSync;
|
|
@override
|
|
bool get amoledDarkTheme;
|
|
@override
|
|
bool get checkUpdate;
|
|
@override
|
|
bool get normalizeAudio;
|
|
@override
|
|
bool get showSystemTrayIcon;
|
|
@override
|
|
bool get skipNonMusic;
|
|
@override
|
|
bool get systemTitleBar;
|
|
@override
|
|
CloseBehavior get closeBehavior;
|
|
@override
|
|
@JsonKey(
|
|
fromJson: UserPreferences._accentColorSchemeFromJson,
|
|
toJson: UserPreferences._accentColorSchemeToJson,
|
|
readValue: UserPreferences._accentColorSchemeReadValue)
|
|
SpotubeColor get accentColorScheme;
|
|
@override
|
|
LayoutMode get layoutMode;
|
|
@override
|
|
@JsonKey(
|
|
fromJson: UserPreferences._localeFromJson,
|
|
toJson: UserPreferences._localeToJson,
|
|
readValue: UserPreferences._localeReadValue)
|
|
Locale get locale;
|
|
@override
|
|
Market get recommendationMarket;
|
|
@override
|
|
SearchMode get searchMode;
|
|
@override
|
|
String get downloadLocation;
|
|
@override
|
|
List<String> get localLibraryLocation;
|
|
@override
|
|
String get pipedInstance;
|
|
@override
|
|
ThemeMode get themeMode;
|
|
@override
|
|
AudioSource get audioSource;
|
|
@override
|
|
SourceCodecs get streamMusicCodec;
|
|
@override
|
|
SourceCodecs get downloadMusicCodec;
|
|
@override
|
|
bool get discordPresence;
|
|
@override
|
|
bool get endlessPlayback;
|
|
@override
|
|
bool get enableConnect;
|
|
@override
|
|
@JsonKey(ignore: true)
|
|
_$$UserPreferencesImplCopyWith<_$UserPreferencesImpl> get copyWith =>
|
|
throw _privateConstructorUsedError;
|
|
}
|