From 8fb82d473d1d8db2bedcf00d3da63909a53202f5 Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Sat, 9 May 2026 11:38:57 -0400 Subject: [PATCH] feat(flutter/widgets): HorizontalScrollRow skips header when title empty Lets multiple stacked HorizontalScrollRow instances render under a single visible heading by passing title: "" to the second-row-onward instances. Combined with the existing shared-controller support, this gives us multi-row scrollers without a new widget. Used in the next commit's home rewrite for Recently added (2 rows) and Most played (3 rows). Co-Authored-By: Claude Opus 4.7 (1M context) --- .../widgets/horizontal_scroll_row.dart | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/flutter_client/lib/library/widgets/horizontal_scroll_row.dart b/flutter_client/lib/library/widgets/horizontal_scroll_row.dart index dccc4427..b20f87d5 100644 --- a/flutter_client/lib/library/widgets/horizontal_scroll_row.dart +++ b/flutter_client/lib/library/widgets/horizontal_scroll_row.dart @@ -23,17 +23,18 @@ class HorizontalScrollRow extends StatelessWidget { Widget build(BuildContext context) { final fs = Theme.of(context).extension()!; return Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ - Padding( - padding: const EdgeInsets.fromLTRB(16, 8, 16, 8), - child: Text( - title, - style: TextStyle( - fontFamily: fs.display.fontFamily, - fontSize: 18, - color: fs.parchment, + if (title.isNotEmpty) + Padding( + padding: const EdgeInsets.fromLTRB(16, 8, 16, 8), + child: Text( + title, + style: TextStyle( + fontFamily: fs.display.fontFamily, + fontSize: 18, + color: fs.parchment, + ), ), ), - ), SizedBox( height: height, child: ListView(