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
be5977d688
commit
b22db7d0cb
1 changed files with 14 additions and 11 deletions
|
|
@ -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),
|
||||||
key: const Key('inventory.filter.clear'),
|
child: TextButton.icon(
|
||||||
onPressed: cubit.clearFilters,
|
key: const Key('inventory.filter.clear'),
|
||||||
icon: const Icon(Icons.filter_alt_off_outlined, size: 18),
|
onPressed: cubit.clearFilters,
|
||||||
label: Text(t.inventory.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