Chips
A filter chip lets a reader apply or remove one condition without leaving the list. Its short label names the condition.
Filter saved items
#Turn Saved on to see the saved item, then turn it off to restore both items.
components/chips/appliance/filter_saved.dart
import 'package:flutter/widgets.dart';
import 'package:appliance_ui/appliance_ui.dart';
class FilterSaved extends StatefulWidget {
const FilterSaved({super.key});
@override
State<FilterSaved> createState() => _FilterSavedState();
}
class _FilterSavedState extends State<FilterSaved> {
bool savedOnly = false;
@override
Widget build(BuildContext context) => Column(
mainAxisSize: MainAxisSize.min,
children: [
ApplianceChip(
'Saved',
selected: savedOnly,
onSelected: (next) => setState(() => savedOnly = next),
),
const SizedBox(height: 12),
Text(savedOnly ? 'Field notes' : 'Field notes · Reading list'),
],
);
}
Parameters
ApplianceChip API ↗label- Condition applied by the chip.
selected- Whether the saved-items filter is active.
onSelected- Updates the filter when the reader activates the chip.
Shared behaviour
- Keyboard and focus. Tab to Saved and activate it again to clear the filter.
- Screen readers. Read the chip’s name and selection state, then continue to the list to see which items remain.
- Direction and type. The chip precedes the items in both directions. Increase the text size to check the label alongside the results.