{"id":24822172,"url":"https://github.com/walletconnect/walletconnectmodalflutter","last_synced_at":"2026-03-05T18:02:43.128Z","repository":{"id":177894269,"uuid":"659352076","full_name":"WalletConnect/WalletConnectModalFlutter","owner":"WalletConnect","description":"The WalletConnectModal for WalletConnect built using Flutter.","archived":false,"fork":false,"pushed_at":"2024-08-07T15:47:12.000Z","size":866,"stargazers_count":32,"open_issues_count":18,"forks_count":19,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-05-09T00:08:28.230Z","etag":null,"topics":["dart","flutter","walletconnectv2"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/walletconnect_modal_flutter","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/WalletConnect.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-27T16:38:57.000Z","updated_at":"2025-04-04T03:42:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"e1e0c932-3b3b-49eb-b292-8fc58df02985","html_url":"https://github.com/WalletConnect/WalletConnectModalFlutter","commit_stats":{"total_commits":91,"total_committers":4,"mean_commits":22.75,"dds":"0.23076923076923073","last_synced_commit":"867326d9eb1bb06abc3ff0889c9d56e7e8680496"},"previous_names":["walletconnect/walletconnectmodalflutter"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WalletConnect%2FWalletConnectModalFlutter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WalletConnect%2FWalletConnectModalFlutter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WalletConnect%2FWalletConnectModalFlutter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WalletConnect%2FWalletConnectModalFlutter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WalletConnect","download_url":"https://codeload.github.com/WalletConnect/WalletConnectModalFlutter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253166520,"owners_count":21864482,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dart","flutter","walletconnectv2"],"created_at":"2025-01-30T18:26:44.539Z","updated_at":"2025-10-24T23:39:06.487Z","avatar_url":"https://github.com/WalletConnect.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WalletConnect Modal Flutter\n\nWalletConnect Modal implementation in Flutter.\n\n## Setup\n\nTo get the modal to work properly you need to create two objects.\n\nThe first is the `WalletConnectModalTheme` which is used to style the modal.\n\n```dart\n// Example of WalletConnectModalTheme\nreturn WalletConnectModalTheme(\n  data: WalletConnectModalThemeData.darkMode,\n  child: MaterialApp(\n    title: 'Flutter Demo',\n    theme: ThemeData(\n      colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),\n      useMaterial3: true,\n    ),\n    home: const MyHomePage(title: 'WalletConnectModal Sign Example'),\n  ),\n);\n```\n\nThe second is the WalletConnectModalService which is your primary class for opening, closing, disconnecting, etc.\n\n```dart\nWalletConnectModalService service = WalletConnectModalService(\n  projectId: projectId, \n  metadata: const PairingMetadata(\n    name: 'Flutter WalletConnect',\n    description: 'Flutter WalletConnectModal Sign Example',\n    url: 'https://walletconnect.com/',\n    icons: ['https://walletconnect.com/walletconnect-logo.png'],\n    redirect: Redirect(\n      native: 'flutterdapp://',\n      universal: 'https://www.walletconnect.com',\n    ),\n  ),\n);\nawait service.init();\n```\n\nThe service must be initialized before it can be used.\n\nNow that those two things are setup in your application, you can call `_service.open()` to open the modal.\n\nTo make things easy, you can use the WalletConnectModalConnect widget to open the modal.\nThis is a button that chanages its state based on the modal and connection.\nThis widget requires the WalletConnectModalService to be passed in.\n\n```dart\nWalletConnectModalConnect(\n  walletConnectModalService: _service,\n),\n```\n\n### Excluding, Recommending, and Including Wallets\n\nYou can pass a list of wallet IDs into the `WalletConnectModalService` to exclude, recommend, or include wallets.\n\nAll wallet IDs can be found on the [explorer](https://walletconnect.com/explorer?type=wallet), just click on the wallet you want to copy the ID for.\n\nExample 1: Exclude all wallets except MetaMask and Trust\n\n```dart\nWalletConnectModalService(\n  web3App: web3App,\n  recommendedWalletIds: {\n    'c57ca95b47569778a828d19178114f4db188b89b763c899ba0be274e97267d96', // MetaMask\n    '4622a2b2d6af1c9844944291e5e7351a6aa24cd7b23099efac1b2fd875da31a0', // Trust\n  },\n  excludedWalletState: ExcludedWalletState.all, // Exclude all wallets except the two above\n);\n```\n\nExample 2: Recommend (Sort to the top) MetaMask and Trust\n\n```dart\nWalletConnectModalService(\n  web3App: web3App,\n  recommendedWalletIds: {\n    'c57ca95b47569778a828d19178114f4db188b89b763c899ba0be274e97267d96', // MetaMask\n    '4622a2b2d6af1c9844944291e5e7351a6aa24cd7b23099efac1b2fd875da31a0', // Trust\n  },\n);\n```\n\nExample 3: Exclude MetaMask and Trust\n\n```dart\nWalletConnectModalService(\n  web3App: web3App,\n  excludedWalletIds: {\n    'c57ca95b47569778a828d19178114f4db188b89b763c899ba0be274e97267d96', // MetaMask\n    '4622a2b2d6af1c9844944291e5e7351a6aa24cd7b23099efac1b2fd875da31a0', // Trust\n  },\n);\n```\n\n## Notes\n\nSwapping the required or optional namespaces will not do anything if your dApp has already connected.  \nFor those changes to take effect, you must disconnect and reconnect.  \n\n## iOS Setup\n\nFor each app you would like to be able to deep link to, you must add that app's link into the `ios/Runner/Info.plist` file like so:\n\n```xml\n\u003ckey\u003eLSApplicationQueriesSchemes\u003c/key\u003e\n\u003carray\u003e\n  \u003cstring\u003emetamask\u003c/string\u003e\n  \u003cstring\u003erainbow\u003c/string\u003e\n  \u003cstring\u003etrust\u003c/string\u003e\n\u003c/array\u003e\n```\n\nTo handle deep linking to your app, you will also need to add the following to the plist file:\n\n```xml\n\u003ckey\u003eCFBundleURLTypes\u003c/key\u003e\n\u003carray\u003e\n    \u003cdict\u003e\n        \u003ckey\u003eCFBundleURLSchemes\u003c/key\u003e\n        \u003carray\u003e\n            \u003cstring\u003eflutterdapp\u003c/string\u003e \u003c!-- Change \"flutterdapp\" to be your deep link --\u003e\n        \u003c/array\u003e\n        \u003ckey\u003eCFBundleURLName\u003c/key\u003e\n        \u003cstring\u003ecom.walletconnect.flutterdapp\u003c/string\u003e \u003c!-- Change this package name to be your package --\u003e\n    \u003c/dict\u003e\n\u003c/array\u003e\n```\n\n## Android Setup\n\nOn android 11+ you must specify that use can use the internet, along with the different schemes you would like to be able to deep link to in the `android/app/src/main/AndroidManifest.xml` file like so:\n\n```xml\n\u003cmanifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\u003e\n    \u003c!-- Intent so you can deep link to wallets --\u003e\n    \u003cqueries\u003e\n        \u003cintent\u003e\n            \u003caction android:name=\"android.intent.action.VIEW\" /\u003e\n            \u003ccategory android:name=\"android.intent.category.BROWSABLE\" /\u003e\n            \u003cdata android:scheme=\"https\" /\u003e\n        \u003c/intent\u003e\n        \u003cintent\u003e\n            \u003caction android:name=\"android.intent.action.VIEW\" /\u003e\n            \u003cdata android:scheme=\"metamask\" /\u003e\n        \u003c/intent\u003e\n    \u003c/queries\u003e\n    \u003c!-- Permission to access the internet --\u003e\n    \u003cuses-permission android:name=\"android.permission.INTERNET\"/\u003e\n    \u003c!-- Update your activity to handle the deep linking from other apps --\u003e\n    \u003cactivity\n            ...\u003e\n            \u003cintent-filter\u003e\n                \u003caction android:name=\"android.intent.action.VIEW\" /\u003e\n                \u003ccategory android:name=\"android.intent.category.DEFAULT\" /\u003e\n                \u003ccategory android:name=\"android.intent.category.BROWSABLE\" /\u003e\n\n                \u003c!-- Accepts URIs that begin with \"flutterdapp://”, change this to be your deep link --\u003e\n                \u003cdata android:scheme=\"flutterdapp\" /\u003e\n            \u003c/intent-filter\u003e\n        \u003c/activity\u003e\n    ...\n\u003c/manifest\u003e\n```\n\nFor some reason, multiple wallets have the `metamask` intent, and will launch metamask as a result.  \nThis is a bug in the wallets, not this package.  \n\n## Detailed Usage\n\nYou can launch the currently connected wallet by calling `service.launchCurrentWallet()`.\n\n### Commands\n\n`flutter pub run build_runner build --delete-conflicting-outputs`\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwalletconnect%2Fwalletconnectmodalflutter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwalletconnect%2Fwalletconnectmodalflutter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwalletconnect%2Fwalletconnectmodalflutter/lists"}