subscribeEvents method
void
subscribeEvents({
- required dynamic onPairing(),
- required dynamic onPaired(),
- required dynamic onCallRequest(),
- required dynamic onDisconnect(),
- String? uri,
Implementation
void subscribeEvents({
required Function(WCPairingData?, WCProposerMeta?, String?) onPairing,
required Function(Map) onPaired,
required Function(WCCallRequestData) onCallRequest,
required Function(String) onDisconnect,
String? uri,
}) {
service.subscribeEvents(
onPairing: (Map proposal) {
onPairing(null, WCProposerMeta.fromJson(proposal['peerMeta']), null);
},
onPaired: (Map session) {
onPaired(session);
},
onCallRequest: (Map payload) {
onCallRequest(WCCallRequestData.fromJson(payload));
},
onDisconnect: (uri) {
onDisconnect(uri);
},
uri: uri);
}