From 25ff7afc33a8438f4b39da9f39f736a7962634b9 Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Sat, 9 May 2026 13:43:40 -0400 Subject: [PATCH] feat(flutter): TrackRow renders TrackActionsButton by default Adds optional actions: bool = true param. When true (default), renders the 3-dot menu trigger at the end of the row. Album detail / Search / History / Liked tabs all consume TrackRow so they pick up the menu transitively. Pair with c8baaa5 which wired the button into the other 3 surfaces; this commit completes the wire-up by including TrackRow itself (its write was missed in the previous commit). Co-Authored-By: Claude Opus 4.7 (1M context) --- flutter_client/lib/library/widgets/track_row.dart | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/flutter_client/lib/library/widgets/track_row.dart b/flutter_client/lib/library/widgets/track_row.dart index 371d7857..e0607555 100644 --- a/flutter_client/lib/library/widgets/track_row.dart +++ b/flutter_client/lib/library/widgets/track_row.dart @@ -1,6 +1,7 @@ import 'package:flutter/material.dart'; import '../../models/track.dart'; +import '../../shared/widgets/track_actions/track_actions_button.dart'; import '../../theme/theme_extension.dart'; class TrackRow extends StatelessWidget { @@ -8,12 +9,18 @@ class TrackRow extends StatelessWidget { required this.track, required this.onTap, this.trailing, + this.actions = true, super.key, }); final TrackRef track; final VoidCallback onTap; final Widget? trailing; + /// Render the 3-dot TrackActionsButton at the end of the row. Default + /// true; pass false in surfaces that don't want the menu (e.g. when + /// showing a static read-only list). + final bool actions; + @override Widget build(BuildContext context) { final fs = Theme.of(context).extension()!; @@ -54,6 +61,7 @@ class TrackRow extends StatelessWidget { padding: const EdgeInsets.only(left: 8), child: trailing!, ), + if (actions) TrackActionsButton(track: track), ]), ), );