updateCurrentUserId method

void updateCurrentUserId(
  1. String userId
)

Updates the current user id when the host app manages connection itself.

Implementation

void updateCurrentUserId(String userId) {
  final acceptingEngineEvents = userId.isNotEmpty;
  if (_currentUserId == userId &&
      _acceptingEngineEvents == acceptingEngineEvents) {
    return;
  }
  _currentUserId = userId;
  _acceptingEngineEvents = acceptingEngineEvents;
  notifyListeners();
}