mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-09-14 00:15:17 +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>
611 lines
20 KiB
Dart
611 lines
20 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 'connect.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');
|
|
|
|
WebSocketLoadEventData _$WebSocketLoadEventDataFromJson(
|
|
Map<String, dynamic> json) {
|
|
switch (json['runtimeType']) {
|
|
case 'playlist':
|
|
return WebSocketLoadEventDataPlaylist.fromJson(json);
|
|
case 'album':
|
|
return WebSocketLoadEventDataAlbum.fromJson(json);
|
|
|
|
default:
|
|
throw CheckedFromJsonException(
|
|
json,
|
|
'runtimeType',
|
|
'WebSocketLoadEventData',
|
|
'Invalid union type "${json['runtimeType']}"!');
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
mixin _$WebSocketLoadEventData {
|
|
@JsonKey(name: 'tracks', toJson: _tracksJson)
|
|
List<Track> get tracks => throw _privateConstructorUsedError;
|
|
Object? get collection => throw _privateConstructorUsedError;
|
|
int? get initialIndex => throw _privateConstructorUsedError;
|
|
@optionalTypeArgs
|
|
TResult when<TResult extends Object?>({
|
|
required TResult Function(
|
|
@JsonKey(name: 'tracks', toJson: _tracksJson) List<Track> tracks,
|
|
PlaylistSimple? collection,
|
|
int? initialIndex)
|
|
playlist,
|
|
required TResult Function(
|
|
@JsonKey(name: 'tracks', toJson: _tracksJson) List<Track> tracks,
|
|
AlbumSimple? collection,
|
|
int? initialIndex)
|
|
album,
|
|
}) =>
|
|
throw _privateConstructorUsedError;
|
|
@optionalTypeArgs
|
|
TResult? whenOrNull<TResult extends Object?>({
|
|
TResult? Function(
|
|
@JsonKey(name: 'tracks', toJson: _tracksJson) List<Track> tracks,
|
|
PlaylistSimple? collection,
|
|
int? initialIndex)?
|
|
playlist,
|
|
TResult? Function(
|
|
@JsonKey(name: 'tracks', toJson: _tracksJson) List<Track> tracks,
|
|
AlbumSimple? collection,
|
|
int? initialIndex)?
|
|
album,
|
|
}) =>
|
|
throw _privateConstructorUsedError;
|
|
@optionalTypeArgs
|
|
TResult maybeWhen<TResult extends Object?>({
|
|
TResult Function(
|
|
@JsonKey(name: 'tracks', toJson: _tracksJson) List<Track> tracks,
|
|
PlaylistSimple? collection,
|
|
int? initialIndex)?
|
|
playlist,
|
|
TResult Function(
|
|
@JsonKey(name: 'tracks', toJson: _tracksJson) List<Track> tracks,
|
|
AlbumSimple? collection,
|
|
int? initialIndex)?
|
|
album,
|
|
required TResult orElse(),
|
|
}) =>
|
|
throw _privateConstructorUsedError;
|
|
@optionalTypeArgs
|
|
TResult map<TResult extends Object?>({
|
|
required TResult Function(WebSocketLoadEventDataPlaylist value) playlist,
|
|
required TResult Function(WebSocketLoadEventDataAlbum value) album,
|
|
}) =>
|
|
throw _privateConstructorUsedError;
|
|
@optionalTypeArgs
|
|
TResult? mapOrNull<TResult extends Object?>({
|
|
TResult? Function(WebSocketLoadEventDataPlaylist value)? playlist,
|
|
TResult? Function(WebSocketLoadEventDataAlbum value)? album,
|
|
}) =>
|
|
throw _privateConstructorUsedError;
|
|
@optionalTypeArgs
|
|
TResult maybeMap<TResult extends Object?>({
|
|
TResult Function(WebSocketLoadEventDataPlaylist value)? playlist,
|
|
TResult Function(WebSocketLoadEventDataAlbum value)? album,
|
|
required TResult orElse(),
|
|
}) =>
|
|
throw _privateConstructorUsedError;
|
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
|
@JsonKey(ignore: true)
|
|
$WebSocketLoadEventDataCopyWith<WebSocketLoadEventData> get copyWith =>
|
|
throw _privateConstructorUsedError;
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class $WebSocketLoadEventDataCopyWith<$Res> {
|
|
factory $WebSocketLoadEventDataCopyWith(WebSocketLoadEventData value,
|
|
$Res Function(WebSocketLoadEventData) then) =
|
|
_$WebSocketLoadEventDataCopyWithImpl<$Res, WebSocketLoadEventData>;
|
|
@useResult
|
|
$Res call(
|
|
{@JsonKey(name: 'tracks', toJson: _tracksJson) List<Track> tracks,
|
|
int? initialIndex});
|
|
}
|
|
|
|
/// @nodoc
|
|
class _$WebSocketLoadEventDataCopyWithImpl<$Res,
|
|
$Val extends WebSocketLoadEventData>
|
|
implements $WebSocketLoadEventDataCopyWith<$Res> {
|
|
_$WebSocketLoadEventDataCopyWithImpl(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? tracks = null,
|
|
Object? initialIndex = freezed,
|
|
}) {
|
|
return _then(_value.copyWith(
|
|
tracks: null == tracks
|
|
? _value.tracks
|
|
: tracks // ignore: cast_nullable_to_non_nullable
|
|
as List<Track>,
|
|
initialIndex: freezed == initialIndex
|
|
? _value.initialIndex
|
|
: initialIndex // ignore: cast_nullable_to_non_nullable
|
|
as int?,
|
|
) as $Val);
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class _$$WebSocketLoadEventDataPlaylistImplCopyWith<$Res>
|
|
implements $WebSocketLoadEventDataCopyWith<$Res> {
|
|
factory _$$WebSocketLoadEventDataPlaylistImplCopyWith(
|
|
_$WebSocketLoadEventDataPlaylistImpl value,
|
|
$Res Function(_$WebSocketLoadEventDataPlaylistImpl) then) =
|
|
__$$WebSocketLoadEventDataPlaylistImplCopyWithImpl<$Res>;
|
|
@override
|
|
@useResult
|
|
$Res call(
|
|
{@JsonKey(name: 'tracks', toJson: _tracksJson) List<Track> tracks,
|
|
PlaylistSimple? collection,
|
|
int? initialIndex});
|
|
}
|
|
|
|
/// @nodoc
|
|
class __$$WebSocketLoadEventDataPlaylistImplCopyWithImpl<$Res>
|
|
extends _$WebSocketLoadEventDataCopyWithImpl<$Res,
|
|
_$WebSocketLoadEventDataPlaylistImpl>
|
|
implements _$$WebSocketLoadEventDataPlaylistImplCopyWith<$Res> {
|
|
__$$WebSocketLoadEventDataPlaylistImplCopyWithImpl(
|
|
_$WebSocketLoadEventDataPlaylistImpl _value,
|
|
$Res Function(_$WebSocketLoadEventDataPlaylistImpl) _then)
|
|
: super(_value, _then);
|
|
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? tracks = null,
|
|
Object? collection = freezed,
|
|
Object? initialIndex = freezed,
|
|
}) {
|
|
return _then(_$WebSocketLoadEventDataPlaylistImpl(
|
|
tracks: null == tracks
|
|
? _value._tracks
|
|
: tracks // ignore: cast_nullable_to_non_nullable
|
|
as List<Track>,
|
|
collection: freezed == collection
|
|
? _value.collection
|
|
: collection // ignore: cast_nullable_to_non_nullable
|
|
as PlaylistSimple?,
|
|
initialIndex: freezed == initialIndex
|
|
? _value.initialIndex
|
|
: initialIndex // ignore: cast_nullable_to_non_nullable
|
|
as int?,
|
|
));
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
@JsonSerializable()
|
|
class _$WebSocketLoadEventDataPlaylistImpl
|
|
extends WebSocketLoadEventDataPlaylist {
|
|
_$WebSocketLoadEventDataPlaylistImpl(
|
|
{@JsonKey(name: 'tracks', toJson: _tracksJson)
|
|
required final List<Track> tracks,
|
|
this.collection,
|
|
this.initialIndex,
|
|
final String? $type})
|
|
: _tracks = tracks,
|
|
$type = $type ?? 'playlist',
|
|
super._();
|
|
|
|
factory _$WebSocketLoadEventDataPlaylistImpl.fromJson(
|
|
Map<String, dynamic> json) =>
|
|
_$$WebSocketLoadEventDataPlaylistImplFromJson(json);
|
|
|
|
final List<Track> _tracks;
|
|
@override
|
|
@JsonKey(name: 'tracks', toJson: _tracksJson)
|
|
List<Track> get tracks {
|
|
if (_tracks is EqualUnmodifiableListView) return _tracks;
|
|
// ignore: implicit_dynamic_type
|
|
return EqualUnmodifiableListView(_tracks);
|
|
}
|
|
|
|
@override
|
|
final PlaylistSimple? collection;
|
|
@override
|
|
final int? initialIndex;
|
|
|
|
@JsonKey(name: 'runtimeType')
|
|
final String $type;
|
|
|
|
@override
|
|
String toString() {
|
|
return 'WebSocketLoadEventData.playlist(tracks: $tracks, collection: $collection, initialIndex: $initialIndex)';
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType &&
|
|
other is _$WebSocketLoadEventDataPlaylistImpl &&
|
|
const DeepCollectionEquality().equals(other._tracks, _tracks) &&
|
|
(identical(other.collection, collection) ||
|
|
other.collection == collection) &&
|
|
(identical(other.initialIndex, initialIndex) ||
|
|
other.initialIndex == initialIndex));
|
|
}
|
|
|
|
@JsonKey(ignore: true)
|
|
@override
|
|
int get hashCode => Object.hash(runtimeType,
|
|
const DeepCollectionEquality().hash(_tracks), collection, initialIndex);
|
|
|
|
@JsonKey(ignore: true)
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
_$$WebSocketLoadEventDataPlaylistImplCopyWith<
|
|
_$WebSocketLoadEventDataPlaylistImpl>
|
|
get copyWith => __$$WebSocketLoadEventDataPlaylistImplCopyWithImpl<
|
|
_$WebSocketLoadEventDataPlaylistImpl>(this, _$identity);
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult when<TResult extends Object?>({
|
|
required TResult Function(
|
|
@JsonKey(name: 'tracks', toJson: _tracksJson) List<Track> tracks,
|
|
PlaylistSimple? collection,
|
|
int? initialIndex)
|
|
playlist,
|
|
required TResult Function(
|
|
@JsonKey(name: 'tracks', toJson: _tracksJson) List<Track> tracks,
|
|
AlbumSimple? collection,
|
|
int? initialIndex)
|
|
album,
|
|
}) {
|
|
return playlist(tracks, collection, initialIndex);
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult? whenOrNull<TResult extends Object?>({
|
|
TResult? Function(
|
|
@JsonKey(name: 'tracks', toJson: _tracksJson) List<Track> tracks,
|
|
PlaylistSimple? collection,
|
|
int? initialIndex)?
|
|
playlist,
|
|
TResult? Function(
|
|
@JsonKey(name: 'tracks', toJson: _tracksJson) List<Track> tracks,
|
|
AlbumSimple? collection,
|
|
int? initialIndex)?
|
|
album,
|
|
}) {
|
|
return playlist?.call(tracks, collection, initialIndex);
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult maybeWhen<TResult extends Object?>({
|
|
TResult Function(
|
|
@JsonKey(name: 'tracks', toJson: _tracksJson) List<Track> tracks,
|
|
PlaylistSimple? collection,
|
|
int? initialIndex)?
|
|
playlist,
|
|
TResult Function(
|
|
@JsonKey(name: 'tracks', toJson: _tracksJson) List<Track> tracks,
|
|
AlbumSimple? collection,
|
|
int? initialIndex)?
|
|
album,
|
|
required TResult orElse(),
|
|
}) {
|
|
if (playlist != null) {
|
|
return playlist(tracks, collection, initialIndex);
|
|
}
|
|
return orElse();
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult map<TResult extends Object?>({
|
|
required TResult Function(WebSocketLoadEventDataPlaylist value) playlist,
|
|
required TResult Function(WebSocketLoadEventDataAlbum value) album,
|
|
}) {
|
|
return playlist(this);
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult? mapOrNull<TResult extends Object?>({
|
|
TResult? Function(WebSocketLoadEventDataPlaylist value)? playlist,
|
|
TResult? Function(WebSocketLoadEventDataAlbum value)? album,
|
|
}) {
|
|
return playlist?.call(this);
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult maybeMap<TResult extends Object?>({
|
|
TResult Function(WebSocketLoadEventDataPlaylist value)? playlist,
|
|
TResult Function(WebSocketLoadEventDataAlbum value)? album,
|
|
required TResult orElse(),
|
|
}) {
|
|
if (playlist != null) {
|
|
return playlist(this);
|
|
}
|
|
return orElse();
|
|
}
|
|
|
|
@override
|
|
Map<String, dynamic> toJson() {
|
|
return _$$WebSocketLoadEventDataPlaylistImplToJson(
|
|
this,
|
|
);
|
|
}
|
|
}
|
|
|
|
abstract class WebSocketLoadEventDataPlaylist extends WebSocketLoadEventData {
|
|
factory WebSocketLoadEventDataPlaylist(
|
|
{@JsonKey(name: 'tracks', toJson: _tracksJson)
|
|
required final List<Track> tracks,
|
|
final PlaylistSimple? collection,
|
|
final int? initialIndex}) = _$WebSocketLoadEventDataPlaylistImpl;
|
|
WebSocketLoadEventDataPlaylist._() : super._();
|
|
|
|
factory WebSocketLoadEventDataPlaylist.fromJson(Map<String, dynamic> json) =
|
|
_$WebSocketLoadEventDataPlaylistImpl.fromJson;
|
|
|
|
@override
|
|
@JsonKey(name: 'tracks', toJson: _tracksJson)
|
|
List<Track> get tracks;
|
|
@override
|
|
PlaylistSimple? get collection;
|
|
@override
|
|
int? get initialIndex;
|
|
@override
|
|
@JsonKey(ignore: true)
|
|
_$$WebSocketLoadEventDataPlaylistImplCopyWith<
|
|
_$WebSocketLoadEventDataPlaylistImpl>
|
|
get copyWith => throw _privateConstructorUsedError;
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class _$$WebSocketLoadEventDataAlbumImplCopyWith<$Res>
|
|
implements $WebSocketLoadEventDataCopyWith<$Res> {
|
|
factory _$$WebSocketLoadEventDataAlbumImplCopyWith(
|
|
_$WebSocketLoadEventDataAlbumImpl value,
|
|
$Res Function(_$WebSocketLoadEventDataAlbumImpl) then) =
|
|
__$$WebSocketLoadEventDataAlbumImplCopyWithImpl<$Res>;
|
|
@override
|
|
@useResult
|
|
$Res call(
|
|
{@JsonKey(name: 'tracks', toJson: _tracksJson) List<Track> tracks,
|
|
AlbumSimple? collection,
|
|
int? initialIndex});
|
|
}
|
|
|
|
/// @nodoc
|
|
class __$$WebSocketLoadEventDataAlbumImplCopyWithImpl<$Res>
|
|
extends _$WebSocketLoadEventDataCopyWithImpl<$Res,
|
|
_$WebSocketLoadEventDataAlbumImpl>
|
|
implements _$$WebSocketLoadEventDataAlbumImplCopyWith<$Res> {
|
|
__$$WebSocketLoadEventDataAlbumImplCopyWithImpl(
|
|
_$WebSocketLoadEventDataAlbumImpl _value,
|
|
$Res Function(_$WebSocketLoadEventDataAlbumImpl) _then)
|
|
: super(_value, _then);
|
|
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? tracks = null,
|
|
Object? collection = freezed,
|
|
Object? initialIndex = freezed,
|
|
}) {
|
|
return _then(_$WebSocketLoadEventDataAlbumImpl(
|
|
tracks: null == tracks
|
|
? _value._tracks
|
|
: tracks // ignore: cast_nullable_to_non_nullable
|
|
as List<Track>,
|
|
collection: freezed == collection
|
|
? _value.collection
|
|
: collection // ignore: cast_nullable_to_non_nullable
|
|
as AlbumSimple?,
|
|
initialIndex: freezed == initialIndex
|
|
? _value.initialIndex
|
|
: initialIndex // ignore: cast_nullable_to_non_nullable
|
|
as int?,
|
|
));
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
@JsonSerializable()
|
|
class _$WebSocketLoadEventDataAlbumImpl extends WebSocketLoadEventDataAlbum {
|
|
_$WebSocketLoadEventDataAlbumImpl(
|
|
{@JsonKey(name: 'tracks', toJson: _tracksJson)
|
|
required final List<Track> tracks,
|
|
this.collection,
|
|
this.initialIndex,
|
|
final String? $type})
|
|
: _tracks = tracks,
|
|
$type = $type ?? 'album',
|
|
super._();
|
|
|
|
factory _$WebSocketLoadEventDataAlbumImpl.fromJson(
|
|
Map<String, dynamic> json) =>
|
|
_$$WebSocketLoadEventDataAlbumImplFromJson(json);
|
|
|
|
final List<Track> _tracks;
|
|
@override
|
|
@JsonKey(name: 'tracks', toJson: _tracksJson)
|
|
List<Track> get tracks {
|
|
if (_tracks is EqualUnmodifiableListView) return _tracks;
|
|
// ignore: implicit_dynamic_type
|
|
return EqualUnmodifiableListView(_tracks);
|
|
}
|
|
|
|
@override
|
|
final AlbumSimple? collection;
|
|
@override
|
|
final int? initialIndex;
|
|
|
|
@JsonKey(name: 'runtimeType')
|
|
final String $type;
|
|
|
|
@override
|
|
String toString() {
|
|
return 'WebSocketLoadEventData.album(tracks: $tracks, collection: $collection, initialIndex: $initialIndex)';
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType &&
|
|
other is _$WebSocketLoadEventDataAlbumImpl &&
|
|
const DeepCollectionEquality().equals(other._tracks, _tracks) &&
|
|
(identical(other.collection, collection) ||
|
|
other.collection == collection) &&
|
|
(identical(other.initialIndex, initialIndex) ||
|
|
other.initialIndex == initialIndex));
|
|
}
|
|
|
|
@JsonKey(ignore: true)
|
|
@override
|
|
int get hashCode => Object.hash(runtimeType,
|
|
const DeepCollectionEquality().hash(_tracks), collection, initialIndex);
|
|
|
|
@JsonKey(ignore: true)
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
_$$WebSocketLoadEventDataAlbumImplCopyWith<_$WebSocketLoadEventDataAlbumImpl>
|
|
get copyWith => __$$WebSocketLoadEventDataAlbumImplCopyWithImpl<
|
|
_$WebSocketLoadEventDataAlbumImpl>(this, _$identity);
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult when<TResult extends Object?>({
|
|
required TResult Function(
|
|
@JsonKey(name: 'tracks', toJson: _tracksJson) List<Track> tracks,
|
|
PlaylistSimple? collection,
|
|
int? initialIndex)
|
|
playlist,
|
|
required TResult Function(
|
|
@JsonKey(name: 'tracks', toJson: _tracksJson) List<Track> tracks,
|
|
AlbumSimple? collection,
|
|
int? initialIndex)
|
|
album,
|
|
}) {
|
|
return album(tracks, collection, initialIndex);
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult? whenOrNull<TResult extends Object?>({
|
|
TResult? Function(
|
|
@JsonKey(name: 'tracks', toJson: _tracksJson) List<Track> tracks,
|
|
PlaylistSimple? collection,
|
|
int? initialIndex)?
|
|
playlist,
|
|
TResult? Function(
|
|
@JsonKey(name: 'tracks', toJson: _tracksJson) List<Track> tracks,
|
|
AlbumSimple? collection,
|
|
int? initialIndex)?
|
|
album,
|
|
}) {
|
|
return album?.call(tracks, collection, initialIndex);
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult maybeWhen<TResult extends Object?>({
|
|
TResult Function(
|
|
@JsonKey(name: 'tracks', toJson: _tracksJson) List<Track> tracks,
|
|
PlaylistSimple? collection,
|
|
int? initialIndex)?
|
|
playlist,
|
|
TResult Function(
|
|
@JsonKey(name: 'tracks', toJson: _tracksJson) List<Track> tracks,
|
|
AlbumSimple? collection,
|
|
int? initialIndex)?
|
|
album,
|
|
required TResult orElse(),
|
|
}) {
|
|
if (album != null) {
|
|
return album(tracks, collection, initialIndex);
|
|
}
|
|
return orElse();
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult map<TResult extends Object?>({
|
|
required TResult Function(WebSocketLoadEventDataPlaylist value) playlist,
|
|
required TResult Function(WebSocketLoadEventDataAlbum value) album,
|
|
}) {
|
|
return album(this);
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult? mapOrNull<TResult extends Object?>({
|
|
TResult? Function(WebSocketLoadEventDataPlaylist value)? playlist,
|
|
TResult? Function(WebSocketLoadEventDataAlbum value)? album,
|
|
}) {
|
|
return album?.call(this);
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult maybeMap<TResult extends Object?>({
|
|
TResult Function(WebSocketLoadEventDataPlaylist value)? playlist,
|
|
TResult Function(WebSocketLoadEventDataAlbum value)? album,
|
|
required TResult orElse(),
|
|
}) {
|
|
if (album != null) {
|
|
return album(this);
|
|
}
|
|
return orElse();
|
|
}
|
|
|
|
@override
|
|
Map<String, dynamic> toJson() {
|
|
return _$$WebSocketLoadEventDataAlbumImplToJson(
|
|
this,
|
|
);
|
|
}
|
|
}
|
|
|
|
abstract class WebSocketLoadEventDataAlbum extends WebSocketLoadEventData {
|
|
factory WebSocketLoadEventDataAlbum(
|
|
{@JsonKey(name: 'tracks', toJson: _tracksJson)
|
|
required final List<Track> tracks,
|
|
final AlbumSimple? collection,
|
|
final int? initialIndex}) = _$WebSocketLoadEventDataAlbumImpl;
|
|
WebSocketLoadEventDataAlbum._() : super._();
|
|
|
|
factory WebSocketLoadEventDataAlbum.fromJson(Map<String, dynamic> json) =
|
|
_$WebSocketLoadEventDataAlbumImpl.fromJson;
|
|
|
|
@override
|
|
@JsonKey(name: 'tracks', toJson: _tracksJson)
|
|
List<Track> get tracks;
|
|
@override
|
|
AlbumSimple? get collection;
|
|
@override
|
|
int? get initialIndex;
|
|
@override
|
|
@JsonKey(ignore: true)
|
|
_$$WebSocketLoadEventDataAlbumImplCopyWith<_$WebSocketLoadEventDataAlbumImpl>
|
|
get copyWith => throw _privateConstructorUsedError;
|
|
}
|