[[enter image description here](https://i.stack.imgur.com/4McwS.jpg)](https://i.stack.imgur.com/9EcQK.jpg)
child: DropdownButtonHideUnderline(
child: DropdownButton(
onTap: () {
if(((countryListModel?.countriesData??[]).isEmpty)){
commanDataService.countryList().then((value) {
if((value?.status??false)){
setState(() {
countryListModel = value;
}
);
}
});
}
},
hint: _dropDownCountrCodeValue == null
? const Text('Select Country',style: TextStyle(fontFamily: 'Poppins',))
: Text(
_dropDownCountrCodeValue?.countryCode??"",
style: const TextStyle(fontFamily: 'Poppins',color: Colors.black38),
),
isExpanded: true,
iconSize: 30.0,
style: const TextStyle(fontFamily: 'Poppins',color: Colors.grey),
items: (countryListModel?.countriesData??[]).map<DropdownMenuItem<CountriesData>>((CountriesData val) {
return DropdownMenuItem<CountriesData>(
value: val,
child: Text('( + ${val.phoneCode??""} ) ${val.countryName??""}',style: const TextStyle(fontFamily: 'Poppins',)),
);
},
).toList(),
onChanged: (val) {
setState(
() {
_dropDownCountrCodeValue = val as CountriesData?;
},
);
},
),
),
我正在尝试正确显示完整的国家名称和代码,但仅显示国家/地区示例的缩写形式 +91 INDIA 但仅显示 (IN) 并尝试在此代码中添加搜索栏。