icemanbsi / searchable_dropdown

MIT License
107 stars 162 forks source link

Search is not working when, I use value as Id Int inside Value DropdownMenuItem #133

Open EslamAbotaleb opened 3 years ago

EslamAbotaleb commented 3 years ago

SearchableDropdown.single( key: key, items: list.asMap().entries.map((item) { return new DropdownMenuItem( child: Text(item.value['name']), value: item.value['id']); }).toList(), isExpanded: true, searchHint: new Text( 'Select ', style: new TextStyle(fontSize: 20), ), onChanged: (value) {}, style: TextStyleWidget.build(), ),

muhammedozdemir commented 3 years ago

Hello i faced same problem and i used item.value['id']+"*"+item.value['name'] and split to get id