hi I am trying multi_select_flutter
but was unable to solve this error
A value of type 'List<Object?>' can't be assigned to a variable of type 'List'.
this is my code of multi_select_flutter
widget i am using
MultiSelectBottomSheetField(
initialChildSize: 0.4,
listType: MultiSelectListType.CHIP,
searchable: true,
buttonText: Text("Favorite Animals"),
title: Text("Animals"),
items: _items,
onConfirm: (values) {
// _selectedAnimals2 = values;
},
chipDisplay: MultiSelectChipDisplay(
onTap: (value) {
setState(() {
_selectedAnimals2.remove(value);
});
},
),
),
CodePudding user response:
_items's element should be non-nullable, because items decalaration like:
type not matched is the reason you encounter the error.
CodePudding user response:
Its already there but still it shows same error