I am using walletconnect_dart pkg in flutter to connect to metamask and trustwallet application. But when clicking on the button, i have to choose between trustwallet and metamask. I want when i click MM btn it redirect to mm and the same with trustwallet.
final connector = WalletConnect(
bridge: 'https://bridge.walletconnect.org',
clientMeta: const PeerMeta(
name: 'Nika',
description: 'An app for converting pictures to NFT',
url: 'https://nikaguru.page.link/start',
icons: [
'https://files.gitbook.com/v0/b/gitbook-legacy-files/o/spaces%2F-LJJeCjcLrr53DcT1Ml7%2Favatar.png?alt=media'
]));
var _session, _uri;
loginUsingMetamask(BuildContext context) async {
try {
print(connector);
var session = await connector.createSession(onDisplayUri: (uri) async {
_uri = uri;
print(uri);
await launchUrlString(uri, mode: LaunchMode.externalApplication);
});
addr = session.accounts[0];
print(session.accounts[0]);
print(session.chainId);
setState(() {
_session = session;
});
} catch (exp) {
print(exp);
}
}