multiple_search_selection 2.0.2 multiple_search_selection: ^2.0.2 copied to clipboard
A highly customizable multiple selection widget with fuzzy search functionality.
A highly customizable multiple selection widget with fuzzy search functionality
MultipleSearchSelection<Country>(
items: countries, // List<Country>
fieldToCheck: (c) {
return c.name;
},
itemBuilder: (country) {
return Padding(
padding: const EdgeInsets.all(6.0),
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6),
color: Colors.white,
),
child: Padding(
padding: const EdgeInsets.symmetric(
vertical: 20.0,
horizontal: 12,
),
child: Text(country.name),
),
),
);
},
pickedItemBuilder: (country) {
return Container(
decoration: BoxDecoration(
color: Colors.white,
border: Border.all(color: Colors.grey[400]!),
),
child: Padding(
padding: const EdgeInsets.all(8),
child: Text(country.name),
),
);
},
onTapShowedItem: () {},
onPickedChange: (items) {},
onItemAdded: (item) {},
onItemRemoved: (item) {},
sortShowedItems: true,
sortPickedItems: true,
fuzzySearch: FuzzySearch.jaro,
padding: const EdgeInsets.all(20),
itemsVisibility: ShowedItemsVisibility.alwaysOn,
title: Text(
'Countries',
style: kStyleDefault.copyWith(
fontSize: 22,
fontWeight: FontWeight.bold,
),
),
showSelectAllButton: true,
titlePadding: const EdgeInsets.symmetric(vertical: 10),
searchItemTextContentPadding:
const EdgeInsets.symmetric(horizontal: 10),
maximumShowItemsHeight: 200,
)
Showed items behavior #
Always on | On type | Toggle |
---|---|---|
Issues / Features #
Found a bug or want a new feature? Open an issue in the Github repository of the project.