【发布时间】:2021-11-06 08:52:50
【问题描述】:
我在使用 country_currency_pickers 时遇到了一个错误,我想这是因为该函数应该变成空安全,但我不知道该怎么做。提前感谢您的帮助!
Widget _buildDropdownItem(Country country) => Container(
child: Row(
children: <Widget>[
CountryPickerUtils.getDefaultFlagImage(country),
SizedBox(
width: 8.0,
),
Text("+${country.phoneCode}(${country.isoCode})"),
],
),
);
CurrencyPickerDropdown(
itemBuilder: _buildCurrencyDropdownItem,
initialValue: 'INR',
onValuePicked: (Country countryvalue) {
print("${country.name}");
},
)
【问题讨论】:
-
函数_buildCurrencyDropdownItem在哪里?
标签: flutter dart dart-null-safety