toggleSelected method

void toggleSelected()

Implementation

void toggleSelected() {
  if (!mounted) return;
  if (selected) {
    onUnselected();
  } else {
    onSelected();
  }
}