removeSelected method

void removeSelected(
  1. BsSelectBoxOption option
)

remove selected value

Implementation

void removeSelected(BsSelectBoxOption option) {
  if (_selected != null) {
    int index = _selected!
        .indexWhere((element) => element.getValue() == option.getValue());
    if (index != -1) _selected!.removeAt(index);

    if (_selected!.length == 0) clear();
  }
}