selectItem method

void selectItem(
  1. T item
)

Implementation

void selectItem(T item) {
  if (!selectedItems.contains(item)) selectedItems.add(item);
}