diff --git a/.golangci.yml b/.golangci.yml index f89576e3..962d9ed2 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,28 +1,29 @@ +version: "2" + run: timeout: 5m tests: true linters: - disable-all: true + default: none enable: - errcheck - govet - ineffassign - staticcheck - unused + - revive + settings: + revive: + # Intentionally narrow: we skip `exported` (no doc-comment requirement) per + # the project's no-boilerplate-comment policy. Re-enable if the public API + # surface grows to the point where documentation lives alongside it. + rules: + - name: var-naming + - name: unused-parameter + - name: early-return + +formatters: + enable: - gofmt - goimports - - revive - -linters-settings: - revive: - # Intentionally narrow: we skip `exported` (no doc-comment requirement) per - # the project's no-boilerplate-comment policy. Re-enable if the public API - # surface grows to the point where documentation lives alongside it. - rules: - - name: var-naming - - name: unused-parameter - - name: early-return - -issues: - exclude-use-default: false diff --git a/flutter_client/lib/shared/widgets/track_actions/add_to_playlist_sheet.dart b/flutter_client/lib/shared/widgets/track_actions/add_to_playlist_sheet.dart index b3103420..d57c1a7c 100644 --- a/flutter_client/lib/shared/widgets/track_actions/add_to_playlist_sheet.dart +++ b/flutter_client/lib/shared/widgets/track_actions/add_to_playlist_sheet.dart @@ -69,18 +69,24 @@ class AddToPlaylistSheet extends ConsumerWidget { itemCount: owned.length, itemBuilder: (_, i) { final p = owned[i]; - return ListTile( - key: Key('add_to_playlist_${p.id}'), - leading: Icon(LucideIcons.list_music, color: fs.parchment), - title: Text( - p.name, - style: TextStyle(color: fs.parchment), + // Material(transparency) gives ListTile an ink target + // beneath the outer Container's color paint — required + // by the Flutter 3.44 ListTile/ColoredBox assertion. + return Material( + type: MaterialType.transparency, + child: ListTile( + key: Key('add_to_playlist_${p.id}'), + leading: Icon(LucideIcons.list_music, color: fs.parchment), + title: Text( + p.name, + style: TextStyle(color: fs.parchment), + ), + subtitle: Text( + '${p.trackCount} ${p.trackCount == 1 ? "track" : "tracks"}', + style: TextStyle(color: fs.ash, fontSize: 12), + ), + onTap: () => Navigator.pop(context, p.id), ), - subtitle: Text( - '${p.trackCount} ${p.trackCount == 1 ? "track" : "tracks"}', - style: TextStyle(color: fs.ash, fontSize: 12), - ), - onTap: () => Navigator.pop(context, p.id), ); }, ); diff --git a/flutter_client/lib/shared/widgets/track_actions/track_actions_sheet.dart b/flutter_client/lib/shared/widgets/track_actions/track_actions_sheet.dart index 4847784b..bf29f1a4 100644 --- a/flutter_client/lib/shared/widgets/track_actions/track_actions_sheet.dart +++ b/flutter_client/lib/shared/widgets/track_actions/track_actions_sheet.dart @@ -236,10 +236,17 @@ class _MenuItem extends StatelessWidget { @override Widget build(BuildContext context) { final fs = Theme.of(context).extension()!; - return ListTile( - leading: Icon(icon, color: fs.parchment), - title: Text(label, style: TextStyle(color: fs.parchment)), - onTap: onTap, + // Transparency-typed Material sits between the outer Container's color + // paint and the ListTile so ListTile can paint its own ink splashes. + // Flutter 3.44 promoted the "ListTile inside ColoredBox without Material" + // warning to a hard assertion. + return Material( + type: MaterialType.transparency, + child: ListTile( + leading: Icon(icon, color: fs.parchment), + title: Text(label, style: TextStyle(color: fs.parchment)), + onTap: onTap, + ), ); } }