searchable_dropdown 1.1.0
searchable_dropdown: ^1.1.0 copied to clipboard
Searchable dropdown inside a dialog
searchable_dropdown #
Searchable dropdown item inside a dialog
Normal Usage

Props #
props | types | defaultValues |
---|---|---|
items | List<DropdownMenuItem | |
onChanged | ValueChanged | |
value | T | |
style | TextStyle | |
searchHint | Widget | |
hint | Widget | |
disabledHint | Widget | |
icon | Widget | |
underline | Widget | |
iconEnabledColor | Color | |
iconDisabledColor | Color | |
iconSize | Double | 24 |
isCaseSensitiveSearch | bool | false |
isExpanded | bool | false |
Usage #
import 'package:searchable_dropdown/searchable_dropdown.dart';
List<DropdownMenuItem> items = [];
String selectedValue;
Widget widget() {
for(int i=0; i < 20; i++){
items.add(new DropdownMenuItem(
child: new Text(
'test ' + i.toString(),
),
value: 'test ' + i.toString(),
));
}
return new SearchableDropdown(
items: items,
value: selectedValue,
hint: new Text(
'Select One'
),
searchHint: new Text(
'Select One',
style: new TextStyle(
fontSize: 20
),
),
onChanged: (value) {
setState(() {
selectedValue = value;
});
},
);
}