I’m a flutter beginner. I’m trying to create filter chips. I want a list of 3 filter chips in a row with a multiselection option. How to achieve this?
Like this:
bool isSelected = false;
Padding(
padding: const EdgeInsets.only(top: 20),
child: FilterChip(
label: Text('data1'),
selected: isSelected,
onSelected: (bool value) {
setState(() {
isSelected = !isSelected;
});
}),
),
2
Answers
Instead of filter you can create custom checkbox that is easy to implement
Multi-selection option means you need a list or model class to control N items. I am using another list that will decide the item is checked or not.