simple_search_dropdown

Creator: coderz1093

Last updated:

Add to Cart

Description:

simple search dropdown

Search Dropdown #
Search DropDown is a dropdown that offers a search bar, multiple and single selections.
Import #
import 'package:simple_search_dropdown/simple_search_dropdown.dart';
copied to clipboard
Getting Started #
This project is a widget to find items in a list without sacrifying beauty and usefulness:

Different styles: Search DropDown can be customized with various styles, including colors, text styles, icons, and more.
Multiple and single options: Search DropDown can be used to select multiple or single items.
Add and Delete Mode: Search Dropdown accepts functions to add and delete items from the list inside it
Compact and Simple: Search DropDown is very compact and takes up very little space on the screen.

Usage #
Features #
Add Mode:

Delete Mode:

Search:

1. Single SearchDropDown #
SearchDropDown(
listItens: listitems,
onDeleteItem: removeItem,
onAddItem: addItem,
addMode: true,
deleteMode: true,
updateSelectedItem: updateSelectedItem,
),
copied to clipboard

2. Multiple SearchDropDown #
MultipleSearchDropDown(
listItems: listitems,
onDeleteItem: removeItem,
onAddItem: addItem,
addMode: true,
deleteMode: true,
selectedItems: selectedMultipleItems,
updateSelectedItems: updateSelectedItems,
),
copied to clipboard
3. Reseting the dropdown to the unselected state: #
//create a key and add it to the dropdown:
final GlobalKey<SearchDropDownState> singleSearchKey = GlobalKey();
SearchDropDown(
listItens: listitems,
onDeleteItem: removeItem,
onAddItem: addItem,
addMode: true,
deleteMode: true,
updateSelectedItem: updateSelectedItem,
),
//create a function to clear the selection:
void clearSingleSelection() {
singleSearchKey.currentState?.clearSelection();
}
//assign it to a widget (like a button):
TextButton(
onPressed: clearSingleSelection,
child: const Text('Clear Single Selection'),
),
copied to clipboard


License #

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files:

Customer Reviews

There are no reviews.