fix: run dart fix
Some checks are pending
Flutter CI & Release / Test (push) Waiting to run
Flutter CI & Release / Build Android APKs (push) Blocked by required conditions
Flutter CI & Release / build_linux (push) Blocked by required conditions
Flutter CI & Release / Create GitHub Release (push) Blocked by required conditions

This commit is contained in:
Dr.Blank 2025-04-23 00:29:02 +05:30
parent 2cb00c451e
commit ad0cd6e2ad
No known key found for this signature in database
GPG key ID: BA5F87FF0560C57B
5 changed files with 49 additions and 41 deletions

View file

@ -26,7 +26,7 @@ Future<Library?> library(Ref ref, String id) async {
_logger.warning('No library found in the list of libraries');
return null;
}
_logger.fine('Fetched library: ${library}');
_logger.fine('Fetched library: $library');
return library.library;
}

View file

@ -6,7 +6,7 @@ part of 'library_provider.dart';
// RiverpodGenerator
// **************************************************************************
String _$libraryHash() => r'b62d976f8ab83b2f5823a0fb7dac52fde8fcbffc';
String _$libraryHash() => r'f8a34100acb58f02fa958c71a629577bf815710e';
/// Copied from Dart SDK
class _SystemHash {

View file

@ -33,7 +33,8 @@ class LibraryItemPage extends HookConsumerWidget {
final showFab = useState(false);
// Effect to listen to scroll changes and update FAB visibility
useEffect(() {
useEffect(
() {
void listener() {
if (!scrollController.hasClients) {
return; // Ensure controller is attached
@ -55,7 +56,9 @@ class LibraryItemPage extends HookConsumerWidget {
// Cleanup: remove the listener when the widget is disposed
return () => scrollController.removeListener(listener);
}, [scrollController],); // Re-run effect if scrollController changes
},
[scrollController],
); // Re-run effect if scrollController changes
// --- FAB Scroll-to-Top Logic ---
void scrollToTop() {

View file

@ -21,7 +21,8 @@ class LibraryItemSliverAppBar extends HookConsumerWidget {
final showTitle = useState(false);
useEffect(() {
useEffect(
() {
void listener() {
final shouldShow = scrollController.hasClients &&
scrollController.offset > _showTitleThreshold;
@ -39,7 +40,9 @@ class LibraryItemSliverAppBar extends HookConsumerWidget {
}
});
return () => scrollController.removeListener(listener);
}, [scrollController],);
},
[scrollController],
);
return SliverAppBar(
elevation: 0,
@ -62,7 +65,8 @@ class LibraryItemSliverAppBar extends HookConsumerWidget {
key: const ValueKey('title-text'),
item?.media.metadata.title ?? '',
overflow: TextOverflow.ellipsis,
style: Theme.of(context).textTheme.bodyMedium,)
style: Theme.of(context).textTheme.bodyMedium,
)
: const SizedBox(
// Also give it a key for differentiation
key: ValueKey('empty-title'),

View file

@ -204,7 +204,8 @@ class _LibrarySelectionContent extends ConsumerWidget {
trailing: isSelected ? const Icon(Icons.check) : null,
onTap: () {
appLogger.info(
'Selected library: ${library.name} (ID: ${library.id})');
'Selected library: ${library.name} (ID: ${library.id})',
);
// Get current settings state
final currentSettings = ref.read(apiSettingsProvider);
// Update the active library ID