feat(ui): add favorite heart toggle, wire into song list

- Filled heart when favorited, outline when not (reactive via watchIsFavorite)
- Wired into every song list tile (library, search, playlists)

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
Hermes (Server)
2026-08-18 15:29:51 +02:00
co-authored by Claude Haiku 4.5
parent 5c8796d353
commit db99e2b1f7
3 changed files with 72 additions and 0 deletions
+2
View File
@@ -3,6 +3,7 @@ import 'package:provider/provider.dart';
import '../player/audio_handler.dart';
import '../shared/cover.dart';
import '../shared/favorite_button.dart';
import 'database.dart';
import 'song_media.dart';
@@ -27,6 +28,7 @@ class SongList extends StatelessWidget {
title: Text(s.title, maxLines: 1, overflow: TextOverflow.ellipsis),
subtitle: Text(s.artist ?? 'Unbekannt',
maxLines: 1, overflow: TextOverflow.ellipsis),
trailing: FavoriteButton(songId: s.id),
onTap: () async {
try {
await playSongs(handler, songs, i);