我intl_phone_field: ^1.4.4
用来在颤振中创建一个电话号码字段,效果很好。我得到的错误是何时Search by Country Name
专注于键盘显示国家列表消失。任何人都可以帮助解决这个问题吗?下面是我的代码:
IntlPhoneField(
dropDownArrowColor: Colors.grey,
countryCodeTextColor: Colors.grey,
style: TextStyle(color: Colors.grey),
controller: _controllerPhone,
decoration: InputDecoration( //decoration for Input Field
border: InputBorder.none,
labelStyle:
TextStyle(
color: Colors
.grey,fontFamily: 'Montserrat'
),
),
initialCountryCode: ISO.toString(),
onChanged: (phone) {
phoneNumber = phone.countryCode;
phoneCountryISO = phone.countryISOCode;
print(phone.completeNumber); //get complete number
print(phone.countryISOCode); //get complete number
print(phone.countryCode); // get country code only
print(phone.number); // only phone number
},
)