Skip to content

Commit

Permalink
use colorThemeProvider for tile accent color
Browse files Browse the repository at this point in the history
- uses Finamp's blue as a fallback until the correct accent color has been calculated
- avoids pulsing/flashing effect on theme change
  • Loading branch information
Chaphasilor committed Nov 8, 2024
1 parent 67a0a62 commit d596560
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions lib/components/AlbumScreen/track_list_tile.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit d596560

Please sign in to comment.