registerListeners method

void registerListeners({
  1. OnConnectRequest? onConnect,
  2. OnSessionUpdate? onSessionUpdate,
  3. OnDisconnect? onDisconnect,
})

Register callback listeners.

Implementation

void registerListeners({
  OnConnectRequest? onConnect,
  OnSessionUpdate? onSessionUpdate,
  OnDisconnect? onDisconnect,
}) {
  on<SessionStatus>('connect', (data) => onConnect?.call(data));
  on<WCSessionUpdateResponse>(
      'session_update', (data) => onSessionUpdate?.call(data));
  on('disconnect', (data) => onDisconnect?.call());
}