We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
You can test by this code below.
class Test extends StatefulWidget { const Test({super.key}); @override State<Test> createState() => _TestState(); } class _TestState extends State<Test> { final items = [1, 2, 3, 4, 5].map((e) => MultiSelectItem(e, '$e')).toList(); List<int> selectedItems = []; @override Widget build(BuildContext context) { final policeStationSelectedWidget = MultiSelectChipDisplay( icon: const Icon(Icons.cancel), items: items, // I tried `selectedItems.map((e) => MultiSelectItem(e, '$e')).toList()` and <MultiSelectItem<int>>[] but it doesn't work. onTap: (v) { selectedItems.removeWhere((element) => element == v); setState(() {}); }, ); print(selectedItems); return MultiSelectDialogField( initialValue: selectedItems, items: items, chipDisplay: policeStationSelectedWidget, onConfirm: (v) { selectedItems = v; setState(() {}); }, searchable: true, ); } }
Nothing happened after I selected items and clicked remove at the icon of the policeStationSelectedWidget.
policeStationSelectedWidget
The text was updated successfully, but these errors were encountered:
No branches or pull requests
You can test by this code below.
Nothing happened after I selected items and clicked remove at the icon of the
policeStationSelectedWidget
.The text was updated successfully, but these errors were encountered: