emitConnectionState method

void emitConnectionState(
  1. ChatConnectionState state
)

Test helper: pushes a raw connection-state transition (e.g. connecting / authenticating / reconnecting) without going through connect/disconnect — those two only ever emit connected/disconnected. Lets tests exercise the intermediate states real transports report via stateChanges alone (no accompanying ChatEvent).

Implementation

void emitConnectionState(ChatConnectionState state) {
  _connectionState = state;
  _stateController.add(state);
}