clearConnectionSelection method

void clearConnectionSelection()

Clears all connection selections.

Triggers the onConnectionSelected callback with null to indicate no selection.

Does nothing if no connections are currently selected.

Implementation

void clearConnectionSelection() {
  if (_selectedConnectionIds.isEmpty) return;

  for (final id in _selectedConnectionIds) {
    // Find and clear the selected state of each connection
    for (final connection in _connections) {
      if (connection.id == id) {
        connection.selected = false;
        break;
      }
    }
  }
  _selectedConnectionIds.clear();

  // Fire selection callback with null to indicate no selection
  callbacks.onConnectionSelected?.call(null);
}