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:
parent
6eafdfdfbb
commit
2c113cc17d
1 changed files with 14 additions and 11 deletions
|
|
@ -424,19 +424,22 @@ class _FilterBar extends StatelessWidget {
|
|||
);
|
||||
if (!hasActiveFilter) return scroller;
|
||||
|
||||
// Pin "clear filters" outside the scroll so it's always visible — you
|
||||
// shouldn't have to scroll past every chip to discover it exists.
|
||||
return Row(
|
||||
// Give the chips the full width, and drop "clear filters" onto its own
|
||||
// line below — pinning it beside the scroll squeezed the chips and clipped
|
||||
// them under the edge fade.
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Expanded(child: scroller),
|
||||
const _FilterGroupDivider(),
|
||||
TextButton.icon(
|
||||
key: const Key('inventory.filter.clear'),
|
||||
onPressed: cubit.clearFilters,
|
||||
icon: const Icon(Icons.filter_alt_off_outlined, size: 18),
|
||||
label: Text(t.inventory.clearFilters),
|
||||
scroller,
|
||||
Padding(
|
||||
padding: const EdgeInsetsDirectional.only(start: 8),
|
||||
child: TextButton.icon(
|
||||
key: const Key('inventory.filter.clear'),
|
||||
onPressed: cubit.clearFilters,
|
||||
icon: const Icon(Icons.filter_alt_off_outlined, size: 18),
|
||||
label: Text(t.inventory.clearFilters),
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 4),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue