removeSelectedItem method

void removeSelectedItem(
  1. String item
)

Implementation

void removeSelectedItem(String item) {
  setState(() {
    selectedItems.remove(item);
    if (widget.isAddOnly) {
      _filterItemsList.clear();
      for (String item in widget.itemList) {
        if (!selectedItems.contains(item)) {
          _filterItemsList.add(item);
        }
      }
    }
  });
}