refactor(screens): migrate remaining screens to shared header and selection components

- album/playlist/library-folder/track-metadata adopt
  CollapsingHeaderScrollMixin; artist/library-folder adopt
  SelectionModeMixin
- HeaderCircleButton and HeaderMetaRow replace per-screen copies
  in album and playlist headers; dead _tallHeader flag removed
- SelectionBottomBar gains optional subtitle labels and backs the
  playlist selection bar in queue tab
This commit is contained in:
zarzet
2026-07-12 19:38:50 +07:00
parent 44de61a06a
commit 62015a4e2d
8 changed files with 259 additions and 559 deletions
+12 -2
View File
@@ -13,6 +13,8 @@ class SelectionBottomBar extends StatelessWidget {
required this.onToggleSelectAll,
required this.bottomPadding,
required this.children,
this.allSelectedLabel,
this.tapToSelectLabel,
});
final int selectedCount;
@@ -22,6 +24,12 @@ class SelectionBottomBar extends StatelessWidget {
final double bottomPadding;
final List<Widget> children;
/// Overrides the default "All tracks selected" subtitle.
final String? allSelectedLabel;
/// Overrides the default "Tap tracks to select" subtitle.
final String? tapToSelectLabel;
@override
Widget build(BuildContext context) {
final colorScheme = Theme.of(context).colorScheme;
@@ -80,8 +88,10 @@ class SelectionBottomBar extends StatelessWidget {
),
Text(
allSelected
? context.l10n.selectionAllSelected
: context.l10n.downloadedAlbumTapToSelect,
? allSelectedLabel ??
context.l10n.selectionAllSelected
: tapToSelectLabel ??
context.l10n.downloadedAlbumTapToSelect,
style: Theme.of(context).textTheme.bodySmall
?.copyWith(color: colorScheme.onSurfaceVariant),
),