With AppKit Flutter, you can easily let people interact with multiple EVM compatible wallets and blockchains.Let’s get started with the installation and configuration!
If you are just starting a new project, you can use our CLI tool to get started quickly.
Add reown_appkit as a dependency in your pubspec.yaml and run flutter pub get (check out the latest version)
Or simply run flutter pub add reown_appkit
Locate your /ios/Podfile file and add the following as the first line:
Copy
platform :ios, '13.0'
Run $ pod install inside the /ios folder.
Depending on the Flutter version you are running, you may be required to update your app’s NDK version to 27.0.12077973 instead of the default flutter.ndkVersion
You should now be able to run your app with flutter run --dart-define=PROJECT_ID={your_project_id}
Coinbase Wallet does not use the WalletConnect protocol for communication between the dApp and the wallet.This means that pairing topic, session topic, session events and other session-related features are not available when connecting to Coinbase Wallet.However, you can still enable it to seamlessly connect with your dApp with these additional steps.If you still want to support it, on your iOS and Android native side make the following changes:
iOS
Android
Open your Info.plist file.
Locate the <key>LSApplicationQueriesSchemes</key> section.
Include <string>cbwallet</string> scheme as mentioned above in previous section
Example:
Copy
<key>LSApplicationQueriesSchemes</key><array> <string>cbwallet</string> <!-- Any other scheme previously added --></array>
Make sure pods are installed, otherwise run pod install inside your /ios folder.
Open your /ios/Runner.xcworkspace file with Xcode and add the following code in AppDelegate.swift file:
Coinbase Wallet is enabled by default even though, in order to function properly, a few steps have to be done as described in the previous section. However, if you don’t want to include/support Coinbase Wallet in your app you just need to pass Coinbase Wallet id fd20dc426fb37566d803205b19bbc1d4096b248ac04548e3cfb6b3a38bd033aa to excludedWalletIds options Array.
Phantom Wallet support is available from reown_appkit: ^1.4.0.
Phantom Wallet does not use the WalletConnect protocol for communication between the dApp and the wallet, instead it provides an internal API mechanism based on deep/universal links.This means that pairing topic, session topic, session events and other session-related features are not available when connecting to Phantom Wallet and the interaction is really basic. Dapp sends a request, Phantom Wallet responds. That’s all.Furthermore, Phantom Wallet’s deep/universal linking mechanism supports interaction exclusively with the Solana network. This means that if you have EVM networks configured in your AppKit instance, they will not be available for use after connecting with Phantom.In order to support Phantom Wallet interactions, a few extra steps have to be performed (only if you haven’t implemented Link Mode already).
First, be sure you already have your redirection back property configured in your dApp’s metadata. See Redirect to your dApp
Then you will have to implement your own Deep Link mechanism on the Flutter (and native) side so that when a link is received through it, you can just call await _appKitModal.dispatchEnvelope(link);
As guidance, here you can see how it’s done in our sample dApp:
Constructing a Solana transaction would depend on the library/package of your choice but in our sample dApp’s code you can see how we do it using solana_web3 package.
Phantom Wallet is enabled by default even though, in order to function properly, a few steps have to be done as described in the previous section. However, if you don’t want to include/support Phantom Wallet in your app you just need to pass Phantom Wallet id a797aa35c0fadbfc1a53e7f675162ed5226968b44a19ee3d24385c64d1d3c393 to excludedWalletIds options Array.
Solflare Wallet support is available from reown_appkit: ^1.6.0.
Similar to Phantom Wallet, Solflare does not use the WalletConnect protocol for communication between the dApp and the wallet, instead it provides an internal API mechanism based on deep/universal links.This means that pairing topic, session topic, session events and other session-related features are not available when connecting to Solflare Wallet and the interaction is really basic. Dapp sends a request, Solflare Wallet responds. That’s all.Furthermore, Solflare Wallet’s deep/universal linking mechanism supports interaction exclusively with the Solana network. This means that if you have EVM networks configured in your AppKit instance, they will not be available for use after connecting with Solflare.In order to support Solflare Wallet interactions, a few extra steps have to be performed (only if you haven’t implemented Link Mode already).
First, be sure you already have your redirection back property configured in your dApp’s metadata. See Redirect to your dApp
Then you will have to implement your own Deep Link mechanism on the Flutter (and native) side so that when a link is received through it, you can just call await _appKitModal.dispatchEnvelope(link);
As guidance, here you can see how it’s done in our sample dApp:
Solflare Wallet is enabled by default even though, in order to function properly, a few steps have to be done as described in the previous section. However, if you don’t want to include/support Solflare Wallet in your app you just need to pass Solflare Wallet id 1ca0bdd4747578705b1939af023d120677c64fe6ca76add81fda36e350605e79 to excludedWalletIds options Array.