0 purchases
spinner dropdown
Alert #
This project is cloned from https://pub.dev/packages/drop_down_list. I have added few improvements and more in future.
Spinner #
Highly versatile Widget to search through a single or multiple choices from bottom sheet list in a dialog box or a menu.
Platforms #
This plugin has been successfully tested on iOS, Android & web.
Examples #
The following examples are extracted from the example project available in the repository. More examples are available in this project.
Samples of Dropdown list with choices #
Dropdown Multiple Selection #
Dropdown Single Selection #
How to Use #
SpinnerState(
Spinner(
bottomSheetTitle: const Text(
'Stops',
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 20.0,
),
),
submitButtonChild: const Text(
'Done',
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.bold,
),
),
data: [SpinnerListItem(data: 'London'),SpinnerListItem(data: 'New York')] ?? [],
selectedItems: (List<dynamic> selectedList) {
List<String> list = [];
for(var item in selectedList) {
if(item is SpinnerListItem) {
list.add(item.data.toString());
}
}
ScaffoldMessenger.of(context).showSnackBar(SnackBar(content: Text(list.toString())));
},
enableMultipleSelection: true,
),
).showModal(context);
copied to clipboard
Required parameters #
data:
This property takes List
Optional parameters #
listBuilder:
This property takes int value as a parameter. This is use to set the initial segment from [segmentNames].
enableMultipleSelection:
This property takes Color value as a parameter. You can change the background color of animated segment. default value is Color(0xff8AADFB)
bottomSheetTitle:
This gives the bottom sheet title.
submitButtonChild:
You can set your custom submit button when the multiple selection is enabled.
selectedItems:
This will give the call back to the selected items from list.
dropDownBackgroundColor:
This will set the background color to the dropdown.
searchWidget:
This property takes TextFormField value as a parameter. [searchWidget] is use to show the text box for the searching. If you are passing your own widget then you must have to add [TextEditingController] for the [TextFormField].
isSearchVisible:
This property takes bool value as a parameter. [isSearchVisible] is use to manage the search widget visibility. by default it is [True] so widget will be visible.
LICENSE! #
Dropdown list is [MIT-licensed].
Let us know! #
We’d be really happy if you send us links to your projects where you use our component. Just send an email to [email protected] and do let us know if you have any questions or suggestion regarding our work.
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.