MultiSelectChipDisplay : custom icon doesn't replace default icon(Icons.checked).
Please check screenshot for my UI. https://prnt.sc/nEmSOC_ZxUgg
remove icon and checked icon is overlapped. checked icon should be removed, but it is still existing with remove icon together.
MultiSelectChipDisplay( items: provider.arrSavedPromoters.map((e) => MultiSelectItem<Promoter>(e, e.username)).toList(), icon: const Icon( Icons.highlight_remove, color: Colors.red,), // icon: const Icon( Icons.check, color: Colors.red,), chipColor: Colors.green, textStyle: const TextStyle(color: Colors.black), onTap: (item) { provider.onRemoveAddedPromoter(item.paymail); },),
I have the same problem as Razvan (director2010s) have. I can't use a custom Icon for MultiSelectChipDisplay. Did anyone found a solution for this bug ?
I'm thinking to clone the multi_select_flutter library -> after to change the icon in the cloned location and later on to link the local library into Pubspec file just to fix this issue.
you can add value (showCheckmark: false) at ChoiceChip in MultiSelectChipDisplay
you can add value (showCheckmark: false) at ChoiceChip in MultiSelectChipDisplay
Hi @alex-dh-kim , I can't find anywhere that option. Can you guide me please how to access that showCheckmark option ? I have the latest version of the plugin.
Here is my code:
MultiSelectDialogField(
searchable: true,
initialValue: _selectedOptionsList,
items: _optionsList
.map((OptionModel option) =>
MultiSelectItem<OptionModel>(option, option.name ?? ""))
.toList(),
title: const Text("Select Option"),
selectedColor: Colors.blue,
decoration: const BoxDecoration(borderRadius: BorderRadius.all(Radius.circular(40))),
buttonIcon: const Icon(Icons.checklist,color: Colors.blue),
buttonText: const Text("My Options",style: TextStyle(fontSize: 14)),
onConfirm: (selectedList) {
setState(() => _selectedOptionsList = selectedList.cast<OptionModel>()
);
},
chipDisplay: MultiSelectChipDisplay(
onTap: (selectedChip) {
setState(() => _selectedOptionsList.remove(selectedChip));
return _selectedOptionsList;
},
),
itemsTextStyle: TextStyle(color: isDarkMode ? AppColors.contentColorWhite : AppColors.contentColorBlack),
selectedItemsTextStyle: TextStyle( color: isDarkMode ? AppColors.contentColorWhite : AppColors.contentColorBlack),
)
@florentin89 I mean, you can find ChoiceChip Widget in MultiSelectChipDisplay Widget.( you should find _buildItem function in MultiSelectChipDisplay (line 132)
I'm using version 4.1.3 (multi_select_flutter: ^4.1.3)
hope this helps
(multi_select_chip_display.dart)
Widget _buildItem(MultiSelectItem<V> item, BuildContext context) {
return Container(
padding: const EdgeInsets.all(2.0),
child: ChoiceChip(
shape: shape as OutlinedBorder?,
showCheckmark: false, // <----- add this key:value
avatar: icon != null
....
For now you can just add
chipTheme: ChipThemeData(
showCheckmark: false,
),
To your ThemeData in MaterialApp