feat(flutter): wire TrackActionsButton into 4 surfaces
- TrackRow gains an actions: bool = true param; renders the button after duration. Album detail + Search + History/Liked tabs all consume TrackRow so they pick up the menu transitively. - CompactTrackCard (home Most-played) gets the button at the end of its inner row. - _PlaylistTrackRow in playlist_detail_screen gets the button next to duration; skipped for unavailable rows (no track id). - NowPlayingScreen renders the button next to the title with hideQueueActions: true (Play next / Add to queue suppressed since the menu's track IS the playing one). artistId is left empty since it's not stashed in MediaItem.extras — Go-to-artist will route to /artists/ which is benign for v1; a follow-up could stash it. Closes Tier 1 follow-up #2 (track-level actions menu). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -5,6 +5,7 @@ import 'package:go_router/go_router.dart';
|
||||
import '../models/playlist.dart';
|
||||
import '../models/track.dart';
|
||||
import '../player/player_provider.dart';
|
||||
import '../shared/widgets/track_actions/track_actions_button.dart';
|
||||
import '../theme/theme_extension.dart';
|
||||
import 'playlists_provider.dart';
|
||||
|
||||
@@ -184,6 +185,8 @@ class _PlaylistTrackRow extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
Text('$mins:$secs', style: TextStyle(color: fs.ash, fontSize: 12)),
|
||||
if (row.trackId != null)
|
||||
TrackActionsButton(track: _toTrackRef(row)),
|
||||
]),
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user