mirror of
https://github.com/austinried/subtracks.git
synced 2026-03-28 15:22:44 +01:00
chore: upgrade to Flutter 3.24.5
At the time of writing the latest Flutter version.
This commit is contained in:
@@ -20,4 +20,5 @@ final lastPathProvider = NotifierProvider<LastPath, String>.internal(
|
||||
);
|
||||
|
||||
typedef _$LastPath = Notifier<String>;
|
||||
// ignore_for_file: unnecessary_raw_strings, subtype_of_sealed_class, invalid_use_of_internal_member, do_not_use_environment, prefer_const_constructors, public_member_api_docs, avoid_private_typedef_functions
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member
|
||||
|
||||
@@ -25,7 +25,7 @@ Future<T?> showContextMenu<T>({
|
||||
required WidgetBuilder builder,
|
||||
}) {
|
||||
return showModalBottomSheet<T>(
|
||||
backgroundColor: ref.read(baseThemeProvider).theme.colorScheme.background,
|
||||
backgroundColor: ref.read(baseThemeProvider).theme.colorScheme.surface,
|
||||
useRootNavigator: true,
|
||||
isScrollControlled: true,
|
||||
context: context,
|
||||
|
||||
@@ -112,9 +112,9 @@ List<DownloadAction> useListDownloadActions({
|
||||
DownloadAction cancel() {
|
||||
return DownloadAction(
|
||||
type: DownloadActionType.cancel,
|
||||
iconBuilder: (context) => Stack(
|
||||
iconBuilder: (context) => const Stack(
|
||||
alignment: Alignment.center,
|
||||
children: const [
|
||||
children: [
|
||||
Icon(Icons.cancel_rounded),
|
||||
SizedBox(
|
||||
height: 32,
|
||||
|
||||
@@ -213,7 +213,7 @@ class CardClip extends StatelessWidget {
|
||||
final cardShape = Theme.of(context).cardTheme.shape;
|
||||
return ClipRRect(
|
||||
borderRadius:
|
||||
cardShape is RoundedRectangleBorder ? cardShape.borderRadius : null,
|
||||
cardShape is RoundedRectangleBorder ? cardShape.borderRadius : BorderRadius.zero,
|
||||
child: !square
|
||||
? child
|
||||
: AspectRatio(
|
||||
|
||||
@@ -30,8 +30,6 @@ class _SystemHash {
|
||||
}
|
||||
}
|
||||
|
||||
typedef _ArtistArtCacheInfoRef = AutoDisposeProviderRef<CacheInfo>;
|
||||
|
||||
/// See also [_artistArtCacheInfo].
|
||||
@ProviderFor(_artistArtCacheInfo)
|
||||
const _artistArtCacheInfoProvider = _ArtistArtCacheInfoFamily();
|
||||
@@ -81,11 +79,11 @@ class _ArtistArtCacheInfoFamily extends Family<CacheInfo> {
|
||||
class _ArtistArtCacheInfoProvider extends AutoDisposeProvider<CacheInfo> {
|
||||
/// See also [_artistArtCacheInfo].
|
||||
_ArtistArtCacheInfoProvider({
|
||||
required this.artistId,
|
||||
this.thumbnail = true,
|
||||
}) : super.internal(
|
||||
required String artistId,
|
||||
bool thumbnail = true,
|
||||
}) : this._internal(
|
||||
(ref) => _artistArtCacheInfo(
|
||||
ref,
|
||||
ref as _ArtistArtCacheInfoRef,
|
||||
artistId: artistId,
|
||||
thumbnail: thumbnail,
|
||||
),
|
||||
@@ -98,11 +96,48 @@ class _ArtistArtCacheInfoProvider extends AutoDisposeProvider<CacheInfo> {
|
||||
dependencies: _ArtistArtCacheInfoFamily._dependencies,
|
||||
allTransitiveDependencies:
|
||||
_ArtistArtCacheInfoFamily._allTransitiveDependencies,
|
||||
artistId: artistId,
|
||||
thumbnail: thumbnail,
|
||||
);
|
||||
|
||||
_ArtistArtCacheInfoProvider._internal(
|
||||
super._createNotifier, {
|
||||
required super.name,
|
||||
required super.dependencies,
|
||||
required super.allTransitiveDependencies,
|
||||
required super.debugGetCreateSourceHash,
|
||||
required super.from,
|
||||
required this.artistId,
|
||||
required this.thumbnail,
|
||||
}) : super.internal();
|
||||
|
||||
final String artistId;
|
||||
final bool thumbnail;
|
||||
|
||||
@override
|
||||
Override overrideWith(
|
||||
CacheInfo Function(_ArtistArtCacheInfoRef provider) create,
|
||||
) {
|
||||
return ProviderOverride(
|
||||
origin: this,
|
||||
override: _ArtistArtCacheInfoProvider._internal(
|
||||
(ref) => create(ref as _ArtistArtCacheInfoRef),
|
||||
from: from,
|
||||
name: null,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
debugGetCreateSourceHash: null,
|
||||
artistId: artistId,
|
||||
thumbnail: thumbnail,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
AutoDisposeProviderElement<CacheInfo> createElement() {
|
||||
return _ArtistArtCacheInfoProviderElement(this);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return other is _ArtistArtCacheInfoProvider &&
|
||||
@@ -120,9 +155,26 @@ class _ArtistArtCacheInfoProvider extends AutoDisposeProvider<CacheInfo> {
|
||||
}
|
||||
}
|
||||
|
||||
mixin _ArtistArtCacheInfoRef on AutoDisposeProviderRef<CacheInfo> {
|
||||
/// The parameter `artistId` of this provider.
|
||||
String get artistId;
|
||||
|
||||
/// The parameter `thumbnail` of this provider.
|
||||
bool get thumbnail;
|
||||
}
|
||||
|
||||
class _ArtistArtCacheInfoProviderElement
|
||||
extends AutoDisposeProviderElement<CacheInfo> with _ArtistArtCacheInfoRef {
|
||||
_ArtistArtCacheInfoProviderElement(super.provider);
|
||||
|
||||
@override
|
||||
String get artistId => (origin as _ArtistArtCacheInfoProvider).artistId;
|
||||
@override
|
||||
bool get thumbnail => (origin as _ArtistArtCacheInfoProvider).thumbnail;
|
||||
}
|
||||
|
||||
String _$artistArtCachedUrlHash() =>
|
||||
r'2a5e0fea614ff12a1d562faccec6cfe98394af42';
|
||||
typedef _ArtistArtCachedUrlRef = AutoDisposeFutureProviderRef<String?>;
|
||||
|
||||
/// See also [_artistArtCachedUrl].
|
||||
@ProviderFor(_artistArtCachedUrl)
|
||||
@@ -173,11 +225,11 @@ class _ArtistArtCachedUrlFamily extends Family<AsyncValue<String?>> {
|
||||
class _ArtistArtCachedUrlProvider extends AutoDisposeFutureProvider<String?> {
|
||||
/// See also [_artistArtCachedUrl].
|
||||
_ArtistArtCachedUrlProvider({
|
||||
required this.artistId,
|
||||
this.thumbnail = true,
|
||||
}) : super.internal(
|
||||
required String artistId,
|
||||
bool thumbnail = true,
|
||||
}) : this._internal(
|
||||
(ref) => _artistArtCachedUrl(
|
||||
ref,
|
||||
ref as _ArtistArtCachedUrlRef,
|
||||
artistId: artistId,
|
||||
thumbnail: thumbnail,
|
||||
),
|
||||
@@ -190,11 +242,48 @@ class _ArtistArtCachedUrlProvider extends AutoDisposeFutureProvider<String?> {
|
||||
dependencies: _ArtistArtCachedUrlFamily._dependencies,
|
||||
allTransitiveDependencies:
|
||||
_ArtistArtCachedUrlFamily._allTransitiveDependencies,
|
||||
artistId: artistId,
|
||||
thumbnail: thumbnail,
|
||||
);
|
||||
|
||||
_ArtistArtCachedUrlProvider._internal(
|
||||
super._createNotifier, {
|
||||
required super.name,
|
||||
required super.dependencies,
|
||||
required super.allTransitiveDependencies,
|
||||
required super.debugGetCreateSourceHash,
|
||||
required super.from,
|
||||
required this.artistId,
|
||||
required this.thumbnail,
|
||||
}) : super.internal();
|
||||
|
||||
final String artistId;
|
||||
final bool thumbnail;
|
||||
|
||||
@override
|
||||
Override overrideWith(
|
||||
FutureOr<String?> Function(_ArtistArtCachedUrlRef provider) create,
|
||||
) {
|
||||
return ProviderOverride(
|
||||
origin: this,
|
||||
override: _ArtistArtCachedUrlProvider._internal(
|
||||
(ref) => create(ref as _ArtistArtCachedUrlRef),
|
||||
from: from,
|
||||
name: null,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
debugGetCreateSourceHash: null,
|
||||
artistId: artistId,
|
||||
thumbnail: thumbnail,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
AutoDisposeFutureProviderElement<String?> createElement() {
|
||||
return _ArtistArtCachedUrlProviderElement(this);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return other is _ArtistArtCachedUrlProvider &&
|
||||
@@ -212,9 +301,27 @@ class _ArtistArtCachedUrlProvider extends AutoDisposeFutureProvider<String?> {
|
||||
}
|
||||
}
|
||||
|
||||
mixin _ArtistArtCachedUrlRef on AutoDisposeFutureProviderRef<String?> {
|
||||
/// The parameter `artistId` of this provider.
|
||||
String get artistId;
|
||||
|
||||
/// The parameter `thumbnail` of this provider.
|
||||
bool get thumbnail;
|
||||
}
|
||||
|
||||
class _ArtistArtCachedUrlProviderElement
|
||||
extends AutoDisposeFutureProviderElement<String?>
|
||||
with _ArtistArtCachedUrlRef {
|
||||
_ArtistArtCachedUrlProviderElement(super.provider);
|
||||
|
||||
@override
|
||||
String get artistId => (origin as _ArtistArtCachedUrlProvider).artistId;
|
||||
@override
|
||||
bool get thumbnail => (origin as _ArtistArtCachedUrlProvider).thumbnail;
|
||||
}
|
||||
|
||||
String _$artistArtUriCacheInfoHash() =>
|
||||
r'9bdc0f5654882265236ef746ea697a6d107a4b6f';
|
||||
typedef _ArtistArtUriCacheInfoRef = AutoDisposeFutureProviderRef<UriCacheInfo>;
|
||||
|
||||
/// See also [_artistArtUriCacheInfo].
|
||||
@ProviderFor(_artistArtUriCacheInfo)
|
||||
@@ -266,11 +373,11 @@ class _ArtistArtUriCacheInfoProvider
|
||||
extends AutoDisposeFutureProvider<UriCacheInfo> {
|
||||
/// See also [_artistArtUriCacheInfo].
|
||||
_ArtistArtUriCacheInfoProvider({
|
||||
required this.artistId,
|
||||
this.thumbnail = true,
|
||||
}) : super.internal(
|
||||
required String artistId,
|
||||
bool thumbnail = true,
|
||||
}) : this._internal(
|
||||
(ref) => _artistArtUriCacheInfo(
|
||||
ref,
|
||||
ref as _ArtistArtUriCacheInfoRef,
|
||||
artistId: artistId,
|
||||
thumbnail: thumbnail,
|
||||
),
|
||||
@@ -283,11 +390,48 @@ class _ArtistArtUriCacheInfoProvider
|
||||
dependencies: _ArtistArtUriCacheInfoFamily._dependencies,
|
||||
allTransitiveDependencies:
|
||||
_ArtistArtUriCacheInfoFamily._allTransitiveDependencies,
|
||||
artistId: artistId,
|
||||
thumbnail: thumbnail,
|
||||
);
|
||||
|
||||
_ArtistArtUriCacheInfoProvider._internal(
|
||||
super._createNotifier, {
|
||||
required super.name,
|
||||
required super.dependencies,
|
||||
required super.allTransitiveDependencies,
|
||||
required super.debugGetCreateSourceHash,
|
||||
required super.from,
|
||||
required this.artistId,
|
||||
required this.thumbnail,
|
||||
}) : super.internal();
|
||||
|
||||
final String artistId;
|
||||
final bool thumbnail;
|
||||
|
||||
@override
|
||||
Override overrideWith(
|
||||
FutureOr<UriCacheInfo> Function(_ArtistArtUriCacheInfoRef provider) create,
|
||||
) {
|
||||
return ProviderOverride(
|
||||
origin: this,
|
||||
override: _ArtistArtUriCacheInfoProvider._internal(
|
||||
(ref) => create(ref as _ArtistArtUriCacheInfoRef),
|
||||
from: from,
|
||||
name: null,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
debugGetCreateSourceHash: null,
|
||||
artistId: artistId,
|
||||
thumbnail: thumbnail,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
AutoDisposeFutureProviderElement<UriCacheInfo> createElement() {
|
||||
return _ArtistArtUriCacheInfoProviderElement(this);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return other is _ArtistArtUriCacheInfoProvider &&
|
||||
@@ -304,4 +448,24 @@ class _ArtistArtUriCacheInfoProvider
|
||||
return _SystemHash.finish(hash);
|
||||
}
|
||||
}
|
||||
// ignore_for_file: unnecessary_raw_strings, subtype_of_sealed_class, invalid_use_of_internal_member, do_not_use_environment, prefer_const_constructors, public_member_api_docs, avoid_private_typedef_functions
|
||||
|
||||
mixin _ArtistArtUriCacheInfoRef on AutoDisposeFutureProviderRef<UriCacheInfo> {
|
||||
/// The parameter `artistId` of this provider.
|
||||
String get artistId;
|
||||
|
||||
/// The parameter `thumbnail` of this provider.
|
||||
bool get thumbnail;
|
||||
}
|
||||
|
||||
class _ArtistArtUriCacheInfoProviderElement
|
||||
extends AutoDisposeFutureProviderElement<UriCacheInfo>
|
||||
with _ArtistArtUriCacheInfoRef {
|
||||
_ArtistArtUriCacheInfoProviderElement(super.provider);
|
||||
|
||||
@override
|
||||
String get artistId => (origin as _ArtistArtUriCacheInfoProvider).artistId;
|
||||
@override
|
||||
bool get thumbnail => (origin as _ArtistArtUriCacheInfoProvider).thumbnail;
|
||||
}
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member
|
||||
|
||||
@@ -127,6 +127,7 @@ class SyncAllRefresh extends HookConsumerWidget {
|
||||
try {
|
||||
await ref.read(syncServiceProvider.notifier).syncAll();
|
||||
} catch (e) {
|
||||
if (!context.mounted) return;
|
||||
showErrorSnackbar(context, e.toString());
|
||||
}
|
||||
},
|
||||
|
||||
@@ -30,13 +30,13 @@ class NowPlayingBar extends HookConsumerWidget {
|
||||
elevation: 3,
|
||||
color: colors?.darkBackground,
|
||||
// surfaceTintColor: theme?.colorScheme.background,
|
||||
child: Column(
|
||||
child: const Column(
|
||||
children: [
|
||||
SizedBox(
|
||||
height: 70,
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: const [
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.all(10),
|
||||
child: _ArtImage(),
|
||||
@@ -54,7 +54,7 @@ class NowPlayingBar extends HookConsumerWidget {
|
||||
],
|
||||
),
|
||||
),
|
||||
const _ProgressBar(),
|
||||
_ProgressBar(),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -173,7 +173,7 @@ class PlayPauseButton extends HookConsumerWidget {
|
||||
width: size / 3,
|
||||
child: CircularProgressIndicator(
|
||||
strokeWidth: size / 16,
|
||||
color: Theme.of(context).colorScheme.background,
|
||||
color: Theme.of(context).colorScheme.surface,
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -195,7 +195,7 @@ class PlayPauseButton extends HookConsumerWidget {
|
||||
}
|
||||
},
|
||||
icon: icon,
|
||||
color: Theme.of(context).colorScheme.onBackground,
|
||||
color: Theme.of(context).colorScheme.surface,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -111,13 +111,13 @@ class OfflineIndicator extends HookConsumerWidget {
|
||||
),
|
||||
child: FilledButton.tonal(
|
||||
style: const ButtonStyle(
|
||||
padding: MaterialStatePropertyAll<EdgeInsetsGeometry>(
|
||||
padding: WidgetStatePropertyAll<EdgeInsetsGeometry>(
|
||||
EdgeInsets.zero,
|
||||
),
|
||||
fixedSize: MaterialStatePropertyAll<Size>(
|
||||
fixedSize: WidgetStatePropertyAll<Size>(
|
||||
Size(42, 42),
|
||||
),
|
||||
minimumSize: MaterialStatePropertyAll<Size>(
|
||||
minimumSize: WidgetStatePropertyAll<Size>(
|
||||
Size(42, 42),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -53,4 +53,5 @@ final lastBottomNavStateServiceProvider =
|
||||
);
|
||||
|
||||
typedef _$LastBottomNavStateService = AsyncNotifier<void>;
|
||||
// ignore_for_file: unnecessary_raw_strings, subtype_of_sealed_class, invalid_use_of_internal_member, do_not_use_environment, prefer_const_constructors, public_member_api_docs, avoid_private_typedef_functions
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member
|
||||
|
||||
@@ -30,8 +30,6 @@ class _SystemHash {
|
||||
}
|
||||
}
|
||||
|
||||
typedef AlbumsCategoryListRef = AutoDisposeStreamProviderRef<List<Album>>;
|
||||
|
||||
/// See also [albumsCategoryList].
|
||||
@ProviderFor(albumsCategoryList)
|
||||
const albumsCategoryListProvider = AlbumsCategoryListFamily();
|
||||
@@ -79,10 +77,10 @@ class AlbumsCategoryListProvider
|
||||
extends AutoDisposeStreamProvider<List<Album>> {
|
||||
/// See also [albumsCategoryList].
|
||||
AlbumsCategoryListProvider(
|
||||
this.opt,
|
||||
) : super.internal(
|
||||
ListQuery opt,
|
||||
) : this._internal(
|
||||
(ref) => albumsCategoryList(
|
||||
ref,
|
||||
ref as AlbumsCategoryListRef,
|
||||
opt,
|
||||
),
|
||||
from: albumsCategoryListProvider,
|
||||
@@ -94,10 +92,44 @@ class AlbumsCategoryListProvider
|
||||
dependencies: AlbumsCategoryListFamily._dependencies,
|
||||
allTransitiveDependencies:
|
||||
AlbumsCategoryListFamily._allTransitiveDependencies,
|
||||
opt: opt,
|
||||
);
|
||||
|
||||
AlbumsCategoryListProvider._internal(
|
||||
super._createNotifier, {
|
||||
required super.name,
|
||||
required super.dependencies,
|
||||
required super.allTransitiveDependencies,
|
||||
required super.debugGetCreateSourceHash,
|
||||
required super.from,
|
||||
required this.opt,
|
||||
}) : super.internal();
|
||||
|
||||
final ListQuery opt;
|
||||
|
||||
@override
|
||||
Override overrideWith(
|
||||
Stream<List<Album>> Function(AlbumsCategoryListRef provider) create,
|
||||
) {
|
||||
return ProviderOverride(
|
||||
origin: this,
|
||||
override: AlbumsCategoryListProvider._internal(
|
||||
(ref) => create(ref as AlbumsCategoryListRef),
|
||||
from: from,
|
||||
name: null,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
debugGetCreateSourceHash: null,
|
||||
opt: opt,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
AutoDisposeStreamProviderElement<List<Album>> createElement() {
|
||||
return _AlbumsCategoryListProviderElement(this);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return other is AlbumsCategoryListProvider && other.opt == opt;
|
||||
@@ -111,4 +143,19 @@ class AlbumsCategoryListProvider
|
||||
return _SystemHash.finish(hash);
|
||||
}
|
||||
}
|
||||
// ignore_for_file: unnecessary_raw_strings, subtype_of_sealed_class, invalid_use_of_internal_member, do_not_use_environment, prefer_const_constructors, public_member_api_docs, avoid_private_typedef_functions
|
||||
|
||||
mixin AlbumsCategoryListRef on AutoDisposeStreamProviderRef<List<Album>> {
|
||||
/// The parameter `opt` of this provider.
|
||||
ListQuery get opt;
|
||||
}
|
||||
|
||||
class _AlbumsCategoryListProviderElement
|
||||
extends AutoDisposeStreamProviderElement<List<Album>>
|
||||
with AlbumsCategoryListRef {
|
||||
_AlbumsCategoryListProviderElement(super.provider);
|
||||
|
||||
@override
|
||||
ListQuery get opt => (origin as AlbumsCategoryListProvider).opt;
|
||||
}
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member
|
||||
|
||||
@@ -60,8 +60,6 @@ class _SystemHash {
|
||||
}
|
||||
}
|
||||
|
||||
typedef LibraryListQueryRef = ProviderRef<LibraryListQuery>;
|
||||
|
||||
/// See also [libraryListQuery].
|
||||
@ProviderFor(libraryListQuery)
|
||||
const libraryListQueryProvider = LibraryListQueryFamily();
|
||||
@@ -108,10 +106,10 @@ class LibraryListQueryFamily extends Family<LibraryListQuery> {
|
||||
class LibraryListQueryProvider extends Provider<LibraryListQuery> {
|
||||
/// See also [libraryListQuery].
|
||||
LibraryListQueryProvider(
|
||||
this.index,
|
||||
) : super.internal(
|
||||
int index,
|
||||
) : this._internal(
|
||||
(ref) => libraryListQuery(
|
||||
ref,
|
||||
ref as LibraryListQueryRef,
|
||||
index,
|
||||
),
|
||||
from: libraryListQueryProvider,
|
||||
@@ -123,10 +121,44 @@ class LibraryListQueryProvider extends Provider<LibraryListQuery> {
|
||||
dependencies: LibraryListQueryFamily._dependencies,
|
||||
allTransitiveDependencies:
|
||||
LibraryListQueryFamily._allTransitiveDependencies,
|
||||
index: index,
|
||||
);
|
||||
|
||||
LibraryListQueryProvider._internal(
|
||||
super._createNotifier, {
|
||||
required super.name,
|
||||
required super.dependencies,
|
||||
required super.allTransitiveDependencies,
|
||||
required super.debugGetCreateSourceHash,
|
||||
required super.from,
|
||||
required this.index,
|
||||
}) : super.internal();
|
||||
|
||||
final int index;
|
||||
|
||||
@override
|
||||
Override overrideWith(
|
||||
LibraryListQuery Function(LibraryListQueryRef provider) create,
|
||||
) {
|
||||
return ProviderOverride(
|
||||
origin: this,
|
||||
override: LibraryListQueryProvider._internal(
|
||||
(ref) => create(ref as LibraryListQueryRef),
|
||||
from: from,
|
||||
name: null,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
debugGetCreateSourceHash: null,
|
||||
index: index,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
ProviderElement<LibraryListQuery> createElement() {
|
||||
return _LibraryListQueryProviderElement(this);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return other is LibraryListQueryProvider && other.index == index;
|
||||
@@ -141,6 +173,19 @@ class LibraryListQueryProvider extends Provider<LibraryListQuery> {
|
||||
}
|
||||
}
|
||||
|
||||
mixin LibraryListQueryRef on ProviderRef<LibraryListQuery> {
|
||||
/// The parameter `index` of this provider.
|
||||
int get index;
|
||||
}
|
||||
|
||||
class _LibraryListQueryProviderElement extends ProviderElement<LibraryListQuery>
|
||||
with LibraryListQueryRef {
|
||||
_LibraryListQueryProviderElement(super.provider);
|
||||
|
||||
@override
|
||||
int get index => (origin as LibraryListQueryProvider).index;
|
||||
}
|
||||
|
||||
String _$lastLibraryStateServiceHash() =>
|
||||
r'a49e26b5dc0fcb0f697ec2def08e7336f64c4cb3';
|
||||
|
||||
@@ -173,4 +218,5 @@ final libraryListsProvider =
|
||||
);
|
||||
|
||||
typedef _$LibraryLists = Notifier<IList<LibraryListQuery>>;
|
||||
// ignore_for_file: unnecessary_raw_strings, subtype_of_sealed_class, invalid_use_of_internal_member, do_not_use_environment, prefer_const_constructors, public_member_api_docs, avoid_private_typedef_functions
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member
|
||||
|
||||
@@ -29,8 +29,6 @@ class _SystemHash {
|
||||
}
|
||||
}
|
||||
|
||||
typedef SongsListRef = AutoDisposeFutureProviderRef<List<Song>>;
|
||||
|
||||
/// See also [songsList].
|
||||
@ProviderFor(songsList)
|
||||
const songsListProvider = SongsListFamily();
|
||||
@@ -77,10 +75,10 @@ class SongsListFamily extends Family<AsyncValue<List<Song>>> {
|
||||
class SongsListProvider extends AutoDisposeFutureProvider<List<Song>> {
|
||||
/// See also [songsList].
|
||||
SongsListProvider(
|
||||
this.opt,
|
||||
) : super.internal(
|
||||
ListQuery opt,
|
||||
) : this._internal(
|
||||
(ref) => songsList(
|
||||
ref,
|
||||
ref as SongsListRef,
|
||||
opt,
|
||||
),
|
||||
from: songsListProvider,
|
||||
@@ -91,10 +89,44 @@ class SongsListProvider extends AutoDisposeFutureProvider<List<Song>> {
|
||||
: _$songsListHash,
|
||||
dependencies: SongsListFamily._dependencies,
|
||||
allTransitiveDependencies: SongsListFamily._allTransitiveDependencies,
|
||||
opt: opt,
|
||||
);
|
||||
|
||||
SongsListProvider._internal(
|
||||
super._createNotifier, {
|
||||
required super.name,
|
||||
required super.dependencies,
|
||||
required super.allTransitiveDependencies,
|
||||
required super.debugGetCreateSourceHash,
|
||||
required super.from,
|
||||
required this.opt,
|
||||
}) : super.internal();
|
||||
|
||||
final ListQuery opt;
|
||||
|
||||
@override
|
||||
Override overrideWith(
|
||||
FutureOr<List<Song>> Function(SongsListRef provider) create,
|
||||
) {
|
||||
return ProviderOverride(
|
||||
origin: this,
|
||||
override: SongsListProvider._internal(
|
||||
(ref) => create(ref as SongsListRef),
|
||||
from: from,
|
||||
name: null,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
debugGetCreateSourceHash: null,
|
||||
opt: opt,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
AutoDisposeFutureProviderElement<List<Song>> createElement() {
|
||||
return _SongsListProviderElement(this);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return other is SongsListProvider && other.opt == opt;
|
||||
@@ -108,4 +140,18 @@ class SongsListProvider extends AutoDisposeFutureProvider<List<Song>> {
|
||||
return _SystemHash.finish(hash);
|
||||
}
|
||||
}
|
||||
// ignore_for_file: unnecessary_raw_strings, subtype_of_sealed_class, invalid_use_of_internal_member, do_not_use_environment, prefer_const_constructors, public_member_api_docs, avoid_private_typedef_functions
|
||||
|
||||
mixin SongsListRef on AutoDisposeFutureProviderRef<List<Song>> {
|
||||
/// The parameter `opt` of this provider.
|
||||
ListQuery get opt;
|
||||
}
|
||||
|
||||
class _SongsListProviderElement
|
||||
extends AutoDisposeFutureProviderElement<List<Song>> with SongsListRef {
|
||||
_SongsListProviderElement(super.provider);
|
||||
|
||||
@override
|
||||
ListQuery get opt => (origin as SongsListProvider).opt;
|
||||
}
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member
|
||||
|
||||
@@ -55,13 +55,13 @@ class NowPlayingPage extends HookConsumerWidget {
|
||||
],
|
||||
),
|
||||
),
|
||||
body: Stack(
|
||||
body: const Stack(
|
||||
children: [
|
||||
const MediaItemGradient(),
|
||||
MediaItemGradient(),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 8),
|
||||
padding: EdgeInsets.symmetric(horizontal: 8, vertical: 8),
|
||||
child: Column(
|
||||
children: const [
|
||||
children: [
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16),
|
||||
@@ -229,8 +229,8 @@ class _Progress extends HookConsumerWidget {
|
||||
value: changing.value ? changeValue.value : position.toDouble(),
|
||||
min: 0,
|
||||
max: max(duration.toDouble(), position.toDouble()),
|
||||
thumbColor: colors?.theme.colorScheme.onBackground,
|
||||
activeColor: colors?.theme.colorScheme.onBackground,
|
||||
thumbColor: colors?.theme.colorScheme.surface,
|
||||
activeColor: colors?.theme.colorScheme.surface,
|
||||
inactiveColor: colors?.theme.colorScheme.surface,
|
||||
onChanged: (value) {
|
||||
changeValue.value = value;
|
||||
@@ -354,7 +354,7 @@ class _Controls extends HookConsumerWidget {
|
||||
final audio = ref.watch(audioControlProvider);
|
||||
|
||||
return IconTheme(
|
||||
data: IconThemeData(color: base.theme.colorScheme.onBackground),
|
||||
data: IconThemeData(color: base.theme.colorScheme.surface),
|
||||
child: Column(
|
||||
children: [
|
||||
SizedBox(
|
||||
|
||||
@@ -35,4 +35,5 @@ final searchQueryProvider =
|
||||
);
|
||||
|
||||
typedef _$SearchQuery = AutoDisposeNotifier<String?>;
|
||||
// ignore_for_file: unnecessary_raw_strings, subtype_of_sealed_class, invalid_use_of_internal_member, do_not_use_environment, prefer_const_constructors, public_member_api_docs, avoid_private_typedef_functions
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member
|
||||
|
||||
@@ -191,7 +191,7 @@ class _ShareLogsButton extends StatelessWidget {
|
||||
final files = await logFiles();
|
||||
if (files.isEmpty) return;
|
||||
|
||||
// ignore: use_build_context_synchronously
|
||||
if (!context.mounted) return;
|
||||
final value = await showDialog<String>(
|
||||
context: context,
|
||||
builder: (context) => MultipleChoiceDialog<String>(
|
||||
|
||||
@@ -76,8 +76,8 @@ class SourcePage extends HookConsumerWidget {
|
||||
onChanged: (value) => forcePlaintextPassword.value = value,
|
||||
);
|
||||
|
||||
return WillPopScope(
|
||||
onWillPop: () async => !isSaving.value && !isDeleting.value,
|
||||
return PopScope(
|
||||
canPop: !isSaving.value && !isDeleting.value,
|
||||
child: Scaffold(
|
||||
appBar: AppBar(),
|
||||
floatingActionButton: Row(
|
||||
@@ -164,6 +164,7 @@ class SourcePage extends HookConsumerWidget {
|
||||
);
|
||||
}
|
||||
} catch (e, st) {
|
||||
if (!context.mounted) return;
|
||||
showErrorSnackbar(context, e.toString());
|
||||
log.severe('Saving source', e, st);
|
||||
error = true;
|
||||
|
||||
Reference in New Issue
Block a user