From d5965600c472c5c691f053d4b06f59a305751cad Mon Sep 17 00:00:00 2001 From: Chaphasilor Date: Fri, 8 Nov 2024 20:28:04 +0100 Subject: [PATCH] use `colorThemeProvider` for tile accent color - uses Finamp's blue as a fallback until the correct accent color has been calculated - avoids pulsing/flashing effect on theme change --- lib/components/AlbumScreen/track_list_tile.dart | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/lib/components/AlbumScreen/track_list_tile.dart b/lib/components/AlbumScreen/track_list_tile.dart index 38f4dea1..ad584aad 100644 --- a/lib/components/AlbumScreen/track_list_tile.dart +++ b/lib/components/AlbumScreen/track_list_tile.dart @@ -573,9 +573,7 @@ class ThemedTrackListTile extends ConsumerWidget { colorScheme: Theme.of(context).colorScheme.copyWith( surfaceContainer: isCurrentTrack ? ref - .watch(colorThemeNullableProvider) - .value - ?.primary + .watch(colorThemeProvider).primary .withOpacity(Theme.of(context).brightness == Brightness.dark ? 0.35 @@ -591,10 +589,9 @@ class ThemedTrackListTile extends ConsumerWidget { color: isCurrentTrack ? Color.alphaBlend( (ref - .watch(colorThemeNullableProvider) - .value - ?.secondary - .withOpacity(0.5)) ?? + .watch(colorThemeProvider) + .secondary + .withOpacity(0.3)) ?? Colors.transparent, Theme.of(context) .textTheme