我想自动完成FormBuilderDropdown
. 当我写一封信时,项目列表会更改以显示包含该字母的项目。
FormBuilderDropdown(
attribute: 'field_city',
decoration: LikpechInputDecoration(_isLoading, 'Selectionnez une ville'),
items: _buildListCities(),
/*initialValue: DropdownMenuItem(
value: _selectedCity,
child: Text(_listCities[_selectedCity]['name']),
),*/
onChanged: (index) {
setState(() {
_selectedCity = index;
});
fetchAgences(index);
},
validators: [
FormBuilderValidators.required(errorText: '')
],
) : Center(child: CupertinoActivityIndicator()),