Open jigarparmar21 opened 4 years ago
![Uploading 2.JPG…]()
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
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, )), ]); }
![1593684299477](https://user-images.githubusercontent.com/59466922/86443772-5e360d00-bd2d-11ea-8aa7-451c814188a0.JPEG)