searchable_dropdown
searchable_dropdown copied to clipboard
I have completely get the package of searchable_dropdown and add in my code, but while searching it dont show the data.
Widget countryDropDown() {
return Column(children: [
Container(
padding:EdgeInsets.only(left: 8.0, right: 8.0),
height: 70.0,
decoration: BoxDecoration(
border: Border.all(), borderRadius: BorderRadius.circular(2.0)),
child: DropdownButtonHideUnderline(
child: new SearchableDropdown.single(
isExpanded: true,
hint: Text(Constants.getValueFromKey(
"Admin.Address.SelectCountry", Constants.hashMap)),
value: countryDropDownModel.currentValue,
items: countryDropDownModel.dropDownItems,
isCaseSensitiveSearch: true,
onChanged: (value) async {
visibleCountry = false;
countryModel = value;
await callApiForGetStates(countryModel.strValue.toString());
setState(() {
countryDropDownModel.currentValue = countryModel;
});
},
),
),
),
Visibility(
visible: visibleCountry,
child: new SmallText(
text: Constants.getValueFromKey(
"Admin.Address.SelectCountry", Constants.hashMap),
maxLine: 1,
align: TextAlign.start,
color: Colors.red,
)),
]);
}
@jigarparmar21
I found it you have put text in value field also so when you will search it will search according to text
in my case what i did
search works with "value" field