registerListeners method
void
registerListeners({
- OnConnectRequest? onConnect,
- OnSessionUpdate? onSessionUpdate,
- 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());
}