fix(inventory): move 'clear filters' to its own line below the chips

Pinning it beside the horizontal scroll squeezed the chips into a narrow
strip and clipped them under the edge fade (e.g. 'Comparto' cut off by
the scroll arrow). Now the chips get the full width and 'clear filters'
sits on its own line below, shown only when a filter is active.
This commit is contained in:
vjrj 2026-07-12 07:35:20 +02:00
parent 6eafdfdfbb
commit 2c113cc17d

View file

@ -424,19 +424,22 @@ class _FilterBar extends StatelessWidget {
); );
if (!hasActiveFilter) return scroller; if (!hasActiveFilter) return scroller;
// Pin "clear filters" outside the scroll so it's always visible — you // Give the chips the full width, and drop "clear filters" onto its own
// shouldn't have to scroll past every chip to discover it exists. // line below pinning it beside the scroll squeezed the chips and clipped
return Row( // them under the edge fade.
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Expanded(child: scroller), scroller,
const _FilterGroupDivider(), Padding(
TextButton.icon( padding: const EdgeInsetsDirectional.only(start: 8),
child: TextButton.icon(
key: const Key('inventory.filter.clear'), key: const Key('inventory.filter.clear'),
onPressed: cubit.clearFilters, onPressed: cubit.clearFilters,
icon: const Icon(Icons.filter_alt_off_outlined, size: 18), icon: const Icon(Icons.filter_alt_off_outlined, size: 18),
label: Text(t.inventory.clearFilters), label: Text(t.inventory.clearFilters),
), ),
const SizedBox(width: 4), ),
], ],
); );
} }