Closed maxttor closed 2 months ago
Hello @maxttor , You can initialize dapp the following way and use it .
const meta = const PairingMetadata(
name: 'Dapp',
description: 'Web3Modal Dapp',
url: 'https://www.walletconnect.com/',
icons: ['https://walletconnect.com/walletconnect-logo.png'],
redirect: Redirect(
native: 'dapp://',
universal: 'https://www.walletconnect.com',
),
);
final dapp = await Web3App.createInstance(
projectId: projectId,
metadata: meta
);
_web3Service = W3MService(
projectId: projectId,
web3App: dapp,
metadata: meta
);
You can try the following :
dapp.onSessionEvent.subscribe((args) {
...
});
Let me know if your issue is solved.
Hello @maxttor! What are you running exactly? I mean, this repo but any particular branch or commit hash? In any case, try replacing that line lib/home_page.dart:67:17
with the following:
_w3mService.web3App?.onSessionEvent.subscribe(_onSessionEvent);
I'm trying to run this example, but I'm getting an error:
lib/home_page.dart:67:17: Error: The getter 'onSessionEventEvent' isn't defined for the class 'W3MService'.