exitMultiSelectionMode method

void exitMultiSelectionMode({
  1. bool alsoUnselect = true,
})

Exits multi-selection mode for items and notifies parent widget. This will also unselect all items when alsoUnselect is true.

Implementation

void exitMultiSelectionMode({bool alsoUnselect = true}) {
  if (_multiSelecting) {
    if (alsoUnselect) {
      unselectAll(); // also with stateSetter
    }
    _multiSelecting = false;
    _widget?.stateSetter.call();
    _widget?.onModeChanged?.call(false);
  }
}