├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md └── workflows │ ├── build-android-debug.yml │ ├── build-android-internal.yml │ ├── build-android.yml │ ├── build-ios-debug.yml │ ├── build-ios-internal.yml │ ├── build-ios.yml │ ├── publish.yml │ ├── tag.json │ ├── tagalpha.json │ └── tagbeta.json ├── .gitignore ├── .metadata ├── CHANGELOG.md ├── LICENSE ├── README.md ├── analysis_options.yaml ├── android ├── .gitignore ├── app │ ├── build.gradle │ └── src │ │ ├── debug │ │ └── AndroidManifest.xml │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── kotlin │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── web3modal_flutter │ │ │ │ └── MainActivity.kt │ │ └── res │ │ │ ├── drawable-v21 │ │ │ └── launch_background.xml │ │ │ ├── drawable │ │ │ └── launch_background.xml │ │ │ ├── mipmap-hdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ └── ic_launcher.png │ │ │ ├── values-night │ │ │ └── styles.xml │ │ │ └── values │ │ │ └── styles.xml │ │ └── profile │ │ └── AndroidManifest.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties └── settings.gradle ├── assets ├── AppIcon.png ├── account_copy.svg ├── account_disconnect.svg ├── dark │ ├── all_wallets.svg │ ├── all_wallets_button.svg │ ├── code_button.svg │ ├── desktop_button.svg │ ├── extension_button.svg │ ├── input_cancel.svg │ ├── logo_walletconnect.svg │ ├── mobile_button.svg │ ├── qr_code.svg │ ├── qr_code_button.svg │ └── web_button.svg ├── help │ ├── chart.svg │ ├── compass.svg │ ├── dao.svg │ ├── defi.svg │ ├── eth.svg │ ├── key.svg │ ├── layers.svg │ ├── lock.svg │ ├── network.svg │ ├── noun.svg │ ├── painting.svg │ ├── system.svg │ └── user.svg ├── icons │ ├── arrow_top_right.svg │ ├── checkmark.svg │ ├── chevron_left.svg │ ├── chevron_right.svg │ ├── close.svg │ ├── code.svg │ ├── coin.svg │ ├── compass.svg │ ├── copy.svg │ ├── copy_14.svg │ ├── disconnect.svg │ ├── dots.svg │ ├── extension.svg │ ├── help.svg │ ├── info.svg │ ├── mail.svg │ ├── mobile.svg │ ├── network.svg │ ├── refresh.svg │ ├── refresh_back.svg │ ├── regular │ │ └── wallet.svg │ ├── search.svg │ ├── swap_horizontal.svg │ ├── verif.svg │ ├── wallet.svg │ ├── warning.svg │ └── wc.svg ├── light │ ├── all_wallets.svg │ ├── all_wallets_button.svg │ ├── code_button.svg │ ├── desktop_button.svg │ ├── extension_button.svg │ ├── input_cancel.svg │ ├── logo_walletconnect.svg │ ├── mobile_button.svg │ ├── qr_code.svg │ ├── qr_code_button.svg │ └── web_button.svg ├── network_placeholder.svg ├── png │ ├── 2.0x │ │ ├── app_store.png │ │ ├── google_play.png │ │ └── logo_wc.png │ ├── 3.0x │ │ ├── app_store.png │ │ ├── google_play.png │ │ └── logo_wc.png │ ├── app_store.png │ ├── google_play.png │ └── logo_wc.png ├── token_placeholder.svg └── wallet_placeholder.svg ├── build.yaml ├── dartdoc_options.yaml ├── example ├── .gitignore ├── .metadata ├── README.md ├── analysis_options.yaml ├── android │ ├── .gitignore │ ├── app │ │ ├── build.gradle │ │ └── src │ │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ │ ├── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── ic_launcher-playstore.png │ │ │ ├── kotlin │ │ │ │ └── com │ │ │ │ │ └── example │ │ │ │ │ └── sign │ │ │ │ │ └── MainActivity.kt │ │ │ └── res │ │ │ │ ├── drawable-v21 │ │ │ │ └── launch_background.xml │ │ │ │ ├── drawable │ │ │ │ └── launch_background.xml │ │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ ├── ic_launcher.xml │ │ │ │ └── ic_launcher_round.xml │ │ │ │ ├── mipmap-hdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ ├── ic_launcher_foreground.webp │ │ │ │ └── ic_launcher_round.webp │ │ │ │ ├── mipmap-mdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ ├── ic_launcher_foreground.webp │ │ │ │ └── ic_launcher_round.webp │ │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ ├── ic_launcher_foreground.webp │ │ │ │ └── ic_launcher_round.webp │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ ├── ic_launcher_foreground.webp │ │ │ │ └── ic_launcher_round.webp │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ ├── ic_launcher_foreground.webp │ │ │ │ └── ic_launcher_round.webp │ │ │ │ ├── values-night │ │ │ │ └── styles.xml │ │ │ │ └── values │ │ │ │ ├── ic_launcher_background.xml │ │ │ │ └── styles.xml │ │ │ └── profile │ │ │ └── AndroidManifest.xml │ ├── build.gradle │ ├── gradle.properties │ ├── gradle │ │ └── wrapper │ │ │ └── gradle-wrapper.properties │ └── settings.gradle ├── assets │ ├── AppIcon.png │ └── abis │ │ └── testContract.abi.json ├── example.md ├── ios │ ├── .gitignore │ ├── Flutter │ │ ├── AppFrameworkInfo.plist │ │ ├── Debug.xcconfig │ │ └── Release.xcconfig │ ├── Podfile │ ├── Podfile.lock │ ├── Runner.xcodeproj │ │ ├── project.pbxproj │ │ ├── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ │ └── WorkspaceSettings.xcsettings │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ └── Runner.xcscheme │ ├── Runner.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── WorkspaceSettings.xcsettings │ ├── Runner │ │ ├── AppDelegate.swift │ │ ├── Assets.xcassets │ │ │ ├── AppIcon.appiconset │ │ │ │ ├── 100.png │ │ │ │ ├── 1024.png │ │ │ │ ├── 114.png │ │ │ │ ├── 120.png │ │ │ │ ├── 144.png │ │ │ │ ├── 152.png │ │ │ │ ├── 167.png │ │ │ │ ├── 180.png │ │ │ │ ├── 20.png │ │ │ │ ├── 29.png │ │ │ │ ├── 40.png │ │ │ │ ├── 50.png │ │ │ │ ├── 57.png │ │ │ │ ├── 58.png │ │ │ │ ├── 60.png │ │ │ │ ├── 72.png │ │ │ │ ├── 76.png │ │ │ │ ├── 80.png │ │ │ │ ├── 87.png │ │ │ │ └── Contents.json │ │ │ ├── Contents.json │ │ │ └── Logo.imageset │ │ │ │ ├── Contents.json │ │ │ │ ├── Logo@2x.png │ │ │ │ └── Logo@3x.png │ │ ├── Base.lproj │ │ │ ├── LaunchScreen.storyboard │ │ │ └── Main.storyboard │ │ ├── ExportOptionsDebug.plist │ │ ├── ExportOptionsInternal.plist │ │ ├── ExportOptionsRelease.plist │ │ ├── Info.plist │ │ ├── Runner-Bridging-Header.h │ │ └── Runner.entitlements │ └── RunnerTests │ │ └── RunnerTests.swift ├── lib │ ├── home_page.dart │ ├── main.dart │ ├── models │ │ ├── accounts.dart │ │ ├── chain_metadata.dart │ │ └── page_data.dart │ ├── utils │ │ ├── chain_data_wrapper.dart │ │ ├── constants.dart │ │ ├── crypto │ │ │ ├── eip155_service.dart │ │ │ ├── kadena_service.dart │ │ │ ├── siwe_service.dart │ │ │ ├── solana_service.dart │ │ │ └── test_data │ │ │ │ ├── aave_contract.dart │ │ │ │ ├── test_contract.dart │ │ │ │ ├── test_data.dart │ │ │ │ └── usdt_contract.dart │ │ ├── dart_defines.dart │ │ └── styles.dart │ └── widgets │ │ ├── auth_item.dart │ │ ├── chain_button.dart │ │ ├── debug_drawer.dart │ │ ├── event_widget.dart │ │ ├── logger_widget.dart │ │ ├── method_dialog.dart │ │ ├── pairing_item.dart │ │ ├── session_item.dart │ │ └── session_widget.dart ├── linux │ ├── .gitignore │ ├── CMakeLists.txt │ ├── flutter │ │ ├── CMakeLists.txt │ │ ├── generated_plugin_registrant.cc │ │ ├── generated_plugin_registrant.h │ │ └── generated_plugins.cmake │ ├── main.cc │ ├── my_application.cc │ └── my_application.h ├── macos │ ├── .gitignore │ ├── Flutter │ │ ├── Flutter-Debug.xcconfig │ │ ├── Flutter-Release.xcconfig │ │ └── GeneratedPluginRegistrant.swift │ ├── Podfile │ ├── Podfile.lock │ ├── Runner.xcodeproj │ │ ├── project.pbxproj │ │ ├── project.xcworkspace │ │ │ └── xcshareddata │ │ │ │ └── IDEWorkspaceChecks.plist │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ └── Runner.xcscheme │ ├── Runner.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ ├── Runner │ │ ├── AppDelegate.swift │ │ ├── Assets.xcassets │ │ │ └── AppIcon.appiconset │ │ │ │ ├── 1024.png │ │ │ │ ├── 128.png │ │ │ │ ├── 16.png │ │ │ │ ├── 256.png │ │ │ │ ├── 32.png │ │ │ │ ├── 512.png │ │ │ │ ├── 64.png │ │ │ │ └── Contents.json │ │ ├── Base.lproj │ │ │ └── MainMenu.xib │ │ ├── Configs │ │ │ ├── AppInfo.xcconfig │ │ │ ├── Debug.xcconfig │ │ │ ├── Release.xcconfig │ │ │ └── Warnings.xcconfig │ │ ├── DebugProfile.entitlements │ │ ├── Info.plist │ │ ├── MainFlutterWindow.swift │ │ └── Release.entitlements │ └── RunnerTests │ │ └── RunnerTests.swift ├── pubspec.lock ├── pubspec.yaml ├── test │ └── widget_test.dart ├── web │ ├── favicon.png │ ├── icons │ │ ├── Icon-192.png │ │ ├── Icon-512.png │ │ ├── Icon-maskable-192.png │ │ └── Icon-maskable-512.png │ ├── index.html │ └── manifest.json └── windows │ ├── .gitignore │ ├── CMakeLists.txt │ ├── flutter │ ├── CMakeLists.txt │ ├── generated_plugin_registrant.cc │ ├── generated_plugin_registrant.h │ └── generated_plugins.cmake │ └── runner │ ├── CMakeLists.txt │ ├── Runner.rc │ ├── flutter_window.cpp │ ├── flutter_window.h │ ├── main.cpp │ ├── resource.h │ ├── resources │ └── app_icon.ico │ ├── runner.exe.manifest │ ├── utils.cpp │ ├── utils.h │ ├── win32_window.cpp │ └── win32_window.h ├── ios ├── .gitignore ├── Flutter │ ├── AppFrameworkInfo.plist │ ├── Debug.xcconfig │ └── Release.xcconfig ├── Podfile ├── Podfile.lock ├── Runner.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── WorkspaceSettings.xcsettings │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── IDEWorkspaceChecks.plist │ │ └── WorkspaceSettings.xcsettings ├── Runner │ ├── AppDelegate.swift │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ ├── 100.png │ │ │ ├── 1024.png │ │ │ ├── 114.png │ │ │ ├── 120.png │ │ │ ├── 144.png │ │ │ ├── 152.png │ │ │ ├── 167.png │ │ │ ├── 180.png │ │ │ ├── 20.png │ │ │ ├── 29.png │ │ │ ├── 40.png │ │ │ ├── 50.png │ │ │ ├── 57.png │ │ │ ├── 58.png │ │ │ ├── 60.png │ │ │ ├── 72.png │ │ │ ├── 76.png │ │ │ ├── 80.png │ │ │ ├── 87.png │ │ │ └── Contents.json │ │ └── LaunchImage.imageset │ │ │ ├── Contents.json │ │ │ ├── LaunchImage.png │ │ │ ├── LaunchImage@2x.png │ │ │ ├── LaunchImage@3x.png │ │ │ └── README.md │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ ├── Info.plist │ └── Runner-Bridging-Header.h └── RunnerTests │ └── RunnerTests.swift ├── lib ├── constants │ ├── key_constants.dart │ ├── string_constants.dart │ └── url_constants.dart ├── models │ ├── grid_item.dart │ ├── listing.dart │ ├── w3m_chain_info.dart │ ├── w3m_chain_info.freezed.dart │ ├── w3m_wallet_info.dart │ ├── w3m_wallet_info.freezed.dart │ └── w3m_wallet_info.g.dart ├── pages │ ├── about_networks.dart │ ├── about_wallets.dart │ ├── account_page.dart │ ├── approve_magic_request_page.dart │ ├── approve_siwe.dart │ ├── confirm_email_page.dart │ ├── connect_wallet_page.dart │ ├── connet_network_page.dart │ ├── edit_email_page.dart │ ├── get_wallet_page.dart │ ├── qr_code_page.dart │ ├── select_network_page.dart │ ├── upgrade_wallet_page.dart │ ├── wallets_list_long_page.dart │ └── wallets_list_short_page.dart ├── services │ ├── analytics_service │ │ ├── analytics_service.dart │ │ ├── analytics_service_singleton.dart │ │ ├── i_analytics_service.dart │ │ └── models │ │ │ └── analytics_event.dart │ ├── blockchain_service │ │ ├── blockchain_service.dart │ │ ├── blockchain_service_singleton.dart │ │ ├── i_blockchain_service.dart │ │ └── models │ │ │ ├── blockchain_identity.dart │ │ │ ├── blockchain_identity.freezed.dart │ │ │ └── blockchain_identity.g.dart │ ├── coinbase_service │ │ ├── coinbase_service.dart │ │ ├── coinbase_service_singleton.dart │ │ ├── i_coinbase_service.dart │ │ └── models │ │ │ ├── coinbase_data.dart │ │ │ └── coinbase_events.dart │ ├── explorer_service │ │ ├── explorer_service.dart │ │ ├── explorer_service_singleton.dart │ │ ├── i_explorer_service.dart │ │ └── models │ │ │ ├── api_response.dart │ │ │ ├── native_app_data.dart │ │ │ ├── redirect.dart │ │ │ ├── request_params.dart │ │ │ └── wc_sample_wallets.dart │ ├── logger_service │ │ ├── i_logger_service.dart │ │ ├── logger_service.dart │ │ └── logger_service_singleton.dart │ ├── magic_service │ │ ├── i_magic_service.dart │ │ ├── magic_service.dart │ │ ├── magic_service_singleton.dart │ │ └── models │ │ │ ├── email_login_step.dart │ │ │ ├── frame_message.dart │ │ │ ├── magic_data.dart │ │ │ └── magic_events.dart │ ├── network_service │ │ ├── i_network_service.dart │ │ ├── network_service.dart │ │ └── network_service_singleton.dart │ ├── siwe_service │ │ ├── i_siwe_service.dart │ │ ├── models │ │ │ ├── w3m_siwe.dart │ │ │ ├── w3m_siwe.freezed.dart │ │ │ └── w3m_siwe.g.dart │ │ ├── siwe_service.dart │ │ ├── siwe_service_singleton.dart │ │ └── utils │ │ │ └── siwe_utils.dart │ ├── storage_service │ │ ├── i_storage_service.dart │ │ ├── storage_service.dart │ │ └── storage_service_singleton.dart │ └── w3m_service │ │ ├── events │ │ └── w3m_events.dart │ │ ├── i_w3m_service.dart │ │ ├── models │ │ ├── w3m_exceptions.dart │ │ └── w3m_session.dart │ │ └── w3m_service.dart ├── theme │ ├── constants.dart │ ├── w3m_colors.dart │ ├── w3m_colors.freezed.dart │ ├── w3m_radiuses.dart │ ├── w3m_radiuses.freezed.dart │ ├── w3m_text_styles.dart │ ├── w3m_text_styles.freezed.dart │ ├── w3m_theme.dart │ ├── w3m_theme_data.dart │ ├── w3m_theme_data.freezed.dart │ └── w3m_theme_widget.dart ├── utils │ ├── asset_util.dart │ ├── core │ │ ├── core_utils.dart │ │ ├── core_utils_singleton.dart │ │ └── i_core_utils.dart │ ├── debouncer.dart │ ├── platform │ │ ├── i_platform_utils.dart │ │ ├── platform_utils.dart │ │ └── platform_utils_singleton.dart │ ├── toast │ │ ├── i_toast_utils.dart │ │ ├── toast_message.dart │ │ ├── toast_utils.dart │ │ └── toast_utils_singleton.dart │ ├── url │ │ ├── i_url_utils.dart │ │ ├── launch_url_exception.dart │ │ ├── url_utils.dart │ │ └── url_utils_singleton.dart │ ├── util.dart │ ├── w3m_chains_presets.dart │ └── w3m_logger.dart ├── version.dart ├── web3modal_flutter.dart └── widgets │ ├── avatars │ ├── loading_border.dart │ ├── w3m_account_avatar.dart │ ├── w3m_account_orb.dart │ └── w3m_wallet_avatar.dart │ ├── buttons │ ├── address_button.dart │ ├── address_copy_button.dart │ ├── balance_button.dart │ ├── base_button.dart │ ├── connect_button.dart │ ├── network_button.dart │ ├── primary_button.dart │ ├── secondary_button.dart │ └── simple_icon_button.dart │ ├── help │ └── help_section.dart │ ├── icons │ ├── rounded_icon.dart │ └── themed_icon.dart │ ├── lists │ ├── grid_items │ │ ├── base_grid_item.dart │ │ └── wallet_grid_item.dart │ ├── list_items │ │ ├── account_list_item.dart │ │ ├── all_wallets_item.dart │ │ ├── base_list_item.dart │ │ ├── download_wallet_item.dart │ │ ├── wallet_connect_item.dart │ │ ├── wallet_item_chip.dart │ │ ├── wallet_list_item.dart │ │ └── wallet_list_item_simple.dart │ ├── networks_grid.dart │ ├── wallets_grid.dart │ └── wallets_list.dart │ ├── loader.dart │ ├── miscellaneous │ ├── all_wallets_header.dart │ ├── content_loading.dart │ ├── input_email.dart │ ├── responsive_container.dart │ ├── searchbar.dart │ ├── segmented_control.dart │ └── verify_otp_view.dart │ ├── navigation │ ├── navbar.dart │ └── navbar_action_button.dart │ ├── qr_code_view.dart │ ├── text │ ├── w3m_address.dart │ └── w3m_balance.dart │ ├── toast │ ├── walletconnect_modal_toast.dart │ └── walletconnect_modal_toast_manager.dart │ ├── value_listenable_builders │ ├── explorer_service_items_listener.dart │ └── network_service_items_listener.dart │ ├── w3m_account_button.dart │ ├── w3m_connect_wallet_button.dart │ ├── w3m_network_select_button.dart │ ├── web3modal.dart │ ├── web3modal_provider.dart │ └── widget_stack │ ├── i_widget_stack.dart │ ├── transition_container.dart │ ├── widget_stack.dart │ └── widget_stack_singleton.dart ├── linux ├── .gitignore ├── CMakeLists.txt ├── flutter │ ├── CMakeLists.txt │ ├── generated_plugin_registrant.cc │ ├── generated_plugin_registrant.h │ └── generated_plugins.cmake ├── main.cc ├── my_application.cc └── my_application.h ├── macos ├── .gitignore ├── Flutter │ ├── Flutter-Debug.xcconfig │ ├── Flutter-Release.xcconfig │ └── GeneratedPluginRegistrant.swift ├── Podfile ├── Runner.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── Runner │ ├── AppDelegate.swift │ ├── Assets.xcassets │ │ └── AppIcon.appiconset │ │ │ ├── 1024.png │ │ │ ├── 128.png │ │ │ ├── 16.png │ │ │ ├── 256.png │ │ │ ├── 32.png │ │ │ ├── 512.png │ │ │ ├── 64.png │ │ │ └── Contents.json │ ├── Base.lproj │ │ └── MainMenu.xib │ ├── Configs │ │ ├── AppInfo.xcconfig │ │ ├── Debug.xcconfig │ │ ├── Release.xcconfig │ │ └── Warnings.xcconfig │ ├── DebugProfile.entitlements │ ├── Info.plist │ ├── MainFlutterWindow.swift │ └── Release.entitlements └── RunnerTests │ └── RunnerTests.swift ├── pubspec.lock ├── pubspec.yaml ├── scripts ├── build.sh ├── deploy.sh ├── run.sh └── version_up.sh ├── test ├── mock_classes.dart ├── mock_classes.mocks.dart ├── test_data.dart ├── test_helpers.dart ├── w3m_account_page │ └── w3m_account_page_ui_test.dart ├── w3m_connect │ └── w3m_connect_ui_test.dart └── w3m_service │ └── w3m_service_unit_test.dart ├── web ├── favicon.png ├── icons │ ├── Icon-192.png │ ├── Icon-512.png │ ├── Icon-maskable-192.png │ └── Icon-maskable-512.png ├── index.html └── manifest.json └── windows ├── .gitignore ├── CMakeLists.txt ├── flutter ├── CMakeLists.txt ├── generated_plugin_registrant.cc ├── generated_plugin_registrant.h └── generated_plugins.cmake └── runner ├── CMakeLists.txt ├── Runner.rc ├── flutter_window.cpp ├── flutter_window.h ├── main.cpp ├── resource.h ├── resources └── app_icon.ico ├── runner.exe.manifest ├── utils.cpp ├── utils.h ├── win32_window.cpp └── win32_window.h /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Meaningful logs** 21 | Any error or information log that would help identify the issue 22 | 23 | **Reproducible code** 24 | Minimum reproducible code of the issue 25 | 26 | **Screenshots** 27 | If applicable, add screenshots to help explain your problem. 28 | 29 | **Smartphone (please complete the following information):** 30 | - Device: [e.g. iPhone6] 31 | - OS: [e.g. iOS8.1] 32 | - Web3Modal Version [e.g. 22] 33 | 34 | **Additional context** 35 | Add any other context about the problem here. 36 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.github/workflows/tag.json: -------------------------------------------------------------------------------- 1 | { 2 | "ref": "refs/tags/v1.2.3" 3 | } -------------------------------------------------------------------------------- /.github/workflows/tagalpha.json: -------------------------------------------------------------------------------- 1 | { 2 | "ref": "refs/tags/v0.0.0-alpha01" 3 | } -------------------------------------------------------------------------------- /.github/workflows/tagbeta.json: -------------------------------------------------------------------------------- 1 | { 2 | "ref": "refs/tags/v3.1.3-beta01" 3 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | migrate_working_dir/ 12 | 13 | # IntelliJ related 14 | *.iml 15 | *.ipr 16 | *.iws 17 | .idea/ 18 | 19 | # The .vscode folder contains launch configuration and tasks you configure in 20 | # VS Code which you may wish to be included in version control, so this line 21 | # is commented out by default. 22 | .vscode/ 23 | 24 | # Flutter/Dart/Pub related 25 | **/doc/api/ 26 | **/ios/Flutter/.last_build_id 27 | .dart_tool/ 28 | .flutter-plugins 29 | .flutter-plugins-dependencies 30 | .packages 31 | .pub-cache/ 32 | .pub/ 33 | /build/ 34 | 35 | # Symbolication related 36 | app.*.symbols 37 | 38 | # Obfuscation related 39 | app.*.map.json 40 | 41 | # Android Studio will place build artifacts here 42 | /android/app/debug 43 | /android/app/profile 44 | /android/app/release 45 | 46 | **/*.env* 47 | -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | 9 | # Remember to never publicly share your keystore. 10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app 11 | key.properties 12 | **/*.keystore 13 | **/*.jks 14 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/main/kotlin/com/example/web3modal_flutter/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.web3modal_flutter 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.7.10' 3 | repositories { 4 | google() 5 | mavenCentral() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:7.3.0' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | google() 17 | mavenCentral() 18 | } 19 | } 20 | 21 | rootProject.buildDir = '../build' 22 | subprojects { 23 | project.buildDir = "${rootProject.buildDir}/${project.name}" 24 | } 25 | subprojects { 26 | project.evaluationDependsOn(':app') 27 | } 28 | 29 | tasks.register("clean", Delete) { 30 | delete rootProject.buildDir 31 | } 32 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | zipStoreBase=GRADLE_USER_HOME 4 | zipStorePath=wrapper/dists 5 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip 6 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties") 4 | def properties = new Properties() 5 | 6 | assert localPropertiesFile.exists() 7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } 8 | 9 | def flutterSdkPath = properties.getProperty("flutter.sdk") 10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" 12 | -------------------------------------------------------------------------------- /assets/AppIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/assets/AppIcon.png -------------------------------------------------------------------------------- /assets/account_copy.svg: -------------------------------------------------------------------------------- 1 | 2 | 8 | -------------------------------------------------------------------------------- /assets/account_disconnect.svg: -------------------------------------------------------------------------------- 1 | 2 | 6 | 10 | -------------------------------------------------------------------------------- /assets/dark/input_cancel.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /assets/help/network.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /assets/help/noun.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /assets/icons/arrow_top_right.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/icons/checkmark.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/icons/chevron_left.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/icons/chevron_right.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/icons/close.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/icons/coin.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/icons/compass.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/icons/dots.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /assets/icons/help.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /assets/icons/info.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /assets/icons/mobile.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/icons/refresh.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/icons/refresh_back.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/icons/regular/wallet.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/icons/search.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/icons/swap_horizontal.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/icons/wallet.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/icons/warning.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /assets/icons/wc.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /assets/light/input_cancel.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /assets/png/2.0x/app_store.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/assets/png/2.0x/app_store.png -------------------------------------------------------------------------------- /assets/png/2.0x/google_play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/assets/png/2.0x/google_play.png -------------------------------------------------------------------------------- /assets/png/2.0x/logo_wc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/assets/png/2.0x/logo_wc.png -------------------------------------------------------------------------------- /assets/png/3.0x/app_store.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/assets/png/3.0x/app_store.png -------------------------------------------------------------------------------- /assets/png/3.0x/google_play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/assets/png/3.0x/google_play.png -------------------------------------------------------------------------------- /assets/png/3.0x/logo_wc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/assets/png/3.0x/logo_wc.png -------------------------------------------------------------------------------- /assets/png/app_store.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/assets/png/app_store.png -------------------------------------------------------------------------------- /assets/png/google_play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/assets/png/google_play.png -------------------------------------------------------------------------------- /assets/png/logo_wc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/assets/png/logo_wc.png -------------------------------------------------------------------------------- /assets/token_placeholder.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 20 | -------------------------------------------------------------------------------- /build.yaml: -------------------------------------------------------------------------------- 1 | targets: 2 | $default: 3 | builders: 4 | build_version: 5 | options: 6 | output: lib/version.dart 7 | freezed: 8 | generate_for: 9 | - lib/**.dart 10 | - test/**.dart 11 | json_serializable: 12 | options: 13 | explicit_to_json: true 14 | generate_for: 15 | - lib/**.dart 16 | - test/**.dart 17 | source_gen|combining_builder: 18 | options: 19 | ignore_for_file: 20 | - non_constant_identifier_names -------------------------------------------------------------------------------- /example/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | migrate_working_dir/ 12 | 13 | # IntelliJ related 14 | *.iml 15 | *.ipr 16 | *.iws 17 | .idea/ 18 | 19 | # The .vscode folder contains launch configuration and tasks you configure in 20 | # VS Code which you may wish to be included in version control, so this line 21 | # is commented out by default. 22 | .vscode/ 23 | 24 | # Flutter/Dart/Pub related 25 | **/doc/api/ 26 | **/ios/Flutter/.last_build_id 27 | .dart_tool/ 28 | .flutter-plugins 29 | .flutter-plugins-dependencies 30 | .packages 31 | .pub-cache/ 32 | .pub/ 33 | /build/ 34 | 35 | # Symbolication related 36 | app.*.symbols 37 | 38 | # Obfuscation related 39 | app.*.map.json 40 | 41 | # Android Studio will place build artifacts here 42 | /android/app/debug 43 | /android/app/profile 44 | /android/app/release 45 | 46 | # iOS 47 | *.zip 48 | *.ipa 49 | 50 | 51 | -------------------------------------------------------------------------------- /example/README.md: -------------------------------------------------------------------------------- 1 | # web3modal_flutter 2 | 3 | Example Dapp for WalletConnect AppKit package 4 | 5 | ## Documentation 6 | 7 | For a full reference please check the [Official Documentation](https://docs.walletconnect.com/appkit/flutter/core/installation) 8 | 9 | ## Run the example app 10 | 11 | `$ flutter run --dart-define=PROJECT_ID={YOUR_PROJECT_ID}` 12 | 13 | ## Useful Commands 14 | 15 | If you are cloning the whole package repo do the following inside the root folder 16 | 17 | `$ flutter pub get` to get dependencies 18 | 19 | `$ dart run build_runner build --delete-conflicting-outputs` to generate files 20 | 21 | do the same inside `example` folder 22 | -------------------------------------------------------------------------------- /example/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | # This file configures the analyzer, which statically analyzes Dart code to 2 | # check for errors, warnings, and lints. 3 | # 4 | # The issues identified by the analyzer are surfaced in the UI of Dart-enabled 5 | # IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be 6 | # invoked from the command line by running `flutter analyze`. 7 | 8 | # The following line activates a set of recommended lints for Flutter apps, 9 | # packages, and plugins designed to encourage good coding practices. 10 | include: package:flutter_lints/flutter.yaml 11 | 12 | linter: 13 | # The lint rules applied to this project can be customized in the 14 | # section below to disable rules from the `package:flutter_lints/flutter.yaml` 15 | # included above or to enable additional rules. A list of all available lints 16 | # and their documentation is published at 17 | # https://dart-lang.github.io/linter/lints/index.html. 18 | # 19 | # Instead of disabling a lint rule for the entire project in the 20 | # section below, it can also be suppressed for a single line of code 21 | # or a specific dart file by using the `// ignore: name_of_lint` and 22 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file 23 | # producing the lint. 24 | rules: 25 | # avoid_print: false # Uncomment to disable the `avoid_print` rule 26 | # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule 27 | 28 | # Additional information about this file can be found at 29 | # https://dart.dev/guides/language/analysis-options 30 | -------------------------------------------------------------------------------- /example/android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | 9 | # Remember to never publicly share your keystore. 10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app 11 | key.properties 12 | **/*.keystore 13 | **/*.jks 14 | -------------------------------------------------------------------------------- /example/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /example/android/app/src/main/ic_launcher-playstore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/example/android/app/src/main/ic_launcher-playstore.png -------------------------------------------------------------------------------- /example/android/app/src/main/kotlin/com/example/sign/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.web3modal.flutterExample 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-hdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.webp -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-mdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.webp -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /example/android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/values/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #EDF1FF 4 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /example/android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /example/android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.7.10' 3 | repositories { 4 | google() 5 | mavenCentral() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:7.3.0' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | google() 17 | mavenCentral() 18 | } 19 | } 20 | 21 | rootProject.buildDir = '../build' 22 | subprojects { 23 | project.buildDir = "${rootProject.buildDir}/${project.name}" 24 | } 25 | subprojects { 26 | project.evaluationDependsOn(':app') 27 | } 28 | 29 | tasks.register("clean", Delete) { 30 | delete rootProject.buildDir 31 | } 32 | -------------------------------------------------------------------------------- /example/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | versionName=3.3.3 5 | versionCode=74 6 | -------------------------------------------------------------------------------- /example/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | zipStoreBase=GRADLE_USER_HOME 4 | zipStorePath=wrapper/dists 5 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip 6 | -------------------------------------------------------------------------------- /example/android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties") 4 | def properties = new Properties() 5 | 6 | assert localPropertiesFile.exists() 7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } 8 | 9 | def flutterSdkPath = properties.getProperty("flutter.sdk") 10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" 12 | -------------------------------------------------------------------------------- /example/assets/AppIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/example/assets/AppIcon.png -------------------------------------------------------------------------------- /example/assets/abis/testContract.abi.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "inputs": [], 4 | "name": "retrieve", 5 | "outputs": [ 6 | { 7 | "internalType": "uint256", 8 | "name": "", 9 | "type": "uint256" 10 | } 11 | ], 12 | "stateMutability": "view", 13 | "type": "function" 14 | }, 15 | { 16 | "inputs": [ 17 | { 18 | "internalType": "uint256", 19 | "name": "num", 20 | "type": "uint256" 21 | } 22 | ], 23 | "name": "store", 24 | "outputs": [], 25 | "stateMutability": "nonpayable", 26 | "type": "function" 27 | } 28 | ] -------------------------------------------------------------------------------- /example/ios/.gitignore: -------------------------------------------------------------------------------- 1 | **/dgph 2 | *.mode1v3 3 | *.mode2v3 4 | *.moved-aside 5 | *.pbxuser 6 | *.perspectivev3 7 | **/*sync/ 8 | .sconsign.dblite 9 | .tags* 10 | **/.vagrant/ 11 | **/DerivedData/ 12 | Icon? 13 | **/Pods/ 14 | **/.symlinks/ 15 | profile 16 | xcuserdata 17 | **/.generated/ 18 | Flutter/App.framework 19 | Flutter/Flutter.framework 20 | Flutter/Flutter.podspec 21 | Flutter/Generated.xcconfig 22 | Flutter/ephemeral/ 23 | Flutter/app.flx 24 | Flutter/app.zip 25 | Flutter/flutter_assets/ 26 | Flutter/flutter_export_environment.sh 27 | ServiceDefinitions.json 28 | Runner/GeneratedPluginRegistrant.* 29 | 30 | # Exceptions to above rules. 31 | !default.mode1v3 32 | !default.mode2v3 33 | !default.pbxuser 34 | !default.perspectivev3 35 | 36 | *.zip 37 | *.ipa 38 | -------------------------------------------------------------------------------- /example/ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 12.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /example/ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /example/ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/100.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/1024.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/114.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/120.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/144.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/152.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/167.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/167.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/180.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/20.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/29.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/40.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/50.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/57.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/58.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/58.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/60.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/72.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/76.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/80.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/87.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/87.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/Logo.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "filename" : "Logo@2x.png", 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "filename" : "Logo@3x.png", 14 | "idiom" : "universal", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "author" : "xcode", 20 | "version" : 1 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/Logo.imageset/Logo@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/example/ios/Runner/Assets.xcassets/Logo.imageset/Logo@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/Logo.imageset/Logo@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/example/ios/Runner/Assets.xcassets/Logo.imageset/Logo@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/ExportOptionsDebug.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | method 6 | app-store 7 | provisioningProfiles 8 | 9 | com.web3modal.flutterExample.debug 10 | FlutterAppStoreProfileDebug 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /example/ios/Runner/ExportOptionsInternal.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | method 6 | app-store 7 | provisioningProfiles 8 | 9 | com.web3modal.flutterExample.internal 10 | FlutterAppStoreProfileInternal 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /example/ios/Runner/ExportOptionsRelease.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | method 6 | app-store 7 | provisioningProfiles 8 | 9 | com.web3modal.flutterExample 10 | FlutterAppStoreProfileWithPush 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /example/ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /example/ios/Runner/Runner.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | aps-environment 6 | development 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/ios/RunnerTests/RunnerTests.swift: -------------------------------------------------------------------------------- 1 | import Flutter 2 | import UIKit 3 | import XCTest 4 | 5 | class RunnerTests: XCTestCase { 6 | 7 | func testExample() { 8 | // If you add code to the Runner application, consider adding tests here. 9 | // See https://developer.apple.com/documentation/xctest for more information about using XCTest. 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /example/lib/models/chain_metadata.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:web3modal_flutter/web3modal_flutter.dart'; 3 | 4 | enum ChainType { 5 | eip155, 6 | solana, 7 | kadena, 8 | } 9 | 10 | class ChainMetadata { 11 | final Color color; 12 | final ChainType type; 13 | final W3MChainInfo w3mChainInfo; 14 | 15 | const ChainMetadata({ 16 | required this.color, 17 | required this.type, 18 | required this.w3mChainInfo, 19 | }); 20 | 21 | @override 22 | bool operator ==(Object other) { 23 | if (identical(this, other)) return true; 24 | 25 | return other is ChainMetadata && 26 | other.color == color && 27 | other.type == type && 28 | other.w3mChainInfo == w3mChainInfo; 29 | } 30 | 31 | @override 32 | int get hashCode { 33 | return color.hashCode ^ type.hashCode ^ w3mChainInfo.hashCode; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /example/lib/models/page_data.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class PageData { 4 | Widget page; 5 | String title; 6 | IconData icon; 7 | 8 | PageData({ 9 | required this.page, 10 | required this.title, 11 | required this.icon, 12 | }); 13 | } 14 | -------------------------------------------------------------------------------- /example/lib/utils/crypto/solana_service.dart: -------------------------------------------------------------------------------- 1 | enum SolanaMethods { 2 | solanaSignTransaction, 3 | solanaSignMessage, 4 | } 5 | 6 | enum SolanaEvents { 7 | none, 8 | } 9 | 10 | // TODO to be implement when non-EVM chain support is added. 11 | class SolanaData { 12 | static final Map methods = { 13 | SolanaMethods.solanaSignTransaction: 'solana_signTransaction', 14 | SolanaMethods.solanaSignMessage: 'solana_signMessage' 15 | }; 16 | 17 | static final Map events = {}; 18 | } 19 | -------------------------------------------------------------------------------- /example/lib/utils/dart_defines.dart: -------------------------------------------------------------------------------- 1 | class DartDefines { 2 | static const String projectId = String.fromEnvironment( 3 | 'PROJECT_ID', 4 | ); 5 | static const String appKitAuth = String.fromEnvironment( 6 | 'APPKIT_AUTH', 7 | ); 8 | static const String appKitProjectId = String.fromEnvironment( 9 | 'APPKIT_PROJECT_ID', 10 | ); 11 | static const String authApiUrl = String.fromEnvironment( 12 | 'AUTH_SERVICE_URL', 13 | ); 14 | } 15 | -------------------------------------------------------------------------------- /example/lib/widgets/auth_item.dart: -------------------------------------------------------------------------------- 1 | // import 'package:flutter/material.dart'; 2 | // import 'package:web3modal_flutter/web3modal_flutter.dart'; 3 | 4 | // class AuthItem extends StatelessWidget { 5 | // const AuthItem({ 6 | // required Key key, 7 | // required this.auth, 8 | // required this.onTap, 9 | // }) : super(key: key); 10 | 11 | // final StoredCacao auth; 12 | // final void Function() onTap; 13 | 14 | // @override 15 | // Widget build(BuildContext context) { 16 | // return ListTile( 17 | // title: Text(auth.p.domain), 18 | // subtitle: Text(auth.p.iss), 19 | // onTap: onTap, 20 | // ); 21 | // } 22 | // } 23 | -------------------------------------------------------------------------------- /example/lib/widgets/event_widget.dart: -------------------------------------------------------------------------------- 1 | // import 'package:flutter/material.dart'; 2 | // import 'package:walletconnect_flutter_dapp/utils/constants.dart'; 3 | // import 'package:walletconnect_flutter_dapp/utils/string_constants.dart'; 4 | 5 | // class EventWidget extends StatelessWidget { 6 | // const EventWidget({ 7 | // super.key, 8 | // required this.title, 9 | // required this.content, 10 | // }); 11 | 12 | // final String title; 13 | // final String content; 14 | 15 | // @override 16 | // Widget build(BuildContext context) { 17 | // return AlertDialog( 18 | // title: Text( 19 | // title, 20 | // style: StyleConstants.titleText, 21 | // ), 22 | // content: Text(content), 23 | // actions: [ 24 | // TextButton( 25 | // child: const Text( 26 | // StringConstants.ok, 27 | // ), 28 | // onPressed: () { 29 | // Navigator.of(context).pop(); 30 | // }, 31 | // ), 32 | // ], 33 | // ); 34 | // } 35 | // } 36 | -------------------------------------------------------------------------------- /example/lib/widgets/pairing_item.dart: -------------------------------------------------------------------------------- 1 | // import 'package:flutter/material.dart'; 2 | // import 'package:web3modal_flutter/web3modal_flutter.dart'; 3 | 4 | // class PairingItem extends StatelessWidget { 5 | // const PairingItem({ 6 | // required Key key, 7 | // required this.pairing, 8 | // required this.onTap, 9 | // }) : super(key: key); 10 | 11 | // final PairingInfo pairing; 12 | // final void Function() onTap; 13 | 14 | // @override 15 | // Widget build(BuildContext context) { 16 | // return ListTile( 17 | // title: Text(pairing.peerMetadata?.name ?? 'Unknown'), 18 | // subtitle: Text(pairing.peerMetadata?.url ?? 'Unknown'), 19 | // onTap: onTap, 20 | // ); 21 | // } 22 | // } 23 | -------------------------------------------------------------------------------- /example/lib/widgets/session_item.dart: -------------------------------------------------------------------------------- 1 | // import 'package:flutter/material.dart'; 2 | // import 'package:web3modal_flutter/web3modal_flutter.dart'; 3 | 4 | // class SessionItem extends StatelessWidget { 5 | // const SessionItem({ 6 | // required Key key, 7 | // required this.session, 8 | // required this.onTap, 9 | // }) : super(key: key); 10 | 11 | // final SessionData session; 12 | // final void Function() onTap; 13 | 14 | // @override 15 | // Widget build(BuildContext context) { 16 | // return ListTile( 17 | // title: Text(session.peer.metadata.name), 18 | // subtitle: Text(session.peer.metadata.url), 19 | // onTap: onTap, 20 | // ); 21 | // } 22 | // } 23 | -------------------------------------------------------------------------------- /example/linux/.gitignore: -------------------------------------------------------------------------------- 1 | flutter/ephemeral 2 | -------------------------------------------------------------------------------- /example/linux/flutter/generated_plugin_registrant.cc: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #include "generated_plugin_registrant.h" 8 | 9 | #include 10 | 11 | void fl_register_plugins(FlPluginRegistry* registry) { 12 | g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar = 13 | fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin"); 14 | url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar); 15 | } 16 | -------------------------------------------------------------------------------- /example/linux/flutter/generated_plugin_registrant.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #ifndef GENERATED_PLUGIN_REGISTRANT_ 8 | #define GENERATED_PLUGIN_REGISTRANT_ 9 | 10 | #include 11 | 12 | // Registers Flutter plugins. 13 | void fl_register_plugins(FlPluginRegistry* registry); 14 | 15 | #endif // GENERATED_PLUGIN_REGISTRANT_ 16 | -------------------------------------------------------------------------------- /example/linux/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | url_launcher_linux 7 | ) 8 | 9 | list(APPEND FLUTTER_FFI_PLUGIN_LIST 10 | ) 11 | 12 | set(PLUGIN_BUNDLED_LIBRARIES) 13 | 14 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 15 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin}) 16 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 17 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 18 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 19 | endforeach(plugin) 20 | 21 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) 22 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin}) 23 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) 24 | endforeach(ffi_plugin) 25 | -------------------------------------------------------------------------------- /example/linux/main.cc: -------------------------------------------------------------------------------- 1 | #include "my_application.h" 2 | 3 | int main(int argc, char** argv) { 4 | g_autoptr(MyApplication) app = my_application_new(); 5 | return g_application_run(G_APPLICATION(app), argc, argv); 6 | } 7 | -------------------------------------------------------------------------------- /example/linux/my_application.h: -------------------------------------------------------------------------------- 1 | #ifndef FLUTTER_MY_APPLICATION_H_ 2 | #define FLUTTER_MY_APPLICATION_H_ 3 | 4 | #include 5 | 6 | G_DECLARE_FINAL_TYPE(MyApplication, my_application, MY, APPLICATION, 7 | GtkApplication) 8 | 9 | /** 10 | * my_application_new: 11 | * 12 | * Creates a new Flutter-based application. 13 | * 14 | * Returns: a new #MyApplication. 15 | */ 16 | MyApplication* my_application_new(); 17 | 18 | #endif // FLUTTER_MY_APPLICATION_H_ 19 | -------------------------------------------------------------------------------- /example/macos/.gitignore: -------------------------------------------------------------------------------- 1 | # Flutter-related 2 | **/Flutter/ephemeral/ 3 | **/Pods/ 4 | 5 | # Xcode-related 6 | **/dgph 7 | **/xcuserdata/ 8 | -------------------------------------------------------------------------------- /example/macos/Flutter/Flutter-Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "ephemeral/Flutter-Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /example/macos/Flutter/Flutter-Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "ephemeral/Flutter-Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /example/macos/Flutter/GeneratedPluginRegistrant.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | import FlutterMacOS 6 | import Foundation 7 | 8 | import connectivity_plus 9 | import package_info_plus 10 | import path_provider_foundation 11 | import shared_preferences_foundation 12 | import sqflite 13 | import url_launcher_macos 14 | 15 | func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { 16 | ConnectivityPlusPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlusPlugin")) 17 | FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin")) 18 | PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) 19 | SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin")) 20 | SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin")) 21 | UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin")) 22 | } 23 | -------------------------------------------------------------------------------- /example/macos/Podfile: -------------------------------------------------------------------------------- 1 | platform :osx, '10.14' 2 | 3 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency. 4 | ENV['COCOAPODS_DISABLE_STATS'] = 'true' 5 | 6 | project 'Runner', { 7 | 'Debug' => :debug, 8 | 'Profile' => :release, 9 | 'Release' => :release, 10 | } 11 | 12 | def flutter_root 13 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'ephemeral', 'Flutter-Generated.xcconfig'), __FILE__) 14 | unless File.exist?(generated_xcode_build_settings_path) 15 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure \"flutter pub get\" is executed first" 16 | end 17 | 18 | File.foreach(generated_xcode_build_settings_path) do |line| 19 | matches = line.match(/FLUTTER_ROOT\=(.*)/) 20 | return matches[1].strip if matches 21 | end 22 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Flutter-Generated.xcconfig, then run \"flutter pub get\"" 23 | end 24 | 25 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) 26 | 27 | flutter_macos_podfile_setup 28 | 29 | target 'Runner' do 30 | use_frameworks! 31 | use_modular_headers! 32 | 33 | flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__)) 34 | target 'RunnerTests' do 35 | inherit! :search_paths 36 | end 37 | end 38 | 39 | post_install do |installer| 40 | installer.pods_project.targets.each do |target| 41 | flutter_additional_macos_build_settings(target) 42 | end 43 | end 44 | -------------------------------------------------------------------------------- /example/macos/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - FlutterMacOS (1.0.0) 3 | - shared_preferences_foundation (0.0.1): 4 | - Flutter 5 | - FlutterMacOS 6 | - url_launcher_macos (0.0.1): 7 | - FlutterMacOS 8 | 9 | DEPENDENCIES: 10 | - FlutterMacOS (from `Flutter/ephemeral`) 11 | - shared_preferences_foundation (from `Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin`) 12 | - url_launcher_macos (from `Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos`) 13 | 14 | EXTERNAL SOURCES: 15 | FlutterMacOS: 16 | :path: Flutter/ephemeral 17 | shared_preferences_foundation: 18 | :path: Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin 19 | url_launcher_macos: 20 | :path: Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos 21 | 22 | SPEC CHECKSUMS: 23 | FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24 24 | shared_preferences_foundation: e2dae3258e06f44cc55f49d42024fd8dd03c590c 25 | url_launcher_macos: 5335912b679c073563f29d89d33d10d459f95451 26 | 27 | PODFILE CHECKSUM: 236401fc2c932af29a9fcf0e97baeeb2d750d367 28 | 29 | COCOAPODS: 1.11.3 30 | -------------------------------------------------------------------------------- /example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/macos/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/macos/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | 4 | @NSApplicationMain 5 | class AppDelegate: FlutterAppDelegate { 6 | override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { 7 | return true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /example/macos/Runner/Assets.xcassets/AppIcon.appiconset/1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/1024.png -------------------------------------------------------------------------------- /example/macos/Runner/Assets.xcassets/AppIcon.appiconset/128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/128.png -------------------------------------------------------------------------------- /example/macos/Runner/Assets.xcassets/AppIcon.appiconset/16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/16.png -------------------------------------------------------------------------------- /example/macos/Runner/Assets.xcassets/AppIcon.appiconset/256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/256.png -------------------------------------------------------------------------------- /example/macos/Runner/Assets.xcassets/AppIcon.appiconset/32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/32.png -------------------------------------------------------------------------------- /example/macos/Runner/Assets.xcassets/AppIcon.appiconset/512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/512.png -------------------------------------------------------------------------------- /example/macos/Runner/Assets.xcassets/AppIcon.appiconset/64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/64.png -------------------------------------------------------------------------------- /example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | {"images":[{"size":"128x128","expected-size":"128","filename":"128.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"mac","scale":"1x"},{"size":"256x256","expected-size":"256","filename":"256.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"mac","scale":"1x"},{"size":"128x128","expected-size":"256","filename":"256.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"mac","scale":"2x"},{"size":"256x256","expected-size":"512","filename":"512.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"mac","scale":"2x"},{"size":"32x32","expected-size":"32","filename":"32.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"mac","scale":"1x"},{"size":"512x512","expected-size":"512","filename":"512.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"mac","scale":"1x"},{"size":"16x16","expected-size":"16","filename":"16.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"mac","scale":"1x"},{"size":"16x16","expected-size":"32","filename":"32.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"mac","scale":"2x"},{"size":"32x32","expected-size":"64","filename":"64.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"mac","scale":"2x"},{"size":"512x512","expected-size":"1024","filename":"1024.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"mac","scale":"2x"}]} -------------------------------------------------------------------------------- /example/macos/Runner/Configs/AppInfo.xcconfig: -------------------------------------------------------------------------------- 1 | // Application-level settings for the Runner target. 2 | // 3 | // This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the 4 | // future. If not, the values below would default to using the project name when this becomes a 5 | // 'flutter create' template. 6 | 7 | // The application's name. By default this is also the title of the Flutter window. 8 | PRODUCT_NAME = WC Flutter dApp 9 | 10 | // The application's bundle identifier 11 | PRODUCT_BUNDLE_IDENTIFIER = com.web3modal.flutterExample 12 | 13 | // The copyright displayed in application information 14 | PRODUCT_COPYRIGHT = Copyright © 2023 com.example. All rights reserved. 15 | -------------------------------------------------------------------------------- /example/macos/Runner/Configs/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Debug.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /example/macos/Runner/Configs/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Release.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /example/macos/Runner/Configs/Warnings.xcconfig: -------------------------------------------------------------------------------- 1 | WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings 2 | GCC_WARN_UNDECLARED_SELECTOR = YES 3 | CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES 4 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE 5 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES 6 | CLANG_WARN_PRAGMA_PACK = YES 7 | CLANG_WARN_STRICT_PROTOTYPES = YES 8 | CLANG_WARN_COMMA = YES 9 | GCC_WARN_STRICT_SELECTOR_MATCH = YES 10 | CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES 11 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES 12 | GCC_WARN_SHADOW = YES 13 | CLANG_WARN_UNREACHABLE_CODE = YES 14 | -------------------------------------------------------------------------------- /example/macos/Runner/DebugProfile.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.cs.allow-jit 8 | 9 | com.apple.security.network.server 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /example/macos/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(FLUTTER_BUILD_NAME) 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSMinimumSystemVersion 24 | $(MACOSX_DEPLOYMENT_TARGET) 25 | NSHumanReadableCopyright 26 | $(PRODUCT_COPYRIGHT) 27 | NSMainNibFile 28 | MainMenu 29 | NSPrincipalClass 30 | NSApplication 31 | 32 | 33 | -------------------------------------------------------------------------------- /example/macos/Runner/MainFlutterWindow.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | 4 | class MainFlutterWindow: NSWindow { 5 | override func awakeFromNib() { 6 | let flutterViewController = FlutterViewController() 7 | let windowFrame = self.frame 8 | self.contentViewController = flutterViewController 9 | self.setFrame(windowFrame, display: true) 10 | 11 | RegisterGeneratedPlugins(registry: flutterViewController) 12 | 13 | super.awakeFromNib() 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /example/macos/Runner/Release.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/macos/RunnerTests/RunnerTests.swift: -------------------------------------------------------------------------------- 1 | import FlutterMacOS 2 | import Cocoa 3 | import XCTest 4 | 5 | class RunnerTests: XCTestCase { 6 | 7 | func testExample() { 8 | // If you add code to the Runner application, consider adding tests here. 9 | // See https://developer.apple.com/documentation/xctest for more information about using XCTest. 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /example/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: walletconnect_flutter_dapp 2 | description: A dApp showing how to use WalletConnect v2 with Flutter 3 | 4 | publish_to: "none" 5 | 6 | version: 3.3.3 7 | 8 | environment: 9 | sdk: ">=3.0.1 <4.0.0" 10 | 11 | dependencies: 12 | flutter: 13 | sdk: flutter 14 | cupertino_icons: ^1.0.2 15 | fl_toast: ^3.1.0 16 | shared_preferences: ^2.2.0 17 | intl: ^0.19.0 18 | package_info_plus: ^7.0.0 19 | web3modal_flutter: 20 | path: ../ 21 | 22 | dev_dependencies: 23 | flutter_test: 24 | sdk: flutter 25 | 26 | flutter_lints: ^3.0.1 27 | build_runner: ^2.4.7 28 | json_serializable: ^6.7.0 29 | flutter_launcher_icons: "^0.13.1" 30 | 31 | flutter: 32 | uses-material-design: true 33 | 34 | assets: 35 | - assets/abis/ 36 | 37 | flutter_launcher_icons: 38 | android: true 39 | ios: true 40 | image_path: "assets/AppIcon.png" 41 | -------------------------------------------------------------------------------- /example/test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter widget test. 2 | // 3 | // To perform an interaction with a widget in your test, use the WidgetTester 4 | // utility in the flutter_test package. For example, you can send tap and scroll 5 | // gestures. You can also use WidgetTester to find child widgets in the widget 6 | // tree, read text, and verify that the values of widget properties are correct. 7 | 8 | import 'package:flutter_test/flutter_test.dart'; 9 | 10 | void main() { 11 | testWidgets('Counter increments smoke test', (WidgetTester tester) async {}); 12 | } 13 | -------------------------------------------------------------------------------- /example/web/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/example/web/favicon.png -------------------------------------------------------------------------------- /example/web/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/example/web/icons/Icon-192.png -------------------------------------------------------------------------------- /example/web/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/example/web/icons/Icon-512.png -------------------------------------------------------------------------------- /example/web/icons/Icon-maskable-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/example/web/icons/Icon-maskable-192.png -------------------------------------------------------------------------------- /example/web/icons/Icon-maskable-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/example/web/icons/Icon-maskable-512.png -------------------------------------------------------------------------------- /example/web/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "walletconnect_flutter_dapp", 3 | "short_name": "walletconnect_flutter_dapp", 4 | "start_url": ".", 5 | "display": "standalone", 6 | "background_color": "#0175C2", 7 | "theme_color": "#0175C2", 8 | "description": "A new Flutter project.", 9 | "orientation": "portrait-primary", 10 | "prefer_related_applications": false, 11 | "icons": [ 12 | { 13 | "src": "icons/Icon-192.png", 14 | "sizes": "192x192", 15 | "type": "image/png" 16 | }, 17 | { 18 | "src": "icons/Icon-512.png", 19 | "sizes": "512x512", 20 | "type": "image/png" 21 | }, 22 | { 23 | "src": "icons/Icon-maskable-192.png", 24 | "sizes": "192x192", 25 | "type": "image/png", 26 | "purpose": "maskable" 27 | }, 28 | { 29 | "src": "icons/Icon-maskable-512.png", 30 | "sizes": "512x512", 31 | "type": "image/png", 32 | "purpose": "maskable" 33 | } 34 | ] 35 | } 36 | -------------------------------------------------------------------------------- /example/windows/.gitignore: -------------------------------------------------------------------------------- 1 | flutter/ephemeral/ 2 | 3 | # Visual Studio user-specific files. 4 | *.suo 5 | *.user 6 | *.userosscache 7 | *.sln.docstates 8 | 9 | # Visual Studio build-related files. 10 | x64/ 11 | x86/ 12 | 13 | # Visual Studio cache files 14 | # files ending in .cache can be ignored 15 | *.[Cc]ache 16 | # but keep track of directories ending in .cache 17 | !*.[Cc]ache/ 18 | -------------------------------------------------------------------------------- /example/windows/flutter/generated_plugin_registrant.cc: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #include "generated_plugin_registrant.h" 8 | 9 | #include 10 | #include 11 | 12 | void RegisterPlugins(flutter::PluginRegistry* registry) { 13 | ConnectivityPlusWindowsPluginRegisterWithRegistrar( 14 | registry->GetRegistrarForPlugin("ConnectivityPlusWindowsPlugin")); 15 | UrlLauncherWindowsRegisterWithRegistrar( 16 | registry->GetRegistrarForPlugin("UrlLauncherWindows")); 17 | } 18 | -------------------------------------------------------------------------------- /example/windows/flutter/generated_plugin_registrant.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #ifndef GENERATED_PLUGIN_REGISTRANT_ 8 | #define GENERATED_PLUGIN_REGISTRANT_ 9 | 10 | #include 11 | 12 | // Registers Flutter plugins. 13 | void RegisterPlugins(flutter::PluginRegistry* registry); 14 | 15 | #endif // GENERATED_PLUGIN_REGISTRANT_ 16 | -------------------------------------------------------------------------------- /example/windows/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | connectivity_plus 7 | url_launcher_windows 8 | ) 9 | 10 | list(APPEND FLUTTER_FFI_PLUGIN_LIST 11 | ) 12 | 13 | set(PLUGIN_BUNDLED_LIBRARIES) 14 | 15 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 16 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin}) 17 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 18 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 19 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 20 | endforeach(plugin) 21 | 22 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) 23 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin}) 24 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) 25 | endforeach(ffi_plugin) 26 | -------------------------------------------------------------------------------- /example/windows/runner/flutter_window.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_FLUTTER_WINDOW_H_ 2 | #define RUNNER_FLUTTER_WINDOW_H_ 3 | 4 | #include 5 | #include 6 | 7 | #include 8 | 9 | #include "win32_window.h" 10 | 11 | // A window that does nothing but host a Flutter view. 12 | class FlutterWindow : public Win32Window { 13 | public: 14 | // Creates a new FlutterWindow hosting a Flutter view running |project|. 15 | explicit FlutterWindow(const flutter::DartProject& project); 16 | virtual ~FlutterWindow(); 17 | 18 | protected: 19 | // Win32Window: 20 | bool OnCreate() override; 21 | void OnDestroy() override; 22 | LRESULT MessageHandler(HWND window, UINT const message, WPARAM const wparam, 23 | LPARAM const lparam) noexcept override; 24 | 25 | private: 26 | // The project to run. 27 | flutter::DartProject project_; 28 | 29 | // The Flutter instance hosted by this window. 30 | std::unique_ptr flutter_controller_; 31 | }; 32 | 33 | #endif // RUNNER_FLUTTER_WINDOW_H_ 34 | -------------------------------------------------------------------------------- /example/windows/runner/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include "flutter_window.h" 6 | #include "utils.h" 7 | 8 | int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev, 9 | _In_ wchar_t *command_line, _In_ int show_command) { 10 | // Attach to console when present (e.g., 'flutter run') or create a 11 | // new console when running with a debugger. 12 | if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) { 13 | CreateAndAttachConsole(); 14 | } 15 | 16 | // Initialize COM, so that it is available for use in the library and/or 17 | // plugins. 18 | ::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED); 19 | 20 | flutter::DartProject project(L"data"); 21 | 22 | std::vector command_line_arguments = 23 | GetCommandLineArguments(); 24 | 25 | project.set_dart_entrypoint_arguments(std::move(command_line_arguments)); 26 | 27 | FlutterWindow window(project); 28 | Win32Window::Point origin(10, 10); 29 | Win32Window::Size size(1280, 720); 30 | if (!window.Create(L"walletconnect_flutter_dapp", origin, size)) { 31 | return EXIT_FAILURE; 32 | } 33 | window.SetQuitOnClose(true); 34 | 35 | ::MSG msg; 36 | while (::GetMessage(&msg, nullptr, 0, 0)) { 37 | ::TranslateMessage(&msg); 38 | ::DispatchMessage(&msg); 39 | } 40 | 41 | ::CoUninitialize(); 42 | return EXIT_SUCCESS; 43 | } 44 | -------------------------------------------------------------------------------- /example/windows/runner/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by Runner.rc 4 | // 5 | #define IDI_APP_ICON 101 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 102 12 | #define _APS_NEXT_COMMAND_VALUE 40001 13 | #define _APS_NEXT_CONTROL_VALUE 1001 14 | #define _APS_NEXT_SYMED_VALUE 101 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /example/windows/runner/resources/app_icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/example/windows/runner/resources/app_icon.ico -------------------------------------------------------------------------------- /example/windows/runner/runner.exe.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PerMonitorV2 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /example/windows/runner/utils.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_UTILS_H_ 2 | #define RUNNER_UTILS_H_ 3 | 4 | #include 5 | #include 6 | 7 | // Creates a console for the process, and redirects stdout and stderr to 8 | // it for both the runner and the Flutter library. 9 | void CreateAndAttachConsole(); 10 | 11 | // Takes a null-terminated wchar_t* encoded in UTF-16 and returns a std::string 12 | // encoded in UTF-8. Returns an empty std::string on failure. 13 | std::string Utf8FromUtf16(const wchar_t* utf16_string); 14 | 15 | // Gets the command line arguments passed in as a std::vector, 16 | // encoded in UTF-8. Returns an empty std::vector on failure. 17 | std::vector GetCommandLineArguments(); 18 | 19 | #endif // RUNNER_UTILS_H_ 20 | -------------------------------------------------------------------------------- /ios/.gitignore: -------------------------------------------------------------------------------- 1 | **/dgph 2 | *.mode1v3 3 | *.mode2v3 4 | *.moved-aside 5 | *.pbxuser 6 | *.perspectivev3 7 | **/*sync/ 8 | .sconsign.dblite 9 | .tags* 10 | **/.vagrant/ 11 | **/DerivedData/ 12 | Icon? 13 | **/Pods/ 14 | **/.symlinks/ 15 | profile 16 | xcuserdata 17 | **/.generated/ 18 | Flutter/App.framework 19 | Flutter/Flutter.framework 20 | Flutter/Flutter.podspec 21 | Flutter/Generated.xcconfig 22 | Flutter/ephemeral/ 23 | Flutter/app.flx 24 | Flutter/app.zip 25 | Flutter/flutter_assets/ 26 | Flutter/flutter_export_environment.sh 27 | ServiceDefinitions.json 28 | Runner/GeneratedPluginRegistrant.* 29 | 30 | # Exceptions to above rules. 31 | !default.mode1v3 32 | !default.mode2v3 33 | !default.pbxuser 34 | !default.perspectivev3 35 | -------------------------------------------------------------------------------- /ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 11.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /ios/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment this line to define a global platform for your project 2 | platform :ios, '13.0' 3 | 4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency. 5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true' 6 | 7 | project 'Runner', { 8 | 'Debug' => :debug, 9 | 'Profile' => :release, 10 | 'Release' => :release, 11 | } 12 | 13 | def flutter_root 14 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) 15 | unless File.exist?(generated_xcode_build_settings_path) 16 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" 17 | end 18 | 19 | File.foreach(generated_xcode_build_settings_path) do |line| 20 | matches = line.match(/FLUTTER_ROOT\=(.*)/) 21 | return matches[1].strip if matches 22 | end 23 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" 24 | end 25 | 26 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) 27 | 28 | flutter_ios_podfile_setup 29 | 30 | target 'Runner' do 31 | use_frameworks! 32 | use_modular_headers! 33 | 34 | flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) 35 | target 'RunnerTests' do 36 | inherit! :search_paths 37 | end 38 | end 39 | 40 | post_install do |installer| 41 | installer.pods_project.targets.each do |target| 42 | flutter_additional_ios_build_settings(target) 43 | end 44 | end 45 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | import CoinbaseWalletSDK 4 | 5 | @UIApplicationMain 6 | @objc class AppDelegate: FlutterAppDelegate { 7 | override func application( 8 | _ application: UIApplication, 9 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 10 | ) -> Bool { 11 | GeneratedPluginRegistrant.register(with: self) 12 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/ios/Runner/Assets.xcassets/AppIcon.appiconset/100.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/ios/Runner/Assets.xcassets/AppIcon.appiconset/1024.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/ios/Runner/Assets.xcassets/AppIcon.appiconset/114.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/ios/Runner/Assets.xcassets/AppIcon.appiconset/120.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/ios/Runner/Assets.xcassets/AppIcon.appiconset/144.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/ios/Runner/Assets.xcassets/AppIcon.appiconset/152.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/167.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/ios/Runner/Assets.xcassets/AppIcon.appiconset/167.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/ios/Runner/Assets.xcassets/AppIcon.appiconset/180.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/ios/Runner/Assets.xcassets/AppIcon.appiconset/20.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/ios/Runner/Assets.xcassets/AppIcon.appiconset/29.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/ios/Runner/Assets.xcassets/AppIcon.appiconset/40.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/ios/Runner/Assets.xcassets/AppIcon.appiconset/50.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/ios/Runner/Assets.xcassets/AppIcon.appiconset/57.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/58.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/ios/Runner/Assets.xcassets/AppIcon.appiconset/58.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/ios/Runner/Assets.xcassets/AppIcon.appiconset/60.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/ios/Runner/Assets.xcassets/AppIcon.appiconset/72.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/ios/Runner/Assets.xcassets/AppIcon.appiconset/76.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/ios/Runner/Assets.xcassets/AppIcon.appiconset/80.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/87.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/ios/Runner/Assets.xcassets/AppIcon.appiconset/87.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /ios/RunnerTests/RunnerTests.swift: -------------------------------------------------------------------------------- 1 | import Flutter 2 | import UIKit 3 | import XCTest 4 | 5 | class RunnerTests: XCTestCase { 6 | 7 | func testExample() { 8 | // If you add code to the Runner application, consider adding tests here. 9 | // See https://developer.apple.com/documentation/xctest for more information about using XCTest. 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /lib/constants/url_constants.dart: -------------------------------------------------------------------------------- 1 | class UrlConstants { 2 | static const String apiService = 'https://api.web3modal.org'; 3 | static const String blockChainService = 'https://rpc.walletconnect.org'; 4 | static const String analyticsService = 'https://pulse.walletconnect.org'; 5 | static const String cloudService = 'https://cloud.walletconnect.com'; 6 | static const String exploreWallets = 7 | 'https://explorer.walletconnect.com/?type=wallet'; 8 | static const String secureService = 9 | 'https://secure-mobile.walletconnect.com/mobile-sdk'; 10 | 11 | // 12 | static const String secureDashboard = 13 | 'https://secure.walletconnect.com/dashboard'; 14 | static const String learnMoreUrl = 15 | 'https://ethereum.org/en/developers/docs/networks'; 16 | static const String docsUrl = 'https://docs.walletconnect.com'; 17 | } 18 | -------------------------------------------------------------------------------- /lib/models/grid_item.dart: -------------------------------------------------------------------------------- 1 | class GridItem { 2 | final String image; 3 | final String id; 4 | final String title; 5 | final bool disabled; 6 | final T data; 7 | 8 | GridItem({ 9 | required this.image, 10 | required this.id, 11 | required this.title, 12 | required this.data, 13 | this.disabled = false, 14 | }); 15 | 16 | GridItem copyWith({ 17 | String? image, 18 | String? id, 19 | String? title, 20 | bool? disabled, 21 | T? data, 22 | }) { 23 | return GridItem( 24 | image: image ?? this.image, 25 | id: id ?? this.id, 26 | title: title ?? this.title, 27 | disabled: disabled ?? this.disabled, 28 | data: data ?? this.data, 29 | ); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /lib/models/w3m_wallet_info.dart: -------------------------------------------------------------------------------- 1 | import 'package:freezed_annotation/freezed_annotation.dart'; 2 | import 'package:web3modal_flutter/models/listing.dart'; 3 | 4 | part 'w3m_wallet_info.freezed.dart'; 5 | part 'w3m_wallet_info.g.dart'; 6 | 7 | @freezed 8 | class W3MWalletInfo with _$W3MWalletInfo { 9 | const factory W3MWalletInfo({ 10 | required Listing listing, 11 | required bool installed, 12 | required bool recent, 13 | }) = _W3MWalletInfo; 14 | 15 | factory W3MWalletInfo.fromJson(Map json) => 16 | _$W3MWalletInfoFromJson(json); 17 | } 18 | 19 | extension W3MWalletInfoExtension on W3MWalletInfo { 20 | bool get isCoinbase => 21 | listing.id == 22 | 'fd20dc426fb37566d803205b19bbc1d4096b248ac04548e3cfb6b3a38bd033aa'; 23 | } 24 | -------------------------------------------------------------------------------- /lib/models/w3m_wallet_info.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | // ignore_for_file: non_constant_identifier_names 4 | 5 | part of 'w3m_wallet_info.dart'; 6 | 7 | // ************************************************************************** 8 | // JsonSerializableGenerator 9 | // ************************************************************************** 10 | 11 | _$W3MWalletInfoImpl _$$W3MWalletInfoImplFromJson(Map json) => 12 | _$W3MWalletInfoImpl( 13 | listing: Listing.fromJson(json['listing']), 14 | installed: json['installed'] as bool, 15 | recent: json['recent'] as bool, 16 | ); 17 | 18 | Map _$$W3MWalletInfoImplToJson(_$W3MWalletInfoImpl instance) => 19 | { 20 | 'listing': instance.listing.toJson(), 21 | 'installed': instance.installed, 22 | 'recent': instance.recent, 23 | }; 24 | -------------------------------------------------------------------------------- /lib/pages/approve_magic_request_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:web3modal_flutter/constants/key_constants.dart'; 3 | import 'package:web3modal_flutter/services/magic_service/magic_service_singleton.dart'; 4 | import 'package:web3modal_flutter/widgets/miscellaneous/responsive_container.dart'; 5 | import 'package:web3modal_flutter/widgets/navigation/navbar.dart'; 6 | 7 | class ApproveTransactionPage extends StatefulWidget { 8 | const ApproveTransactionPage() 9 | : super(key: KeyConstants.approveTransactionPage); 10 | 11 | @override 12 | State createState() => _ApproveTransactionPageState(); 13 | } 14 | 15 | class _ApproveTransactionPageState extends State { 16 | @override 17 | Widget build(BuildContext context) { 18 | magicService.instance.controller.runJavaScript( 19 | 'document.body.style.zoom = "1%"', 20 | ); 21 | return Web3ModalNavbar( 22 | title: 'Approve Transaction', 23 | noClose: true, 24 | safeAreaLeft: true, 25 | safeAreaRight: true, 26 | body: ConstrainedBox( 27 | constraints: BoxConstraints( 28 | maxHeight: ResponsiveData.maxHeightOf(context), 29 | ), 30 | child: magicService.instance.webview, 31 | ), 32 | ); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /lib/services/analytics_service/analytics_service_singleton.dart: -------------------------------------------------------------------------------- 1 | import 'package:web3modal_flutter/services/analytics_service/i_analytics_service.dart'; 2 | 3 | class AnalyticsServiceSingleton { 4 | late IAnalyticsService instance; 5 | } 6 | 7 | final analyticsService = AnalyticsServiceSingleton(); 8 | -------------------------------------------------------------------------------- /lib/services/analytics_service/i_analytics_service.dart: -------------------------------------------------------------------------------- 1 | import 'package:web3modal_flutter/services/analytics_service/models/analytics_event.dart'; 2 | 3 | abstract class IAnalyticsService { 4 | String get projectId; 5 | bool? get enableAnalytics; 6 | Stream get events; 7 | Future init(); 8 | void sendEvent(AnalyticsEvent analyticsEvent); 9 | Future fetchAnalyticsConfig(); 10 | } 11 | -------------------------------------------------------------------------------- /lib/services/blockchain_service/blockchain_service_singleton.dart: -------------------------------------------------------------------------------- 1 | import 'package:web3modal_flutter/services/blockchain_service/i_blockchain_service.dart'; 2 | 3 | class BlockChainServiceSingleton { 4 | late IBlockChainService instance; 5 | } 6 | 7 | final blockchainService = BlockChainServiceSingleton(); 8 | -------------------------------------------------------------------------------- /lib/services/blockchain_service/i_blockchain_service.dart: -------------------------------------------------------------------------------- 1 | import 'package:web3modal_flutter/services/blockchain_service/models/blockchain_identity.dart'; 2 | 3 | abstract class IBlockChainService { 4 | Future init(); 5 | 6 | /// Gets the name and avatar of a provided address on the given chain 7 | Future getIdentity(String address); 8 | 9 | Future getRpcRequest({ 10 | required String method, 11 | required List params, 12 | required String chain, 13 | }); 14 | } 15 | -------------------------------------------------------------------------------- /lib/services/blockchain_service/models/blockchain_identity.dart: -------------------------------------------------------------------------------- 1 | import 'package:freezed_annotation/freezed_annotation.dart'; 2 | 3 | part 'blockchain_identity.g.dart'; 4 | part 'blockchain_identity.freezed.dart'; 5 | 6 | @freezed 7 | class BlockchainIdentity with _$BlockchainIdentity { 8 | const factory BlockchainIdentity({ 9 | String? name, 10 | String? avatar, 11 | }) = _BlockchainIdentity; 12 | 13 | factory BlockchainIdentity.fromJson(Map json) => 14 | _$BlockchainIdentityFromJson(json); 15 | } 16 | -------------------------------------------------------------------------------- /lib/services/blockchain_service/models/blockchain_identity.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | // ignore_for_file: non_constant_identifier_names 4 | 5 | part of 'blockchain_identity.dart'; 6 | 7 | // ************************************************************************** 8 | // JsonSerializableGenerator 9 | // ************************************************************************** 10 | 11 | _$BlockchainIdentityImpl _$$BlockchainIdentityImplFromJson( 12 | Map json) => 13 | _$BlockchainIdentityImpl( 14 | name: json['name'] as String?, 15 | avatar: json['avatar'] as String?, 16 | ); 17 | 18 | Map _$$BlockchainIdentityImplToJson( 19 | _$BlockchainIdentityImpl instance) => 20 | { 21 | 'name': instance.name, 22 | 'avatar': instance.avatar, 23 | }; 24 | -------------------------------------------------------------------------------- /lib/services/coinbase_service/coinbase_service_singleton.dart: -------------------------------------------------------------------------------- 1 | import 'package:web3modal_flutter/services/coinbase_service/i_coinbase_service.dart'; 2 | 3 | class CoinbaseServiceSingleton { 4 | late ICoinbaseService instance; 5 | } 6 | 7 | final coinbaseService = CoinbaseServiceSingleton(); 8 | -------------------------------------------------------------------------------- /lib/services/coinbase_service/i_coinbase_service.dart: -------------------------------------------------------------------------------- 1 | import 'package:web3modal_flutter/services/coinbase_service/models/coinbase_events.dart'; 2 | import 'package:web3modal_flutter/web3modal_flutter.dart'; 3 | 4 | class W3MCoinbaseException implements Exception { 5 | final String message; 6 | final dynamic error; 7 | final dynamic stackTrace; 8 | W3MCoinbaseException( 9 | this.message, [ 10 | this.error, 11 | this.stackTrace, 12 | ]) : super(); 13 | } 14 | 15 | class W3MCoinbaseNotInstalledException extends W3MCoinbaseException { 16 | W3MCoinbaseNotInstalledException() : super('App not installed'); 17 | } 18 | 19 | class W3MCoinbaseNotEnabled extends W3MCoinbaseException { 20 | W3MCoinbaseNotEnabled() : super('Coinbase is disabled'); 21 | } 22 | 23 | abstract class ICoinbaseService { 24 | Future init(); 25 | Future isConnected(); 26 | Future getAccount(); 27 | Future request({ 28 | required String chainId, 29 | required SessionRequestParams request, 30 | }); 31 | Future resetSession(); 32 | Future isInstalled(); 33 | 34 | Future get ownPublicKey; 35 | Future get peerPublicKey; 36 | 37 | ConnectionMetadata get metadata; 38 | 39 | abstract final Event onCoinbaseConnect; 40 | abstract final Event onCoinbaseError; 41 | abstract final Event onCoinbaseSessionUpdate; 42 | abstract final Event onCoinbaseResponse; 43 | } 44 | -------------------------------------------------------------------------------- /lib/services/coinbase_service/models/coinbase_events.dart: -------------------------------------------------------------------------------- 1 | import 'package:web3modal_flutter/web3modal_flutter.dart'; 2 | import 'package:web3modal_flutter/services/coinbase_service/models/coinbase_data.dart'; 3 | 4 | class CoinbaseConnectEvent implements EventArgs { 5 | final CoinbaseData? data; 6 | CoinbaseConnectEvent(this.data); 7 | 8 | @override 9 | String toString() => data?.toString() ?? ''; 10 | } 11 | 12 | class CoinbaseErrorEvent implements EventArgs { 13 | final String? error; 14 | CoinbaseErrorEvent(this.error); 15 | } 16 | 17 | class CoinbaseSessionEvent implements EventArgs { 18 | String? address; 19 | String? chainName; 20 | String? chainId; 21 | 22 | CoinbaseSessionEvent({ 23 | this.address, 24 | this.chainName, 25 | this.chainId, 26 | }); 27 | 28 | Map toJson() { 29 | Map params = {}; 30 | if ((address ?? '').isNotEmpty) { 31 | params['address'] = address; 32 | } 33 | if ((chainName ?? '').isNotEmpty) { 34 | params['chainName'] = chainName; 35 | } 36 | if (chainId != null) { 37 | params['chainId'] = chainId; 38 | } 39 | 40 | return params; 41 | } 42 | 43 | @override 44 | String toString() => toJson().toString(); 45 | } 46 | 47 | class CoinbaseResponseEvent implements EventArgs { 48 | String? data; 49 | CoinbaseResponseEvent({required this.data}); 50 | } 51 | -------------------------------------------------------------------------------- /lib/services/explorer_service/explorer_service_singleton.dart: -------------------------------------------------------------------------------- 1 | import 'package:web3modal_flutter/services/explorer_service/i_explorer_service.dart'; 2 | 3 | class ExplorerServiceSingleton { 4 | late IExplorerService instance; 5 | } 6 | 7 | final explorerService = ExplorerServiceSingleton(); 8 | -------------------------------------------------------------------------------- /lib/services/explorer_service/models/api_response.dart: -------------------------------------------------------------------------------- 1 | import 'package:web3modal_flutter/models/listing.dart'; 2 | import 'package:web3modal_flutter/services/explorer_service/models/native_app_data.dart'; 3 | 4 | class ApiResponse { 5 | final int count; 6 | final List data; 7 | 8 | ApiResponse({required this.count, required this.data}); 9 | 10 | ApiResponse copyWith({int? count, List? data}) => ApiResponse( 11 | count: count ?? this.count, 12 | data: data ?? this.data, 13 | ); 14 | 15 | factory ApiResponse.fromJson( 16 | final Map json, 17 | T Function(Object? json) fromJsonT, 18 | ) { 19 | return ApiResponse( 20 | count: json['count'], 21 | data: (json['data'] as List).map(fromJsonT).toList(), 22 | ); 23 | } 24 | 25 | Map toJson() => { 26 | 'count': count, 27 | 'data': List.from(data.map( 28 | (x) { 29 | if (T is Listing) { 30 | return (x as Listing).toJson(); 31 | } else if (T is NativeAppData) { 32 | return (x as NativeAppData).toJson(); 33 | } else { 34 | throw Exception('Invalid Type'); 35 | } 36 | }, 37 | )), 38 | }; 39 | } 40 | -------------------------------------------------------------------------------- /lib/services/explorer_service/models/native_app_data.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | class NativeAppData { 4 | final String id; 5 | final String? schema; 6 | 7 | NativeAppData({required this.id, this.schema}); 8 | 9 | NativeAppData copyWith({String? id, String? schema}) => NativeAppData( 10 | id: id ?? this.id, 11 | schema: schema ?? this.schema, 12 | ); 13 | 14 | factory NativeAppData.fromRawJson(String str) => 15 | NativeAppData.fromJson(json.decode(str)); 16 | 17 | String toRawJson() => json.encode(toJson()); 18 | 19 | factory NativeAppData.fromJson(Object? json) { 20 | final j = json as Map? ?? {}; 21 | return NativeAppData( 22 | id: j['id'], 23 | schema: (j['ios_schema'] ?? j['android_app_id'])?.toString().trim() ?? '', 24 | ); 25 | } 26 | 27 | Map toJson() => { 28 | 'id': id, 29 | 'schema': schema, 30 | }; 31 | } 32 | -------------------------------------------------------------------------------- /lib/services/explorer_service/models/redirect.dart: -------------------------------------------------------------------------------- 1 | class WalletRedirect { 2 | String? mobile; 3 | String? desktop; 4 | String? web; 5 | 6 | WalletRedirect({ 7 | this.mobile, 8 | this.desktop, 9 | this.web, 10 | }); 11 | 12 | bool get mobileOnly => desktop == null && web == null; 13 | bool get webOnly => desktop == null && mobile == null; 14 | bool get desktopOnly => mobile == null && web == null; 15 | 16 | Uri? get mobileUri => mobile != null ? Uri.parse(mobile!) : null; 17 | Uri? get webUri => web != null ? Uri.parse(web!) : null; 18 | Uri? get desktopUri => desktop != null ? Uri.parse(desktop!) : null; 19 | 20 | WalletRedirect copyWith({ 21 | String? mobile, 22 | String? desktop, 23 | String? web, 24 | }) { 25 | return WalletRedirect( 26 | mobile: mobile ?? this.mobile, 27 | desktop: desktop ?? this.desktop, 28 | web: web ?? this.web, 29 | ); 30 | } 31 | 32 | @override 33 | String toString() => 34 | 'mobile: $mobile (mobileOnly: $mobileOnly), desktop: $desktop (desktopOnly: $desktopOnly), web: $web (webOnly: $webOnly)'; 35 | } 36 | -------------------------------------------------------------------------------- /lib/services/logger_service/i_logger_service.dart: -------------------------------------------------------------------------------- 1 | import 'package:web3modal_flutter/web3modal_flutter.dart'; 2 | 3 | abstract class ILoggerService { 4 | /// Log a message at level [Level.trace]. 5 | void t( 6 | dynamic message, { 7 | DateTime? time, 8 | Object? error, 9 | StackTrace? stackTrace, 10 | }); 11 | 12 | /// Log a message at level [Level.debug]. 13 | void d( 14 | dynamic message, { 15 | DateTime? time, 16 | Object? error, 17 | StackTrace? stackTrace, 18 | }); 19 | 20 | /// Log a message at level [Level.info]. 21 | void i( 22 | dynamic message, { 23 | DateTime? time, 24 | Object? error, 25 | StackTrace? stackTrace, 26 | }); 27 | 28 | /// Log a message at level [Level.error]. 29 | void e( 30 | dynamic message, { 31 | DateTime? time, 32 | Object? error, 33 | StackTrace? stackTrace, 34 | }); 35 | 36 | /// Closes the logger and releases all resources. 37 | Future close(); 38 | } 39 | -------------------------------------------------------------------------------- /lib/services/logger_service/logger_service_singleton.dart: -------------------------------------------------------------------------------- 1 | import 'package:web3modal_flutter/services/logger_service/i_logger_service.dart'; 2 | 3 | class LoggerServiceSingleton { 4 | late ILoggerService instance; 5 | } 6 | 7 | final loggerService = LoggerServiceSingleton(); 8 | -------------------------------------------------------------------------------- /lib/services/magic_service/i_magic_service.dart: -------------------------------------------------------------------------------- 1 | import 'package:web3modal_flutter/services/magic_service/models/magic_events.dart'; 2 | import 'package:web3modal_flutter/web3modal_flutter.dart'; 3 | 4 | abstract class IMagicService { 5 | ConnectionMetadata get metadata; 6 | 7 | Future init(); 8 | 9 | void setEmail(String value); 10 | void setNewEmail(String value); 11 | 12 | // ****** W3mFrameProvider public methods ******* // 13 | Future connectEmail({required String value}); 14 | Future updateEmail({required String value}); 15 | Future updateEmailPrimaryOtp({required String otp}); 16 | Future updateEmailSecondaryOtp({required String otp}); 17 | Future connectOtp({required String otp}); 18 | Future getChainId(); 19 | Future syncTheme(Web3ModalTheme? theme); 20 | Future getUser({String? chainId}); 21 | Future switchNetwork({required String chainId}); 22 | Future request({ 23 | String? chainId, 24 | required SessionRequestParams request, 25 | }); 26 | Future disconnect(); 27 | 28 | abstract final Event onMagicLoginRequest; 29 | abstract final Event onMagicLoginSuccess; 30 | abstract final Event onMagicConnect; 31 | abstract final Event onMagicUpdate; 32 | abstract final Event onMagicError; 33 | abstract final Event onMagicRpcRequest; 34 | } 35 | -------------------------------------------------------------------------------- /lib/services/magic_service/magic_service_singleton.dart: -------------------------------------------------------------------------------- 1 | import 'package:web3modal_flutter/services/magic_service/magic_service.dart'; 2 | 3 | class MagicServiceSingleton { 4 | late MagicService instance; 5 | } 6 | 7 | final magicService = MagicServiceSingleton(); 8 | -------------------------------------------------------------------------------- /lib/services/magic_service/models/email_login_step.dart: -------------------------------------------------------------------------------- 1 | enum EmailLoginStep { 2 | verifyDevice('VERIFY_DEVICE'), 3 | verifyOtp('VERIFY_OTP'), 4 | verifyOtp2('VERIFY_OTP_2'), // not an actual action from service 5 | loading('LOADING'), 6 | idle(''); 7 | 8 | final String action; 9 | const EmailLoginStep(this.action); 10 | 11 | factory EmailLoginStep.fromAction(String action) { 12 | return values.firstWhere((e) => e.action == action); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /lib/services/network_service/i_network_service.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:web3modal_flutter/models/grid_item.dart'; 4 | import 'package:web3modal_flutter/models/w3m_chain_info.dart'; 5 | 6 | abstract class INetworkService { 7 | abstract ValueNotifier>> itemList; 8 | abstract ValueNotifier initialized; 9 | 10 | Future init(); 11 | 12 | void filterList({String? query}); 13 | } 14 | -------------------------------------------------------------------------------- /lib/services/network_service/network_service_singleton.dart: -------------------------------------------------------------------------------- 1 | import 'package:web3modal_flutter/services/network_service/i_network_service.dart'; 2 | import 'package:web3modal_flutter/services/network_service/network_service.dart'; 3 | 4 | class NetworkServiceSingleton { 5 | INetworkService instance; 6 | 7 | NetworkServiceSingleton() : instance = NetworkService(); 8 | } 9 | 10 | final networkService = NetworkServiceSingleton(); 11 | -------------------------------------------------------------------------------- /lib/services/siwe_service/i_siwe_service.dart: -------------------------------------------------------------------------------- 1 | import 'package:walletconnect_flutter_v2/apis/sign_api/models/auth/common_auth_models.dart'; 2 | import 'package:web3modal_flutter/services/siwe_service/models/w3m_siwe.dart'; 3 | import 'package:web3modal_flutter/services/w3m_service/models/w3m_session.dart'; 4 | 5 | abstract class ISiweService { 6 | SIWEConfig? get config; 7 | 8 | bool get enabled; 9 | bool get signOutOnDisconnect; 10 | bool get signOutOnAccountChange; 11 | bool get signOutOnNetworkChange; 12 | int get nonceRefetchIntervalMs; 13 | int get sessionRefetchIntervalMs; 14 | 15 | Future getNonce(); 16 | 17 | Future createMessage({ 18 | required String chainId, 19 | required String address, 20 | }); 21 | 22 | Future signMessageRequest( 23 | String message, { 24 | required W3MSession session, 25 | }); 26 | 27 | Future verifyMessage({ 28 | required String message, 29 | required String signature, 30 | Cacao? cacao, 31 | String? clientId, 32 | }); 33 | 34 | Future getSession(); 35 | 36 | Future signOut(); 37 | 38 | String formatMessage(SIWECreateMessageArgs params); 39 | } 40 | -------------------------------------------------------------------------------- /lib/services/siwe_service/siwe_service_singleton.dart: -------------------------------------------------------------------------------- 1 | import 'package:web3modal_flutter/services/siwe_service/i_siwe_service.dart'; 2 | 3 | class SiweServiceSingleton { 4 | ISiweService? instance; 5 | } 6 | 7 | final siweService = SiweServiceSingleton(); 8 | -------------------------------------------------------------------------------- /lib/services/storage_service/i_storage_service.dart: -------------------------------------------------------------------------------- 1 | abstract class IStorageService { 2 | Future init(); 3 | String? getString(String key, {String? defaultValue}); 4 | Future setString(String key, String value); 5 | Future clearAll(); 6 | Future clearKey(String key); 7 | } 8 | -------------------------------------------------------------------------------- /lib/services/storage_service/storage_service.dart: -------------------------------------------------------------------------------- 1 | import 'package:web3modal_flutter/services/storage_service/i_storage_service.dart'; 2 | import 'package:web3modal_flutter/web3modal_flutter.dart'; 3 | 4 | class StorageService implements IStorageService { 5 | SharedPreferences? _prefs; 6 | 7 | @override 8 | Future init() async { 9 | _prefs = await SharedPreferences.getInstance(); 10 | } 11 | 12 | @override 13 | String? getString(String key, {String? defaultValue}) { 14 | return _prefs?.getString(key) ?? defaultValue; 15 | } 16 | 17 | @override 18 | Future setString(String key, String value) async { 19 | return await _prefs!.setString(key, value); 20 | } 21 | 22 | @override 23 | Future clearAll() async { 24 | final keys = _prefs!.getKeys(); 25 | for (var key in keys) { 26 | if (key.startsWith('w3m_')) { 27 | await _prefs!.remove(key); 28 | } 29 | } 30 | } 31 | 32 | @override 33 | Future clearKey(String key) async { 34 | return _prefs!.remove(key); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /lib/services/storage_service/storage_service_singleton.dart: -------------------------------------------------------------------------------- 1 | import 'package:web3modal_flutter/services/storage_service/i_storage_service.dart'; 2 | import 'package:web3modal_flutter/services/storage_service/storage_service.dart'; 3 | 4 | class StorageServiceSingleton { 5 | IStorageService instance; 6 | 7 | StorageServiceSingleton() : instance = StorageService(); 8 | } 9 | 10 | final storageService = StorageServiceSingleton(); 11 | -------------------------------------------------------------------------------- /lib/services/w3m_service/events/w3m_events.dart: -------------------------------------------------------------------------------- 1 | import 'package:web3modal_flutter/web3modal_flutter.dart'; 2 | 3 | class ModalConnect extends EventArgs { 4 | final W3MSession session; 5 | ModalConnect(this.session); 6 | 7 | @override 8 | String toString() { 9 | return 'ModalConnect(session: ${session.toJson()})'; 10 | } 11 | } 12 | 13 | class ModalNetworkChange extends EventArgs { 14 | final String chainId; 15 | ModalNetworkChange({required this.chainId}); 16 | 17 | @override 18 | String toString() { 19 | return 'ModalNetworkChange(chainId: $chainId)'; 20 | } 21 | } 22 | 23 | class ModalDisconnect extends EventArgs { 24 | final String? topic; 25 | final int? id; 26 | ModalDisconnect({this.topic, this.id}); 27 | 28 | @override 29 | String toString() { 30 | return 'ModalDisconnect(topic: $topic, id: $id)'; 31 | } 32 | } 33 | 34 | class ModalError extends EventArgs { 35 | final String message; 36 | ModalError(this.message); 37 | 38 | @override 39 | String toString() { 40 | return 'ModalError(message: $message)'; 41 | } 42 | } 43 | 44 | class WalletNotInstalled extends ModalError { 45 | WalletNotInstalled() : super('Wallet app not installed'); 46 | } 47 | 48 | class ErrorOpeningWallet extends ModalError { 49 | ErrorOpeningWallet() : super('Unable to open Wallet app'); 50 | } 51 | 52 | class UserRejectedConnection extends ModalError { 53 | UserRejectedConnection() : super('User rejected connection'); 54 | } 55 | -------------------------------------------------------------------------------- /lib/services/w3m_service/models/w3m_exceptions.dart: -------------------------------------------------------------------------------- 1 | class W3MServiceException implements Exception { 2 | final dynamic message; 3 | final dynamic stackTrace; 4 | W3MServiceException(this.message, [this.stackTrace]) : super(); 5 | } 6 | -------------------------------------------------------------------------------- /lib/theme/constants.dart: -------------------------------------------------------------------------------- 1 | const kListItemHeight = 56.0; 2 | 3 | const kGridItemWidth = 76.0; 4 | const kGridItemHeight = 96.0; 5 | 6 | const kNavbarHeight = 64.0; 7 | const kShortWalletListCount = 4; 8 | const kLShortWalletListCount = 3; 9 | const kSearchFieldHeight = 40.0; 10 | 11 | const kPadding16 = 16.0; 12 | const kPadding12 = 12.0; 13 | const kPadding8 = 8.0; 14 | const kPadding6 = 6.0; 15 | 16 | const kGridAxisSpacing = 12.0; 17 | const kGridAxisCountP = 4; 18 | const kGridAxisCountPW = 5; 19 | const kGridAxisCountL = 8; 20 | const kGridAxisCountLW = 9; 21 | 22 | const kListViewSeparatorHeight = 8.0; 23 | 24 | const kSelectedWalletIconHeight = 80.0; 25 | -------------------------------------------------------------------------------- /lib/theme/w3m_theme.dart: -------------------------------------------------------------------------------- 1 | export 'w3m_theme_widget.dart'; 2 | export 'w3m_theme_data.dart'; 3 | export 'w3m_colors.dart'; 4 | export 'w3m_radiuses.dart'; 5 | -------------------------------------------------------------------------------- /lib/theme/w3m_theme_data.dart: -------------------------------------------------------------------------------- 1 | import 'package:freezed_annotation/freezed_annotation.dart'; 2 | import 'package:web3modal_flutter/theme/w3m_colors.dart'; 3 | import 'package:web3modal_flutter/theme/w3m_radiuses.dart'; 4 | import 'package:web3modal_flutter/theme/w3m_text_styles.dart'; 5 | 6 | part 'w3m_theme_data.freezed.dart'; 7 | 8 | @freezed 9 | class Web3ModalThemeData with _$Web3ModalThemeData { 10 | const factory Web3ModalThemeData({ 11 | @Default(Web3ModalColors.lightMode) Web3ModalColors lightColors, 12 | @Default(Web3ModalColors.darkMode) Web3ModalColors darkColors, 13 | @Default(Web3ModalTextStyles.textStyle) Web3ModalTextStyles textStyles, 14 | @Default(Web3ModalRadiuses()) Web3ModalRadiuses radiuses, 15 | }) = _Web3ModalThemeData; 16 | } 17 | -------------------------------------------------------------------------------- /lib/utils/asset_util.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:web3modal_flutter/theme/w3m_theme.dart'; 4 | import 'package:web3modal_flutter/utils/w3m_chains_presets.dart'; 5 | 6 | class AssetUtil { 7 | static String? getChainIconId(String chainId) { 8 | return W3MChainPresets.chainImagesId[chainId]; 9 | } 10 | 11 | static String getThemedAsset(BuildContext context, String assetName) { 12 | if (Web3ModalTheme.maybeOf(context)?.isDarkMode == true) { 13 | return 'assets/dark/$assetName'; 14 | } 15 | return 'assets/light/$assetName'; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /lib/utils/core/core_utils_singleton.dart: -------------------------------------------------------------------------------- 1 | import 'package:web3modal_flutter/utils/core/core_utils.dart'; 2 | import 'package:web3modal_flutter/utils/core/i_core_utils.dart'; 3 | 4 | class CoreUtilsSingleton { 5 | ICoreUtils instance; 6 | 7 | CoreUtilsSingleton() : instance = CoreUtils(); 8 | } 9 | 10 | final coreUtils = CoreUtilsSingleton(); 11 | -------------------------------------------------------------------------------- /lib/utils/core/i_core_utils.dart: -------------------------------------------------------------------------------- 1 | abstract class ICoreUtils { 2 | /// Returns true if the given [url] is a valid HTTP or HTTPS URL. 3 | bool isValidProjectID(String projectId); 4 | 5 | bool isValidEmail(String email); 6 | 7 | /// Returns true if the given [url] is a valid HTTP or HTTPS URL. 8 | bool isHttpUrl(String url); 9 | 10 | /// Creates a URL that ends with :// if the provided URL didn't have it. 11 | String createSafeUrl(String url); 12 | 13 | /// Creates a URL that ends with / if the provided URL didn't have it. 14 | String createPlainUrl(String url); 15 | 16 | /// Formats a native URL for the given [appUrl] and [wcUri]. 17 | /// metamask:// is a native URL 18 | Uri? formatCustomSchemeUri(String? appUrl, String? wcUri); 19 | 20 | /// Formats a universal URL for the given [appUrl] and [wcUri]. 21 | /// https://metamask.app.link/ is a universal URL 22 | Uri? formatWebUrl(String? appUrl, String? wcUri); 23 | 24 | String formatChainBalance(double? chainBalance, {int precision = 4}); 25 | 26 | /// Returns the user agent string. Used with the explorer and other API endpoints. 27 | String getUserAgent(); 28 | 29 | Map getAPIHeaders(String projectId, [String? referer]); 30 | } 31 | -------------------------------------------------------------------------------- /lib/utils/debouncer.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | import 'package:flutter/foundation.dart'; 3 | 4 | class Debouncer { 5 | final int milliseconds; 6 | Timer? _timer; 7 | 8 | Debouncer({required this.milliseconds}); 9 | 10 | void run(VoidCallback action) { 11 | if (_timer?.isActive == true) { 12 | _timer?.cancel(); 13 | _timer = null; 14 | } 15 | _timer = Timer( 16 | Duration(milliseconds: milliseconds), 17 | action, 18 | ); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /lib/utils/platform/i_platform_utils.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | enum PlatformType { 4 | mobile, 5 | desktop, 6 | web, 7 | } 8 | 9 | enum PlatformExact { 10 | iOS, 11 | android, 12 | web, 13 | macOS, 14 | windows, 15 | linux, 16 | } 17 | 18 | abstract class IPlatformUtils { 19 | PlatformExact getPlatformExact(); 20 | 21 | PlatformType getPlatformType(); 22 | 23 | bool canDetectInstalledApps(); 24 | 25 | bool isBottomSheet(); 26 | 27 | bool isLongBottomSheet(Orientation orientation); 28 | 29 | bool isMobileWidth(double width); 30 | 31 | bool isTablet(BuildContext context); 32 | } 33 | -------------------------------------------------------------------------------- /lib/utils/platform/platform_utils_singleton.dart: -------------------------------------------------------------------------------- 1 | import 'package:web3modal_flutter/utils/platform/i_platform_utils.dart'; 2 | import 'package:web3modal_flutter/utils/platform/platform_utils.dart'; 3 | 4 | class PlatformUtilsSingleton { 5 | IPlatformUtils instance; 6 | 7 | PlatformUtilsSingleton() : instance = PlatformUtils(); 8 | } 9 | 10 | final platformUtils = PlatformUtilsSingleton(); 11 | -------------------------------------------------------------------------------- /lib/utils/toast/i_toast_utils.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:web3modal_flutter/utils/toast/toast_message.dart'; 4 | 5 | class ToastMessageCompleter { 6 | final ToastMessage message; 7 | final Completer completer = Completer(); 8 | 9 | ToastMessageCompleter(this.message); 10 | } 11 | 12 | abstract class IToastUtils { 13 | Stream get toasts; 14 | 15 | void show(ToastMessage message); 16 | 17 | void clear(); 18 | } 19 | -------------------------------------------------------------------------------- /lib/utils/toast/toast_utils.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:web3modal_flutter/utils/toast/toast_message.dart'; 4 | import 'package:web3modal_flutter/utils/toast/i_toast_utils.dart'; 5 | 6 | class ToastUtils extends IToastUtils { 7 | final _toastController = StreamController.broadcast(); 8 | 9 | @override 10 | Stream get toasts => _toastController.stream; 11 | 12 | @override 13 | void show(ToastMessage? message) { 14 | _toastController.add(message); 15 | } 16 | 17 | @override 18 | void clear() { 19 | _toastController.add(null); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /lib/utils/toast/toast_utils_singleton.dart: -------------------------------------------------------------------------------- 1 | import 'package:web3modal_flutter/utils/toast/i_toast_utils.dart'; 2 | import 'package:web3modal_flutter/utils/toast/toast_utils.dart'; 3 | 4 | class ToastUtilsSingleton { 5 | IToastUtils instance; 6 | 7 | ToastUtilsSingleton() : instance = ToastUtils(); 8 | } 9 | 10 | final toastUtils = ToastUtilsSingleton(); 11 | -------------------------------------------------------------------------------- /lib/utils/url/i_url_utils.dart: -------------------------------------------------------------------------------- 1 | import 'package:url_launcher/url_launcher.dart'; 2 | import 'package:web3modal_flutter/services/explorer_service/models/redirect.dart'; 3 | import 'package:web3modal_flutter/utils/platform/i_platform_utils.dart'; 4 | 5 | abstract class IUrlUtils { 6 | const IUrlUtils(); 7 | 8 | Future isInstalled(String? uri, {String? id}); 9 | 10 | Future launchUrl(Uri url, {LaunchMode? mode}); 11 | 12 | Future openRedirect( 13 | WalletRedirect redirect, { 14 | String? wcURI, 15 | PlatformType? pType, 16 | }); 17 | } 18 | -------------------------------------------------------------------------------- /lib/utils/url/launch_url_exception.dart: -------------------------------------------------------------------------------- 1 | class LaunchUrlException { 2 | final String message; 3 | LaunchUrlException(this.message); 4 | } 5 | 6 | class CanNotLaunchUrl extends LaunchUrlException { 7 | CanNotLaunchUrl() : super('App not installed'); 8 | } 9 | 10 | class ErrorLaunchingUrl extends LaunchUrlException { 11 | ErrorLaunchingUrl() : super('Error launching app'); 12 | } 13 | -------------------------------------------------------------------------------- /lib/utils/url/url_utils_singleton.dart: -------------------------------------------------------------------------------- 1 | import 'package:web3modal_flutter/utils/url/i_url_utils.dart'; 2 | import 'package:web3modal_flutter/utils/url/url_utils.dart'; 3 | 4 | class UrlUtilsSingleton { 5 | IUrlUtils instance; 6 | 7 | UrlUtilsSingleton() : instance = UrlUtils(); 8 | } 9 | 10 | final urlUtils = UrlUtilsSingleton(); 11 | -------------------------------------------------------------------------------- /lib/utils/w3m_logger.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/foundation.dart'; 2 | import 'package:web3modal_flutter/web3modal_flutter.dart'; 3 | 4 | @Deprecated('W3MLoggerUtil is going to be deprecated soon. Don\'t use it') 5 | class W3MLoggerUtil { 6 | static Logger logger = Logger( 7 | level: Level.off, 8 | printer: PrettyPrinter(), 9 | ); 10 | 11 | static void setLogLevel(LogLevel level, {bool debugMode = false}) { 12 | if (kDebugMode && debugMode && level == LogLevel.error) { 13 | Logger.addLogListener((LogEvent event) => debugPrint('${event.message}')); 14 | } 15 | logger = Logger( 16 | level: level.toLevel(), 17 | printer: PrettyPrinter( 18 | methodCount: 10, 19 | ), 20 | ); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /lib/version.dart: -------------------------------------------------------------------------------- 1 | // Generated code. Do not modify. 2 | const packageVersion = '3.3.4'; 3 | -------------------------------------------------------------------------------- /lib/web3modal_flutter.dart: -------------------------------------------------------------------------------- 1 | /// web3modal_flutter 2 | library web3modal_flutter; 3 | 4 | /// libraries 5 | export 'package:walletconnect_flutter_v2/walletconnect_flutter_v2.dart' 6 | hide AuthSignature; 7 | 8 | /// Models 9 | export 'models/w3m_chain_info.dart'; 10 | export 'models/w3m_wallet_info.dart'; 11 | export 'services/siwe_service/models/w3m_siwe.dart'; 12 | 13 | /// Utils 14 | export 'utils/w3m_chains_presets.dart'; 15 | export 'utils/util.dart'; 16 | export 'services/siwe_service/utils/siwe_utils.dart'; 17 | 18 | /// Theme 19 | export 'theme/w3m_theme.dart'; 20 | 21 | /// Services 22 | export 'services/w3m_service/w3m_service.dart'; 23 | export 'services/w3m_service/models/w3m_session.dart'; 24 | export 'services/w3m_service/events/w3m_events.dart'; 25 | export 'services/w3m_service/models/w3m_exceptions.dart'; 26 | 27 | /// Widgets 28 | export 'widgets/w3m_connect_wallet_button.dart'; 29 | export 'widgets/w3m_network_select_button.dart'; 30 | export 'widgets/w3m_account_button.dart'; 31 | export 'widgets/buttons/base_button.dart' show BaseButtonSize; 32 | export 'widgets/buttons/connect_button.dart' show ConnectButtonState; 33 | -------------------------------------------------------------------------------- /lib/widgets/avatars/w3m_account_orb.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:web3modal_flutter/theme/w3m_colors.dart'; 3 | import 'package:web3modal_flutter/theme/w3m_theme_widget.dart'; 4 | import 'package:web3modal_flutter/widgets/web3modal_provider.dart'; 5 | import 'package:web3modal_flutter/widgets/avatars/w3m_account_avatar.dart'; 6 | 7 | class W3MAccountOrb extends StatelessWidget { 8 | const W3MAccountOrb({super.key, this.size = 70.0}); 9 | final double size; 10 | 11 | @override 12 | Widget build(BuildContext context) { 13 | final themeColors = Web3ModalTheme.colorsOf(context); 14 | final service = Web3ModalProvider.of(context).service; 15 | return Container( 16 | width: size, 17 | height: size, 18 | decoration: BoxDecoration( 19 | borderRadius: BorderRadius.circular(size / 2), 20 | border: Border.all( 21 | color: themeColors.grayGlass005, 22 | width: 8.0, 23 | ), 24 | ), 25 | child: W3MAccountAvatar( 26 | service: service, 27 | size: size - 8.0, 28 | ), 29 | ); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /lib/widgets/buttons/secondary_button.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:web3modal_flutter/web3modal_flutter.dart'; 3 | import 'package:web3modal_flutter/widgets/buttons/base_button.dart'; 4 | 5 | class SecondaryButton extends StatelessWidget { 6 | final String title; 7 | final VoidCallback? onTap; 8 | const SecondaryButton({ 9 | super.key, 10 | required this.title, 11 | this.onTap, 12 | }); 13 | 14 | @override 15 | Widget build(BuildContext context) { 16 | final themeColors = Web3ModalTheme.colorsOf(context); 17 | final radiuses = Web3ModalTheme.radiusesOf(context); 18 | return BaseButton( 19 | size: BaseButtonSize.big, 20 | child: Text(title), 21 | onTap: onTap, 22 | buttonStyle: ButtonStyle( 23 | backgroundColor: MaterialStateProperty.resolveWith( 24 | (states) => themeColors.grayGlass001, 25 | ), 26 | foregroundColor: MaterialStateProperty.resolveWith( 27 | (states) => themeColors.foreground200, 28 | ), 29 | shape: MaterialStateProperty.resolveWith( 30 | (states) { 31 | return RoundedRectangleBorder( 32 | side: BorderSide( 33 | color: themeColors.grayGlass010, 34 | width: 1.0, 35 | ), 36 | borderRadius: radiuses.isSquare() 37 | ? BorderRadius.all(Radius.zero) 38 | : BorderRadius.circular(16.0), 39 | ); 40 | }, 41 | ), 42 | ), 43 | ); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /lib/widgets/lists/list_items/wallet_item_chip.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:web3modal_flutter/theme/w3m_theme.dart'; 3 | 4 | class WalletItemChip extends StatelessWidget { 5 | const WalletItemChip({ 6 | super.key, 7 | required this.value, 8 | this.color, 9 | this.textStyle, 10 | }); 11 | final String value; 12 | final Color? color; 13 | final TextStyle? textStyle; 14 | 15 | @override 16 | Widget build(BuildContext context) { 17 | final themeData = Web3ModalTheme.getDataOf(context); 18 | final themeColors = Web3ModalTheme.colorsOf(context); 19 | final radiuses = Web3ModalTheme.radiusesOf(context); 20 | return Container( 21 | decoration: BoxDecoration( 22 | color: color ?? themeColors.grayGlass010, 23 | borderRadius: BorderRadius.all(Radius.circular(radiuses.radius4XS)), 24 | ), 25 | padding: const EdgeInsets.all(5.0), 26 | margin: const EdgeInsets.only(right: 8.0), 27 | child: Text( 28 | value, 29 | style: textStyle ?? 30 | themeData.textStyles.micro700.copyWith( 31 | color: themeColors.foreground150, 32 | ), 33 | ), 34 | ); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /lib/widgets/lists/list_items/wallet_list_item_simple.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_svg/svg.dart'; 3 | 4 | import 'package:web3modal_flutter/theme/w3m_theme.dart'; 5 | import 'package:web3modal_flutter/widgets/lists/list_items/base_list_item.dart'; 6 | 7 | class WalletListItemSimple extends StatelessWidget { 8 | const WalletListItemSimple({ 9 | super.key, 10 | required this.title, 11 | required this.icon, 12 | this.onTap, 13 | }); 14 | final String title; 15 | final String icon; 16 | final VoidCallback? onTap; 17 | 18 | @override 19 | Widget build(BuildContext context) { 20 | final themeData = Web3ModalTheme.getDataOf(context); 21 | final themeColors = Web3ModalTheme.colorsOf(context); 22 | return BaseListItem( 23 | onTap: onTap, 24 | child: Row( 25 | mainAxisAlignment: MainAxisAlignment.center, 26 | children: [ 27 | SvgPicture.asset( 28 | icon, 29 | package: 'web3modal_flutter', 30 | colorFilter: ColorFilter.mode( 31 | themeColors.foreground200, 32 | BlendMode.srcIn, 33 | ), 34 | ), 35 | const SizedBox.square(dimension: 8.0), 36 | Text( 37 | title, 38 | textAlign: TextAlign.center, 39 | style: themeData.textStyles.paragraph600.copyWith( 40 | color: themeColors.foreground200, 41 | ), 42 | ), 43 | ], 44 | ), 45 | ); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /lib/widgets/loader.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:web3modal_flutter/web3modal_flutter.dart'; 3 | 4 | class CircularLoader extends StatelessWidget { 5 | final double? size; 6 | final double? strokeWidth; 7 | final EdgeInsetsGeometry? padding; 8 | const CircularLoader({ 9 | super.key, 10 | this.size, 11 | this.strokeWidth, 12 | this.padding, 13 | }); 14 | 15 | @override 16 | Widget build(BuildContext context) { 17 | final themeColors = Web3ModalTheme.colorsOf(context); 18 | return Container( 19 | padding: padding ?? const EdgeInsets.all(0.0), 20 | width: size, 21 | height: size, 22 | child: CircularProgressIndicator( 23 | color: themeColors.accent100, 24 | strokeWidth: strokeWidth ?? 4.0, 25 | ), 26 | ); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /lib/widgets/miscellaneous/content_loading.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:web3modal_flutter/widgets/loader.dart'; 3 | 4 | class ContentLoading extends StatelessWidget { 5 | const ContentLoading({super.key, this.viewHeight}); 6 | final double? viewHeight; 7 | 8 | @override 9 | Widget build(BuildContext context) { 10 | return Container( 11 | padding: const EdgeInsets.all(8.0), 12 | height: viewHeight ?? 300.0, 13 | child: Center( 14 | child: Padding( 15 | padding: const EdgeInsets.all(8.0), 16 | child: CircularLoader(), 17 | ), 18 | ), 19 | ); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /lib/widgets/navigation/navbar_action_button.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_svg/flutter_svg.dart'; 3 | import 'package:web3modal_flutter/theme/constants.dart'; 4 | import 'package:web3modal_flutter/theme/w3m_theme.dart'; 5 | 6 | class NavbarActionButton extends StatelessWidget { 7 | const NavbarActionButton({ 8 | super.key, 9 | required this.asset, 10 | required this.action, 11 | this.color, 12 | }); 13 | final String asset; 14 | final VoidCallback action; 15 | final Color? color; 16 | 17 | @override 18 | Widget build(BuildContext context) { 19 | final themeColors = Web3ModalTheme.colorsOf(context); 20 | return SizedBox.square( 21 | dimension: kNavbarHeight, 22 | child: IconButton( 23 | onPressed: action, 24 | icon: SvgPicture.asset( 25 | asset, 26 | package: 'web3modal_flutter', 27 | colorFilter: ColorFilter.mode( 28 | color ?? themeColors.foreground100, 29 | BlendMode.srcIn, 30 | ), 31 | width: 18.0, 32 | height: 18.0, 33 | ), 34 | ), 35 | ); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /lib/widgets/text/w3m_address.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:web3modal_flutter/services/w3m_service/i_w3m_service.dart'; 3 | import 'package:web3modal_flutter/web3modal_flutter.dart'; 4 | 5 | class W3MAddress extends StatefulWidget { 6 | const W3MAddress({ 7 | super.key, 8 | required this.service, 9 | this.style, 10 | }); 11 | 12 | final IW3MService service; 13 | final TextStyle? style; 14 | 15 | @override 16 | State createState() => _W3MAddressState(); 17 | } 18 | 19 | class _W3MAddressState extends State { 20 | String? _address; 21 | 22 | @override 23 | void initState() { 24 | super.initState(); 25 | _w3mServiceUpdated(); 26 | widget.service.addListener(_w3mServiceUpdated); 27 | } 28 | 29 | @override 30 | void dispose() { 31 | widget.service.removeListener(_w3mServiceUpdated); 32 | super.dispose(); 33 | } 34 | 35 | @override 36 | Widget build(BuildContext context) { 37 | final themeData = Web3ModalTheme.getDataOf(context); 38 | final themeColors = Web3ModalTheme.colorsOf(context); 39 | return Text( 40 | Util.truncate(_address ?? ''), 41 | style: widget.style ?? 42 | themeData.textStyles.paragraph600.copyWith( 43 | color: themeColors.foreground100, 44 | ), 45 | ); 46 | } 47 | 48 | void _w3mServiceUpdated() { 49 | setState(() { 50 | _address = widget.service.session?.address; 51 | }); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /lib/widgets/toast/walletconnect_modal_toast_manager.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:web3modal_flutter/utils/toast/toast_message.dart'; 3 | import 'package:web3modal_flutter/utils/toast/toast_utils_singleton.dart'; 4 | import 'package:web3modal_flutter/widgets/toast/walletconnect_modal_toast.dart'; 5 | 6 | class WalletConnectModalToastManager extends StatelessWidget { 7 | const WalletConnectModalToastManager({ 8 | super.key, 9 | }); 10 | 11 | @override 12 | Widget build(BuildContext context) { 13 | return StreamBuilder( 14 | stream: toastUtils.instance.toasts, 15 | builder: (context, snapshot) { 16 | if (snapshot.hasData && snapshot.data != null) { 17 | return WalletConnectModalToast(message: snapshot.data!); 18 | } 19 | return const SizedBox.shrink(); 20 | }, 21 | ); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /lib/widgets/web3modal_provider.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:web3modal_flutter/services/w3m_service/i_w3m_service.dart'; 3 | 4 | class Web3ModalProvider extends InheritedWidget { 5 | final IW3MService service; 6 | 7 | const Web3ModalProvider({ 8 | super.key, 9 | required this.service, 10 | required super.child, 11 | }); 12 | 13 | static Web3ModalProvider? maybeOf(BuildContext context) { 14 | return context.dependOnInheritedWidgetOfExactType(); 15 | } 16 | 17 | static Web3ModalProvider of(BuildContext context) { 18 | final Web3ModalProvider? result = maybeOf(context); 19 | assert(result != null, 'No Web3ModalProvider found in context'); 20 | return result!; 21 | } 22 | 23 | @override 24 | bool updateShouldNotify(Web3ModalProvider oldWidget) { 25 | return true; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /lib/widgets/widget_stack/i_widget_stack.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:web3modal_flutter/services/analytics_service/models/analytics_event.dart'; 3 | 4 | abstract class IWidgetStack with ChangeNotifier { 5 | abstract final ValueNotifier onRenderScreen; 6 | 7 | /// Returns the current widget. 8 | Widget getCurrent(); 9 | 10 | /// Pushes a widget to the stack. 11 | void push( 12 | Widget widget, { 13 | bool renderScreen = false, 14 | AnalyticsEvent? event, 15 | }); 16 | 17 | /// Removes a widget from the stack. 18 | void pop(); 19 | 20 | /// Checks if the stack can be popped. 21 | bool canPop(); 22 | 23 | /// Removes widgets from the stack until the given type of widget is found. 24 | void popUntil(Key key); 25 | 26 | void popAllAndPush(Widget widget, {bool renderScreen = false}); 27 | 28 | /// Checks if the stack contains a widget with the given key. 29 | bool containsKey(Key key); 30 | 31 | /// Clears the stack. 32 | void clear(); 33 | 34 | /// Adds a default widget to the stack based on platform. 35 | void addDefault(); 36 | } 37 | -------------------------------------------------------------------------------- /lib/widgets/widget_stack/widget_stack_singleton.dart: -------------------------------------------------------------------------------- 1 | import 'package:web3modal_flutter/widgets/widget_stack/i_widget_stack.dart'; 2 | import 'package:web3modal_flutter/widgets/widget_stack/widget_stack.dart'; 3 | 4 | class WidgetStackSingleton { 5 | IWidgetStack instance; 6 | WidgetStackSingleton() : instance = WidgetStack(); 7 | } 8 | 9 | final widgetStack = WidgetStackSingleton(); 10 | -------------------------------------------------------------------------------- /linux/.gitignore: -------------------------------------------------------------------------------- 1 | flutter/ephemeral 2 | -------------------------------------------------------------------------------- /linux/flutter/generated_plugin_registrant.cc: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #include "generated_plugin_registrant.h" 8 | 9 | #include 10 | 11 | void fl_register_plugins(FlPluginRegistry* registry) { 12 | g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar = 13 | fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin"); 14 | url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar); 15 | } 16 | -------------------------------------------------------------------------------- /linux/flutter/generated_plugin_registrant.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #ifndef GENERATED_PLUGIN_REGISTRANT_ 8 | #define GENERATED_PLUGIN_REGISTRANT_ 9 | 10 | #include 11 | 12 | // Registers Flutter plugins. 13 | void fl_register_plugins(FlPluginRegistry* registry); 14 | 15 | #endif // GENERATED_PLUGIN_REGISTRANT_ 16 | -------------------------------------------------------------------------------- /linux/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | url_launcher_linux 7 | ) 8 | 9 | list(APPEND FLUTTER_FFI_PLUGIN_LIST 10 | ) 11 | 12 | set(PLUGIN_BUNDLED_LIBRARIES) 13 | 14 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 15 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin}) 16 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 17 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 18 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 19 | endforeach(plugin) 20 | 21 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) 22 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin}) 23 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) 24 | endforeach(ffi_plugin) 25 | -------------------------------------------------------------------------------- /linux/main.cc: -------------------------------------------------------------------------------- 1 | #include "my_application.h" 2 | 3 | int main(int argc, char** argv) { 4 | g_autoptr(MyApplication) app = my_application_new(); 5 | return g_application_run(G_APPLICATION(app), argc, argv); 6 | } 7 | -------------------------------------------------------------------------------- /linux/my_application.h: -------------------------------------------------------------------------------- 1 | #ifndef FLUTTER_MY_APPLICATION_H_ 2 | #define FLUTTER_MY_APPLICATION_H_ 3 | 4 | #include 5 | 6 | G_DECLARE_FINAL_TYPE(MyApplication, my_application, MY, APPLICATION, 7 | GtkApplication) 8 | 9 | /** 10 | * my_application_new: 11 | * 12 | * Creates a new Flutter-based application. 13 | * 14 | * Returns: a new #MyApplication. 15 | */ 16 | MyApplication* my_application_new(); 17 | 18 | #endif // FLUTTER_MY_APPLICATION_H_ 19 | -------------------------------------------------------------------------------- /macos/.gitignore: -------------------------------------------------------------------------------- 1 | # Flutter-related 2 | **/Flutter/ephemeral/ 3 | **/Pods/ 4 | 5 | # Xcode-related 6 | **/dgph 7 | **/xcuserdata/ 8 | -------------------------------------------------------------------------------- /macos/Flutter/Flutter-Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "ephemeral/Flutter-Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /macos/Flutter/Flutter-Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "ephemeral/Flutter-Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /macos/Flutter/GeneratedPluginRegistrant.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | import FlutterMacOS 6 | import Foundation 7 | 8 | import connectivity_plus 9 | import package_info_plus 10 | import path_provider_foundation 11 | import shared_preferences_foundation 12 | import sqflite 13 | import url_launcher_macos 14 | 15 | func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { 16 | ConnectivityPlusPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlusPlugin")) 17 | FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin")) 18 | PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) 19 | SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin")) 20 | SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin")) 21 | UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin")) 22 | } 23 | -------------------------------------------------------------------------------- /macos/Podfile: -------------------------------------------------------------------------------- 1 | platform :osx, '10.14' 2 | 3 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency. 4 | ENV['COCOAPODS_DISABLE_STATS'] = 'true' 5 | 6 | project 'Runner', { 7 | 'Debug' => :debug, 8 | 'Profile' => :release, 9 | 'Release' => :release, 10 | } 11 | 12 | def flutter_root 13 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'ephemeral', 'Flutter-Generated.xcconfig'), __FILE__) 14 | unless File.exist?(generated_xcode_build_settings_path) 15 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure \"flutter pub get\" is executed first" 16 | end 17 | 18 | File.foreach(generated_xcode_build_settings_path) do |line| 19 | matches = line.match(/FLUTTER_ROOT\=(.*)/) 20 | return matches[1].strip if matches 21 | end 22 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Flutter-Generated.xcconfig, then run \"flutter pub get\"" 23 | end 24 | 25 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) 26 | 27 | flutter_macos_podfile_setup 28 | 29 | target 'Runner' do 30 | use_frameworks! 31 | use_modular_headers! 32 | 33 | flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__)) 34 | target 'RunnerTests' do 35 | inherit! :search_paths 36 | end 37 | end 38 | 39 | post_install do |installer| 40 | installer.pods_project.targets.each do |target| 41 | flutter_additional_macos_build_settings(target) 42 | end 43 | end 44 | -------------------------------------------------------------------------------- /macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /macos/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /macos/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | 4 | @NSApplicationMain 5 | class AppDelegate: FlutterAppDelegate { 6 | override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { 7 | return true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/macos/Runner/Assets.xcassets/AppIcon.appiconset/1024.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/macos/Runner/Assets.xcassets/AppIcon.appiconset/128.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/macos/Runner/Assets.xcassets/AppIcon.appiconset/16.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/macos/Runner/Assets.xcassets/AppIcon.appiconset/256.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/macos/Runner/Assets.xcassets/AppIcon.appiconset/32.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/macos/Runner/Assets.xcassets/AppIcon.appiconset/512.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/macos/Runner/Assets.xcassets/AppIcon.appiconset/64.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | {"images":[{"size":"128x128","expected-size":"128","filename":"128.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"mac","scale":"1x"},{"size":"256x256","expected-size":"256","filename":"256.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"mac","scale":"1x"},{"size":"128x128","expected-size":"256","filename":"256.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"mac","scale":"2x"},{"size":"256x256","expected-size":"512","filename":"512.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"mac","scale":"2x"},{"size":"32x32","expected-size":"32","filename":"32.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"mac","scale":"1x"},{"size":"512x512","expected-size":"512","filename":"512.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"mac","scale":"1x"},{"size":"16x16","expected-size":"16","filename":"16.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"mac","scale":"1x"},{"size":"16x16","expected-size":"32","filename":"32.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"mac","scale":"2x"},{"size":"32x32","expected-size":"64","filename":"64.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"mac","scale":"2x"},{"size":"512x512","expected-size":"1024","filename":"1024.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"mac","scale":"2x"}]} -------------------------------------------------------------------------------- /macos/Runner/Configs/AppInfo.xcconfig: -------------------------------------------------------------------------------- 1 | // Application-level settings for the Runner target. 2 | // 3 | // This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the 4 | // future. If not, the values below would default to using the project name when this becomes a 5 | // 'flutter create' template. 6 | 7 | // The application's name. By default this is also the title of the Flutter window. 8 | PRODUCT_NAME = web3modal_flutter 9 | 10 | // The application's bundle identifier 11 | PRODUCT_BUNDLE_IDENTIFIER = com.example.web3modalFlutter 12 | 13 | // The copyright displayed in application information 14 | PRODUCT_COPYRIGHT = Copyright © 2023 com.example. All rights reserved. 15 | -------------------------------------------------------------------------------- /macos/Runner/Configs/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Debug.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /macos/Runner/Configs/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Release.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /macos/Runner/Configs/Warnings.xcconfig: -------------------------------------------------------------------------------- 1 | WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings 2 | GCC_WARN_UNDECLARED_SELECTOR = YES 3 | CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES 4 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE 5 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES 6 | CLANG_WARN_PRAGMA_PACK = YES 7 | CLANG_WARN_STRICT_PROTOTYPES = YES 8 | CLANG_WARN_COMMA = YES 9 | GCC_WARN_STRICT_SELECTOR_MATCH = YES 10 | CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES 11 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES 12 | GCC_WARN_SHADOW = YES 13 | CLANG_WARN_UNREACHABLE_CODE = YES 14 | -------------------------------------------------------------------------------- /macos/Runner/DebugProfile.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.cs.allow-jit 8 | 9 | com.apple.security.network.server 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /macos/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(FLUTTER_BUILD_NAME) 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSMinimumSystemVersion 24 | $(MACOSX_DEPLOYMENT_TARGET) 25 | NSHumanReadableCopyright 26 | $(PRODUCT_COPYRIGHT) 27 | NSMainNibFile 28 | MainMenu 29 | NSPrincipalClass 30 | NSApplication 31 | 32 | 33 | -------------------------------------------------------------------------------- /macos/Runner/MainFlutterWindow.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | 4 | class MainFlutterWindow: NSWindow { 5 | override func awakeFromNib() { 6 | let flutterViewController = FlutterViewController() 7 | let windowFrame = self.frame 8 | self.contentViewController = flutterViewController 9 | self.setFrame(windowFrame, display: true) 10 | 11 | RegisterGeneratedPlugins(registry: flutterViewController) 12 | 13 | super.awakeFromNib() 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /macos/Runner/Release.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /macos/RunnerTests/RunnerTests.swift: -------------------------------------------------------------------------------- 1 | import FlutterMacOS 2 | import Cocoa 3 | import XCTest 4 | 5 | class RunnerTests: XCTestCase { 6 | 7 | func testExample() { 8 | // If you add code to the Runner application, consider adding tests here. 9 | // See https://developer.apple.com/documentation/xctest for more information about using XCTest. 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: web3modal_flutter 2 | description: "WalletConnect Web3Modal: Simple, intuitive wallet login. With this drop-in UI SDK, enable any wallet's users to seamlessly log in to your app and enjoy a unified experience" 3 | version: 3.3.4 4 | repository: https://github.com/WalletConnect/Web3ModalFlutter 5 | 6 | environment: 7 | sdk: '>=2.19.0 <4.0.0' 8 | 9 | dependencies: 10 | appcheck: ^1.5.1 11 | cached_network_image: ^3.3.1 12 | coinbase_wallet_sdk: ^1.0.9 13 | collection: ^1.17.2 14 | convert: ^3.1.1 15 | cupertino_icons: ^1.0.2 16 | custom_sliding_segmented_control: ^1.8.1 17 | flutter: 18 | sdk: flutter 19 | flutter_svg: ^2.0.10+1 20 | freezed_annotation: ^2.4.1 21 | http: ^1.1.2 22 | json_annotation: ^4.8.1 23 | qr_flutter_wc: ^0.0.3 24 | shimmer: ^3.0.0 25 | url_launcher: ^6.2.5 26 | uuid: ^4.3.3 27 | walletconnect_flutter_v2: ^2.3.1 28 | webview_flutter: ^4.7.0 29 | webview_flutter_android: ^3.16.0 30 | webview_flutter_wkwebview: ^3.13.0 31 | 32 | dev_dependencies: 33 | build_runner: ^2.4.7 34 | build_version: ^2.1.1 35 | flutter_test: 36 | sdk: flutter 37 | freezed: ^2.4.7 38 | json_serializable: ^6.7.0 39 | lints: ^3.0.0 40 | mockito: ^5.4.3 41 | network_image_mock: ^2.1.1 42 | 43 | flutter: 44 | uses-material-design: true 45 | 46 | assets: 47 | - assets/ 48 | - assets/dark/ 49 | - assets/light/ 50 | - assets/icons/ 51 | - assets/icons/regular/ 52 | - assets/help/ 53 | - assets/png/ 54 | - assets/png/2.0x/ 55 | - assets/png/3.0x/ 56 | 57 | platforms: 58 | android: 59 | ios: 60 | -------------------------------------------------------------------------------- /scripts/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo ' 🔄 Updating dependencies...' 4 | flutter clean 5 | flutter pub get 6 | flutter pub run build_runner build --delete-conflicting-outputs 7 | 8 | cd ios 9 | 10 | pod install 11 | 12 | cd .. 13 | 14 | cd example 15 | 16 | echo ' ⬇️ Getting dependencies...' 17 | flutter clean 18 | flutter pub get 19 | flutter pub run build_runner build --delete-conflicting-outputs 20 | 21 | cd ios 22 | 23 | pod install 24 | -------------------------------------------------------------------------------- /scripts/deploy.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ $# -eq 0 ]; 4 | then 5 | echo "------------------------------------------------------------------------------------" 6 | echo "$0: Missing argument. Please run this script by passing a valid projectId as argument" 7 | echo "------------------------------------------------------------------------------------" 8 | exit 1 9 | else 10 | sh build.sh 11 | 12 | FILE_VALUE=`cat lib/version.dart` 13 | VERSION=`echo $FILE_VALUE | sed "s/[^']*'\([^']*\)'.*/\1/"` 14 | VNAME=`echo $VERSION | sed "s/+.*//"` 15 | VBUILD=${VERSION#*+} 16 | 17 | cd example 18 | 19 | flutter build apk --build-name $VNAME --build-number $VBUILD --dart-define='PROJECT_ID=$1' 20 | flutter build ipa --build-name $VNAME --build-number $VBUILD --dart-define='PROJECT_ID=$1' 21 | fi -------------------------------------------------------------------------------- /scripts/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ $# -eq 0 ]; 4 | then 5 | echo "------------------------------------------------------------------------------------" 6 | echo "$0: Missing argument. Please run this script by passing a valid projectId as argument" 7 | echo "------------------------------------------------------------------------------------" 8 | exit 1 9 | else 10 | cd example 11 | flutter run --dart-define=PROJECT_ID=$1 -v 12 | fi -------------------------------------------------------------------------------- /scripts/version_up.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | PUBSPEC_FILE=pubspec.yaml 4 | EXAMPLE_PUBSPEC_FILE=example/pubspec.yaml 5 | 6 | FILE_VALUE=$(echo | grep "^version: " $PUBSPEC_FILE) 7 | PARTS=(${FILE_VALUE//:/ }) 8 | FULL_VERSION=${PARTS[1]} 9 | VERSION_NUMBER=(${FULL_VERSION//-/ }) 10 | 11 | echo $FULL_VERSION 12 | echo $VERSION_NUMBER 13 | 14 | awk -F": " -v newval="$VERSION_NUMBER" 'BEGIN{OFS=FS} $1=="version"{$2=newval}1' $EXAMPLE_PUBSPEC_FILE > "$EXAMPLE_PUBSPEC_FILE.tmp" && mv "$EXAMPLE_PUBSPEC_FILE.tmp" $EXAMPLE_PUBSPEC_FILE 15 | 16 | sh scripts/build.sh 17 | 18 | echo 'Setting version '$VERSION_NUMBER' on example apps' 19 | 20 | cd example/ios 21 | 22 | agvtool new-marketing-version $VERSION_NUMBER 23 | agvtool next-version -all 24 | 25 | cd .. 26 | cd .. 27 | 28 | cd example/android 29 | 30 | # Set versionName on gradle.properties 31 | awk -F"=" -v newval="$VERSION_NUMBER" 'BEGIN{OFS=FS} $1=="versionName"{$2=newval}1' gradle.properties > gradle.properties.tmp && mv gradle.properties.tmp gradle.properties 32 | 33 | # Increment versionCode (build number) on gradle.properties 34 | awk -F"=" 'BEGIN{OFS=FS} $1=="versionCode"{$2=$2+1}1' gradle.properties > gradle.properties.tmp && mv gradle.properties.tmp gradle.properties 35 | 36 | cd .. 37 | cd .. 38 | 39 | flutter pub publish --dry-run -------------------------------------------------------------------------------- /test/test_helpers.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | void ignoreOverflowErrors( 4 | FlutterErrorDetails details, { 5 | bool forceReport = false, 6 | }) { 7 | bool ifIsOverflowError = false; 8 | bool isUnableToLoadAsset = false; 9 | 10 | // Detect overflow error. 11 | var exception = details.exception; 12 | if (exception is FlutterError) { 13 | ifIsOverflowError = !exception.diagnostics.any( 14 | (e) => e.value.toString().startsWith('A RenderFlex overflowed by'), 15 | ); 16 | isUnableToLoadAsset = !exception.diagnostics.any( 17 | (e) => e.value.toString().startsWith('Unable to load asset'), 18 | ); 19 | } 20 | 21 | // Ignore if is overflow error. 22 | if (ifIsOverflowError || isUnableToLoadAsset) { 23 | debugPrint('Ignored Error'); 24 | } else { 25 | FlutterError.dumpErrorToConsole(details, forceReport: forceReport); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /web/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/web/favicon.png -------------------------------------------------------------------------------- /web/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/web/icons/Icon-192.png -------------------------------------------------------------------------------- /web/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/web/icons/Icon-512.png -------------------------------------------------------------------------------- /web/icons/Icon-maskable-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/web/icons/Icon-maskable-192.png -------------------------------------------------------------------------------- /web/icons/Icon-maskable-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/web/icons/Icon-maskable-512.png -------------------------------------------------------------------------------- /web/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "web3modal_flutter", 3 | "short_name": "web3modal_flutter", 4 | "start_url": ".", 5 | "display": "standalone", 6 | "background_color": "#0175C2", 7 | "theme_color": "#0175C2", 8 | "description": "A new Flutter project.", 9 | "orientation": "portrait-primary", 10 | "prefer_related_applications": false, 11 | "icons": [ 12 | { 13 | "src": "icons/Icon-192.png", 14 | "sizes": "192x192", 15 | "type": "image/png" 16 | }, 17 | { 18 | "src": "icons/Icon-512.png", 19 | "sizes": "512x512", 20 | "type": "image/png" 21 | }, 22 | { 23 | "src": "icons/Icon-maskable-192.png", 24 | "sizes": "192x192", 25 | "type": "image/png", 26 | "purpose": "maskable" 27 | }, 28 | { 29 | "src": "icons/Icon-maskable-512.png", 30 | "sizes": "512x512", 31 | "type": "image/png", 32 | "purpose": "maskable" 33 | } 34 | ] 35 | } 36 | -------------------------------------------------------------------------------- /windows/.gitignore: -------------------------------------------------------------------------------- 1 | flutter/ephemeral/ 2 | 3 | # Visual Studio user-specific files. 4 | *.suo 5 | *.user 6 | *.userosscache 7 | *.sln.docstates 8 | 9 | # Visual Studio build-related files. 10 | x64/ 11 | x86/ 12 | 13 | # Visual Studio cache files 14 | # files ending in .cache can be ignored 15 | *.[Cc]ache 16 | # but keep track of directories ending in .cache 17 | !*.[Cc]ache/ 18 | -------------------------------------------------------------------------------- /windows/flutter/generated_plugin_registrant.cc: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #include "generated_plugin_registrant.h" 8 | 9 | #include 10 | #include 11 | 12 | void RegisterPlugins(flutter::PluginRegistry* registry) { 13 | ConnectivityPlusWindowsPluginRegisterWithRegistrar( 14 | registry->GetRegistrarForPlugin("ConnectivityPlusWindowsPlugin")); 15 | UrlLauncherWindowsRegisterWithRegistrar( 16 | registry->GetRegistrarForPlugin("UrlLauncherWindows")); 17 | } 18 | -------------------------------------------------------------------------------- /windows/flutter/generated_plugin_registrant.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #ifndef GENERATED_PLUGIN_REGISTRANT_ 8 | #define GENERATED_PLUGIN_REGISTRANT_ 9 | 10 | #include 11 | 12 | // Registers Flutter plugins. 13 | void RegisterPlugins(flutter::PluginRegistry* registry); 14 | 15 | #endif // GENERATED_PLUGIN_REGISTRANT_ 16 | -------------------------------------------------------------------------------- /windows/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | connectivity_plus 7 | url_launcher_windows 8 | ) 9 | 10 | list(APPEND FLUTTER_FFI_PLUGIN_LIST 11 | ) 12 | 13 | set(PLUGIN_BUNDLED_LIBRARIES) 14 | 15 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 16 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin}) 17 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 18 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 19 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 20 | endforeach(plugin) 21 | 22 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) 23 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin}) 24 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) 25 | endforeach(ffi_plugin) 26 | -------------------------------------------------------------------------------- /windows/runner/flutter_window.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_FLUTTER_WINDOW_H_ 2 | #define RUNNER_FLUTTER_WINDOW_H_ 3 | 4 | #include 5 | #include 6 | 7 | #include 8 | 9 | #include "win32_window.h" 10 | 11 | // A window that does nothing but host a Flutter view. 12 | class FlutterWindow : public Win32Window { 13 | public: 14 | // Creates a new FlutterWindow hosting a Flutter view running |project|. 15 | explicit FlutterWindow(const flutter::DartProject& project); 16 | virtual ~FlutterWindow(); 17 | 18 | protected: 19 | // Win32Window: 20 | bool OnCreate() override; 21 | void OnDestroy() override; 22 | LRESULT MessageHandler(HWND window, UINT const message, WPARAM const wparam, 23 | LPARAM const lparam) noexcept override; 24 | 25 | private: 26 | // The project to run. 27 | flutter::DartProject project_; 28 | 29 | // The Flutter instance hosted by this window. 30 | std::unique_ptr flutter_controller_; 31 | }; 32 | 33 | #endif // RUNNER_FLUTTER_WINDOW_H_ 34 | -------------------------------------------------------------------------------- /windows/runner/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include "flutter_window.h" 6 | #include "utils.h" 7 | 8 | int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev, 9 | _In_ wchar_t *command_line, _In_ int show_command) { 10 | // Attach to console when present (e.g., 'flutter run') or create a 11 | // new console when running with a debugger. 12 | if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) { 13 | CreateAndAttachConsole(); 14 | } 15 | 16 | // Initialize COM, so that it is available for use in the library and/or 17 | // plugins. 18 | ::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED); 19 | 20 | flutter::DartProject project(L"data"); 21 | 22 | std::vector command_line_arguments = 23 | GetCommandLineArguments(); 24 | 25 | project.set_dart_entrypoint_arguments(std::move(command_line_arguments)); 26 | 27 | FlutterWindow window(project); 28 | Win32Window::Point origin(10, 10); 29 | Win32Window::Size size(1280, 720); 30 | if (!window.Create(L"web3modal_flutter", origin, size)) { 31 | return EXIT_FAILURE; 32 | } 33 | window.SetQuitOnClose(true); 34 | 35 | ::MSG msg; 36 | while (::GetMessage(&msg, nullptr, 0, 0)) { 37 | ::TranslateMessage(&msg); 38 | ::DispatchMessage(&msg); 39 | } 40 | 41 | ::CoUninitialize(); 42 | return EXIT_SUCCESS; 43 | } 44 | -------------------------------------------------------------------------------- /windows/runner/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by Runner.rc 4 | // 5 | #define IDI_APP_ICON 101 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 102 12 | #define _APS_NEXT_COMMAND_VALUE 40001 13 | #define _APS_NEXT_CONTROL_VALUE 1001 14 | #define _APS_NEXT_SYMED_VALUE 101 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /windows/runner/resources/app_icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WalletConnect/Web3ModalFlutter/ae81f3f630ae891ab1bfe7c0a29c033c08cd9e62/windows/runner/resources/app_icon.ico -------------------------------------------------------------------------------- /windows/runner/runner.exe.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PerMonitorV2 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /windows/runner/utils.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_UTILS_H_ 2 | #define RUNNER_UTILS_H_ 3 | 4 | #include 5 | #include 6 | 7 | // Creates a console for the process, and redirects stdout and stderr to 8 | // it for both the runner and the Flutter library. 9 | void CreateAndAttachConsole(); 10 | 11 | // Takes a null-terminated wchar_t* encoded in UTF-16 and returns a std::string 12 | // encoded in UTF-8. Returns an empty std::string on failure. 13 | std::string Utf8FromUtf16(const wchar_t* utf16_string); 14 | 15 | // Gets the command line arguments passed in as a std::vector, 16 | // encoded in UTF-8. Returns an empty std::vector on failure. 17 | std::vector GetCommandLineArguments(); 18 | 19 | #endif // RUNNER_UTILS_H_ 20 | --------------------------------------------------------------------------------