├── .github
└── ISSUE_TEMPLATE
│ ├── bug_report.md
│ └── feature_request.md
├── .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
├── help_page
│ ├── help_chart.svg
│ ├── help_compass.svg
│ ├── help_dao.svg
│ ├── help_eth.svg
│ ├── help_key.svg
│ ├── help_lock.svg
│ ├── help_noun.svg
│ ├── help_painting.svg
│ └── help_user.svg
├── icons
│ ├── backward.svg
│ ├── checkmark.svg
│ ├── close.svg
│ ├── copy.svg
│ ├── error.svg
│ ├── forward.svg
│ ├── help.svg
│ ├── qr_code.svg
│ ├── scan.svg
│ └── wallet.svg
├── walletconnect_logo_black.svg
├── walletconnect_logo_blue_solid_background.png
├── walletconnect_logo_full_white.svg
├── walletconnect_logo_white.png
└── walletconnect_logo_white.svg
├── build.yaml
├── dartdoc_options.yaml
├── example
├── example.md
└── sign
│ ├── .gitignore
│ ├── .metadata
│ ├── README.md
│ ├── analysis_options.yaml
│ ├── android
│ ├── .gitignore
│ ├── app
│ │ ├── build.gradle
│ │ └── src
│ │ │ ├── debug
│ │ │ └── AndroidManifest.xml
│ │ │ ├── main
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── kotlin
│ │ │ │ └── com
│ │ │ │ │ └── example
│ │ │ │ │ └── sign
│ │ │ │ │ └── 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
│ ├── abis
│ │ └── testContract.abi.json
│ └── flutter_dapp_logo.png
│ ├── 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
│ │ │ │ ├── Contents.json
│ │ │ │ ├── Icon-App-1024x1024@1x.png
│ │ │ │ ├── Icon-App-20x20@1x.png
│ │ │ │ ├── Icon-App-20x20@2x.png
│ │ │ │ ├── Icon-App-20x20@3x.png
│ │ │ │ ├── Icon-App-29x29@1x.png
│ │ │ │ ├── Icon-App-29x29@2x.png
│ │ │ │ ├── Icon-App-29x29@3x.png
│ │ │ │ ├── Icon-App-40x40@1x.png
│ │ │ │ ├── Icon-App-40x40@2x.png
│ │ │ │ ├── Icon-App-40x40@3x.png
│ │ │ │ ├── Icon-App-50x50@1x.png
│ │ │ │ ├── Icon-App-50x50@2x.png
│ │ │ │ ├── Icon-App-57x57@1x.png
│ │ │ │ ├── Icon-App-57x57@2x.png
│ │ │ │ ├── Icon-App-60x60@2x.png
│ │ │ │ ├── Icon-App-60x60@3x.png
│ │ │ │ ├── Icon-App-72x72@1x.png
│ │ │ │ ├── Icon-App-72x72@2x.png
│ │ │ │ ├── Icon-App-76x76@1x.png
│ │ │ │ ├── Icon-App-76x76@2x.png
│ │ │ │ └── Icon-App-83.5x83.5@2x.png
│ │ │ └── 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
│ ├── archived
│ │ ├── pairings_page.dart
│ │ └── sessions_page.dart
│ ├── home_page.dart
│ ├── main.dart
│ ├── models
│ │ ├── accounts.dart
│ │ ├── chain_metadata.dart
│ │ ├── eth
│ │ │ └── ethereum_sign_message.dart
│ │ └── page_data.dart
│ ├── pages
│ │ └── wcm_page.dart
│ ├── polkadot_sample.dart
│ ├── solana_sample.dart
│ ├── utils
│ │ ├── constants.dart
│ │ ├── crypto
│ │ │ ├── chain_data.dart
│ │ │ ├── contract.dart
│ │ │ ├── eip155.dart
│ │ │ ├── helpers.dart
│ │ │ ├── kadena.dart
│ │ │ ├── polkadot.dart
│ │ │ ├── solana.dart
│ │ │ └── test_data.dart
│ │ ├── dart_defines.dart
│ │ └── string_constants.dart
│ └── widgets
│ │ ├── auth_item.dart
│ │ ├── chain_button.dart
│ │ ├── event_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
│ │ │ │ ├── Contents.json
│ │ │ │ ├── app_icon_1024.png
│ │ │ │ ├── app_icon_128.png
│ │ │ │ ├── app_icon_16.png
│ │ │ │ ├── app_icon_256.png
│ │ │ │ ├── app_icon_32.png
│ │ │ │ ├── app_icon_512.png
│ │ │ │ └── app_icon_64.png
│ │ ├── 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
├── generate_files.sh
├── ios
├── .gitignore
├── Flutter
│ ├── AppFrameworkInfo.plist
│ ├── Debug.xcconfig
│ └── Release.xcconfig
├── Podfile
├── 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
│ │ │ ├── Contents.json
│ │ │ ├── Icon-App-1024x1024@1x.png
│ │ │ ├── Icon-App-20x20@1x.png
│ │ │ ├── Icon-App-20x20@2x.png
│ │ │ ├── Icon-App-20x20@3x.png
│ │ │ ├── Icon-App-29x29@1x.png
│ │ │ ├── Icon-App-29x29@2x.png
│ │ │ ├── Icon-App-29x29@3x.png
│ │ │ ├── Icon-App-40x40@1x.png
│ │ │ ├── Icon-App-40x40@2x.png
│ │ │ ├── Icon-App-40x40@3x.png
│ │ │ ├── Icon-App-60x60@2x.png
│ │ │ ├── Icon-App-60x60@3x.png
│ │ │ ├── Icon-App-76x76@1x.png
│ │ │ ├── Icon-App-76x76@2x.png
│ │ │ └── Icon-App-83.5x83.5@2x.png
│ │ └── 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
│ ├── constants.dart
│ ├── namespaces.dart
│ └── string_constants.dart
├── models
│ ├── launch_url_exception.dart
│ ├── listings.dart
│ ├── listings.freezed.dart
│ ├── listings.g.dart
│ ├── walletconnect_modal_theme_data.dart
│ └── walletconnect_modal_theme_data.freezed.dart
├── pages
│ ├── get_wallet_page.dart
│ ├── help_page.dart
│ ├── qr_code_and_wallet_list_page.dart
│ ├── qr_code_page.dart
│ ├── wallet_list_long_page.dart
│ └── wallet_list_short_page.dart
├── services
│ ├── explorer
│ │ ├── explorer_service.dart
│ │ ├── explorer_service_singleton.dart
│ │ └── i_explorer_service.dart
│ ├── storage_service
│ │ ├── i_storage_service.dart
│ │ ├── storage_service.dart
│ │ └── storage_service_singleton.dart
│ ├── utils
│ │ ├── core
│ │ │ ├── core_utils.dart
│ │ │ ├── core_utils_singleton.dart
│ │ │ └── i_core_utils.dart
│ │ ├── logger
│ │ │ └── logger_util.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
│ │ │ ├── url_utils.dart
│ │ │ └── url_utils_singleton.dart
│ │ └── widget_stack
│ │ │ ├── i_widget_stack.dart
│ │ │ ├── widget_stack.dart
│ │ │ └── widget_stack_singleton.dart
│ ├── walletconnect_modal
│ │ ├── i_walletconnect_modal_service.dart
│ │ └── walletconnect_modal_service.dart
│ └── walletconnect_modal_services.dart
├── version.dart
├── walletconnect_modal_flutter.dart
└── widgets
│ ├── grid_list
│ ├── grid_list.dart
│ ├── grid_list_item.dart
│ ├── grid_list_item_model.dart
│ ├── grid_list_provider.dart
│ └── grid_list_wallet_item.dart
│ ├── qr_code_widget.dart
│ ├── toast
│ ├── walletconnect_modal_toast.dart
│ └── walletconnect_modal_toast_manager.dart
│ ├── transition_container.dart
│ ├── wallet_image.dart
│ ├── walletconnect_icon_button.dart
│ ├── walletconnect_modal.dart
│ ├── walletconnect_modal_button.dart
│ ├── walletconnect_modal_connect.dart
│ ├── walletconnect_modal_navbar.dart
│ ├── walletconnect_modal_navbar_title.dart
│ ├── walletconnect_modal_provider.dart
│ ├── walletconnect_modal_search_bar.dart
│ └── walletconnect_modal_theme.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
│ │ │ ├── Contents.json
│ │ │ ├── app_icon_1024.png
│ │ │ ├── app_icon_128.png
│ │ │ ├── app_icon_16.png
│ │ │ ├── app_icon_256.png
│ │ │ ├── app_icon_32.png
│ │ │ ├── app_icon_512.png
│ │ │ └── app_icon_64.png
│ ├── 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
├── explorer
│ └── explorer_test.dart
├── get_a_wallet
│ └── get_a_wallet_test.dart
├── mock_classes.dart
├── mock_classes.mocks.dart
├── test_data.dart
├── test_helpers.dart
├── utils
│ ├── core_utils_test.dart
│ ├── platform_utils_test.dart
│ └── url_utils_test.dart
├── walletconnect_modal
│ └── walletconnect_modal_test.dart
├── walletconnect_modal_connect
│ └── walletconnect_modal_connect_ui_test.dart
└── walletconnect_modal_service
│ ├── walletconnect_modal_service_ui_test.dart
│ └── walletconnect_modal_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 | **Expected behavior**
21 | A clear and concise description of what you expected to happen.
22 |
23 | **Screenshots**
24 | If applicable, add screenshots to help explain your problem.
25 |
26 | **Desktop (please complete the following information):**
27 | - OS: [e.g. iOS]
28 | - Browser [e.g. chrome, safari]
29 | - Version [e.g. 22]
30 |
31 | **Smartphone (please complete the following information):**
32 | - Device: [e.g. iPhone6]
33 | - OS: [e.g. iOS8.1]
34 | - Browser [e.g. stock browser, safari]
35 | - Version [e.g. 22]
36 |
37 | **Additional context**
38 | Add any other context about the problem here.
39 |
--------------------------------------------------------------------------------
/.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 |
--------------------------------------------------------------------------------
/.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 |
--------------------------------------------------------------------------------
/.metadata:
--------------------------------------------------------------------------------
1 | # This file tracks properties of this Flutter project.
2 | # Used by Flutter tool to assess capabilities and perform upgrades etc.
3 | #
4 | # This file should be version controlled.
5 |
6 | version:
7 | revision: d3d8effc686d73e0114d71abdcccef63fa1f25d2
8 | channel: stable
9 |
10 | project_type: app
11 |
12 | # Tracks metadata for the flutter migrate command
13 | migration:
14 | platforms:
15 | - platform: root
16 | create_revision: d3d8effc686d73e0114d71abdcccef63fa1f25d2
17 | base_revision: d3d8effc686d73e0114d71abdcccef63fa1f25d2
18 | - platform: android
19 | create_revision: d3d8effc686d73e0114d71abdcccef63fa1f25d2
20 | base_revision: d3d8effc686d73e0114d71abdcccef63fa1f25d2
21 | - platform: ios
22 | create_revision: d3d8effc686d73e0114d71abdcccef63fa1f25d2
23 | base_revision: d3d8effc686d73e0114d71abdcccef63fa1f25d2
24 | - platform: linux
25 | create_revision: d3d8effc686d73e0114d71abdcccef63fa1f25d2
26 | base_revision: d3d8effc686d73e0114d71abdcccef63fa1f25d2
27 | - platform: macos
28 | create_revision: d3d8effc686d73e0114d71abdcccef63fa1f25d2
29 | base_revision: d3d8effc686d73e0114d71abdcccef63fa1f25d2
30 | - platform: web
31 | create_revision: d3d8effc686d73e0114d71abdcccef63fa1f25d2
32 | base_revision: d3d8effc686d73e0114d71abdcccef63fa1f25d2
33 | - platform: windows
34 | create_revision: d3d8effc686d73e0114d71abdcccef63fa1f25d2
35 | base_revision: d3d8effc686d73e0114d71abdcccef63fa1f25d2
36 |
37 | # User provided section
38 |
39 | # List of Local paths (relative to this file) that should be
40 | # ignored by the migrate tool.
41 | #
42 | # Files that are not part of the templates will be ignored by default.
43 | unmanaged_files:
44 | - 'lib/main.dart'
45 | - 'ios/Runner.xcodeproj/project.pbxproj'
46 |
--------------------------------------------------------------------------------
/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:lints/recommended.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 | non_constant_identifier_names: false
26 | constant_identifier_names: false
27 | avoid_print: true
28 | prefer_single_quotes: true
29 | sort_pub_dependencies: true
30 | avoid_unnecessary_containers: true
31 | cancel_subscriptions: true
32 |
33 | analyzer:
34 | exclude:
35 | - '**.freezed.dart'
36 | - '**.g.dart'
37 | - '**/*.freezed.dart'
38 | - '**/*.g.dart'
39 | - '**/generated_plugin_registrant.dart'
40 | errors:
41 | invalid_annotation_target: ignore
42 |
43 | # Additional information about this file can be found at
44 | # https://dart.dev/guides/language/analysis-options
45 |
--------------------------------------------------------------------------------
/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/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
14 |
18 |
22 |
23 |
24 |
25 |
26 |
27 |
29 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/android/app/src/main/kotlin/com/example/web3modal_flutter/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.example.walletconnect_modal_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/WalletConnectModalFlutter/867326d9eb1bb06abc3ff0889c9d56e7e8680496/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/WalletConnectModalFlutter/867326d9eb1bb06abc3ff0889c9d56e7e8680496/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/WalletConnectModalFlutter/867326d9eb1bb06abc3ff0889c9d56e7e8680496/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/WalletConnectModalFlutter/867326d9eb1bb06abc3ff0889c9d56e7e8680496/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/WalletConnectModalFlutter/867326d9eb1bb06abc3ff0889c9d56e7e8680496/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/help_page/help_noun.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
13 |
--------------------------------------------------------------------------------
/assets/help_page/help_user.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
13 |
--------------------------------------------------------------------------------
/assets/icons/backward.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/assets/icons/checkmark.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/assets/icons/close.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/assets/icons/error.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/assets/icons/forward.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/assets/icons/help.svg:
--------------------------------------------------------------------------------
1 |
5 |
--------------------------------------------------------------------------------
/assets/icons/wallet.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/assets/walletconnect_logo_blue_solid_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WalletConnect/WalletConnectModalFlutter/867326d9eb1bb06abc3ff0889c9d56e7e8680496/assets/walletconnect_logo_blue_solid_background.png
--------------------------------------------------------------------------------
/assets/walletconnect_logo_white.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WalletConnect/WalletConnectModalFlutter/867326d9eb1bb06abc3ff0889c9d56e7e8680496/assets/walletconnect_logo_white.png
--------------------------------------------------------------------------------
/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
--------------------------------------------------------------------------------
/dartdoc_options.yaml:
--------------------------------------------------------------------------------
1 | dartdoc:
2 | include: ["walletconnect_modal_flutter", "walletconnect_flutter_v2"]
3 |
--------------------------------------------------------------------------------
/example/example.md:
--------------------------------------------------------------------------------
1 | Check out the [example app](https://github.com/WalletConnect/WalletConnectModalFlutter/tree/master/example/sign)
--------------------------------------------------------------------------------
/example/sign/.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 | # Run scripts
47 | *.sh
--------------------------------------------------------------------------------
/example/sign/.metadata:
--------------------------------------------------------------------------------
1 | # This file tracks properties of this Flutter project.
2 | # Used by Flutter tool to assess capabilities and perform upgrades etc.
3 | #
4 | # This file should be version controlled.
5 |
6 | version:
7 | revision: d3d8effc686d73e0114d71abdcccef63fa1f25d2
8 | channel: stable
9 |
10 | project_type: app
11 |
12 | # Tracks metadata for the flutter migrate command
13 | migration:
14 | platforms:
15 | - platform: root
16 | create_revision: d3d8effc686d73e0114d71abdcccef63fa1f25d2
17 | base_revision: d3d8effc686d73e0114d71abdcccef63fa1f25d2
18 | - platform: android
19 | create_revision: d3d8effc686d73e0114d71abdcccef63fa1f25d2
20 | base_revision: d3d8effc686d73e0114d71abdcccef63fa1f25d2
21 | - platform: ios
22 | create_revision: d3d8effc686d73e0114d71abdcccef63fa1f25d2
23 | base_revision: d3d8effc686d73e0114d71abdcccef63fa1f25d2
24 | - platform: linux
25 | create_revision: d3d8effc686d73e0114d71abdcccef63fa1f25d2
26 | base_revision: d3d8effc686d73e0114d71abdcccef63fa1f25d2
27 | - platform: macos
28 | create_revision: d3d8effc686d73e0114d71abdcccef63fa1f25d2
29 | base_revision: d3d8effc686d73e0114d71abdcccef63fa1f25d2
30 | - platform: web
31 | create_revision: d3d8effc686d73e0114d71abdcccef63fa1f25d2
32 | base_revision: d3d8effc686d73e0114d71abdcccef63fa1f25d2
33 | - platform: windows
34 | create_revision: d3d8effc686d73e0114d71abdcccef63fa1f25d2
35 | base_revision: d3d8effc686d73e0114d71abdcccef63fa1f25d2
36 |
37 | # User provided section
38 |
39 | # List of Local paths (relative to this file) that should be
40 | # ignored by the migrate tool.
41 | #
42 | # Files that are not part of the templates will be ignored by default.
43 | unmanaged_files:
44 | - 'lib/main.dart'
45 | - 'ios/Runner.xcodeproj/project.pbxproj'
46 |
--------------------------------------------------------------------------------
/example/sign/README.md:
--------------------------------------------------------------------------------
1 | # walletconnect_flutter_dapp
2 |
3 | A new Flutter project.
4 |
5 | ## Getting Started
6 |
7 | This project is a starting point for a Flutter application.
8 |
9 | A few resources to get you started if this is your first Flutter project:
10 |
11 | - [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
12 | - [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
13 |
14 | For help getting started with Flutter development, view the
15 | [online documentation](https://docs.flutter.dev/), which offers tutorials,
16 | samples, guidance on mobile development, and a full API reference.
17 |
--------------------------------------------------------------------------------
/example/sign/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/sign/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/sign/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/example/sign/android/app/src/main/kotlin/com/example/sign/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.walletconnect.flutterdapp
2 |
3 | import io.flutter.embedding.android.FlutterActivity
4 |
5 | class MainActivity: FlutterActivity() {
6 | }
7 |
--------------------------------------------------------------------------------
/example/sign/android/app/src/main/res/drawable-v21/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/example/sign/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/example/sign/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WalletConnect/WalletConnectModalFlutter/867326d9eb1bb06abc3ff0889c9d56e7e8680496/example/sign/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/sign/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WalletConnect/WalletConnectModalFlutter/867326d9eb1bb06abc3ff0889c9d56e7e8680496/example/sign/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/sign/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WalletConnect/WalletConnectModalFlutter/867326d9eb1bb06abc3ff0889c9d56e7e8680496/example/sign/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/sign/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WalletConnect/WalletConnectModalFlutter/867326d9eb1bb06abc3ff0889c9d56e7e8680496/example/sign/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/sign/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WalletConnect/WalletConnectModalFlutter/867326d9eb1bb06abc3ff0889c9d56e7e8680496/example/sign/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/sign/android/app/src/main/res/values-night/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/example/sign/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/example/sign/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/example/sign/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/sign/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 | android.useAndroidX=true
3 | android.enableJetifier=true
4 |
--------------------------------------------------------------------------------
/example/sign/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/sign/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/sign/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/sign/assets/flutter_dapp_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WalletConnect/WalletConnectModalFlutter/867326d9eb1bb06abc3ff0889c9d56e7e8680496/example/sign/assets/flutter_dapp_logo.png
--------------------------------------------------------------------------------
/example/sign/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 |
--------------------------------------------------------------------------------
/example/sign/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/sign/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
2 | #include "Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/example/sign/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
2 | #include "Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/example/sign/ios/Podfile:
--------------------------------------------------------------------------------
1 | # Uncomment this line to define a global platform for your project
2 | # platform :ios, '12.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 |
--------------------------------------------------------------------------------
/example/sign/ios/Podfile.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - appcheck (1.0.3):
3 | - Flutter
4 | - Flutter (1.0.0)
5 | - flutter_keyboard_visibility (0.0.1):
6 | - Flutter
7 | - package_info_plus (0.4.5):
8 | - Flutter
9 | - shared_preferences_foundation (0.0.1):
10 | - Flutter
11 | - FlutterMacOS
12 | - url_launcher_ios (0.0.1):
13 | - Flutter
14 |
15 | DEPENDENCIES:
16 | - appcheck (from `.symlinks/plugins/appcheck/ios`)
17 | - Flutter (from `Flutter`)
18 | - flutter_keyboard_visibility (from `.symlinks/plugins/flutter_keyboard_visibility/ios`)
19 | - package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
20 | - shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
21 | - url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
22 |
23 | EXTERNAL SOURCES:
24 | appcheck:
25 | :path: ".symlinks/plugins/appcheck/ios"
26 | Flutter:
27 | :path: Flutter
28 | flutter_keyboard_visibility:
29 | :path: ".symlinks/plugins/flutter_keyboard_visibility/ios"
30 | package_info_plus:
31 | :path: ".symlinks/plugins/package_info_plus/ios"
32 | shared_preferences_foundation:
33 | :path: ".symlinks/plugins/shared_preferences_foundation/darwin"
34 | url_launcher_ios:
35 | :path: ".symlinks/plugins/url_launcher_ios/ios"
36 |
37 | SPEC CHECKSUMS:
38 | appcheck: e1ab9d4e03736f03e0401554a134d1ed502d7629
39 | Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
40 | flutter_keyboard_visibility: 0339d06371254c3eb25eeb90ba8d17dca8f9c069
41 | package_info_plus: 58f0028419748fad15bf008b270aaa8e54380b1c
42 | shared_preferences_foundation: b4c3b4cddf1c21f02770737f147a3f5da9d39695
43 | url_launcher_ios: 6116280ddcfe98ab8820085d8d76ae7449447586
44 |
45 | PODFILE CHECKSUM: 819463e6a0290f5a72f145ba7cde16e8b6ef0796
46 |
47 | COCOAPODS: 1.15.2
48 |
--------------------------------------------------------------------------------
/example/sign/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/example/sign/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/sign/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/sign/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/example/sign/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/sign/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/sign/ios/Runner/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 | import Flutter
3 |
4 | @UIApplicationMain
5 | @objc class AppDelegate: FlutterAppDelegate {
6 | override func application(
7 | _ application: UIApplication,
8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
9 | ) -> Bool {
10 | GeneratedPluginRegistrant.register(with: self)
11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions)
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/example/sign/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WalletConnect/WalletConnectModalFlutter/867326d9eb1bb06abc3ff0889c9d56e7e8680496/example/sign/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
--------------------------------------------------------------------------------
/example/sign/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WalletConnect/WalletConnectModalFlutter/867326d9eb1bb06abc3ff0889c9d56e7e8680496/example/sign/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
--------------------------------------------------------------------------------
/example/sign/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WalletConnect/WalletConnectModalFlutter/867326d9eb1bb06abc3ff0889c9d56e7e8680496/example/sign/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
--------------------------------------------------------------------------------
/example/sign/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WalletConnect/WalletConnectModalFlutter/867326d9eb1bb06abc3ff0889c9d56e7e8680496/example/sign/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
--------------------------------------------------------------------------------
/example/sign/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WalletConnect/WalletConnectModalFlutter/867326d9eb1bb06abc3ff0889c9d56e7e8680496/example/sign/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
--------------------------------------------------------------------------------
/example/sign/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WalletConnect/WalletConnectModalFlutter/867326d9eb1bb06abc3ff0889c9d56e7e8680496/example/sign/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
--------------------------------------------------------------------------------
/example/sign/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WalletConnect/WalletConnectModalFlutter/867326d9eb1bb06abc3ff0889c9d56e7e8680496/example/sign/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
--------------------------------------------------------------------------------
/example/sign/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WalletConnect/WalletConnectModalFlutter/867326d9eb1bb06abc3ff0889c9d56e7e8680496/example/sign/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
--------------------------------------------------------------------------------
/example/sign/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WalletConnect/WalletConnectModalFlutter/867326d9eb1bb06abc3ff0889c9d56e7e8680496/example/sign/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
--------------------------------------------------------------------------------
/example/sign/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WalletConnect/WalletConnectModalFlutter/867326d9eb1bb06abc3ff0889c9d56e7e8680496/example/sign/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
--------------------------------------------------------------------------------
/example/sign/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WalletConnect/WalletConnectModalFlutter/867326d9eb1bb06abc3ff0889c9d56e7e8680496/example/sign/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png
--------------------------------------------------------------------------------
/example/sign/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WalletConnect/WalletConnectModalFlutter/867326d9eb1bb06abc3ff0889c9d56e7e8680496/example/sign/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png
--------------------------------------------------------------------------------
/example/sign/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WalletConnect/WalletConnectModalFlutter/867326d9eb1bb06abc3ff0889c9d56e7e8680496/example/sign/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png
--------------------------------------------------------------------------------
/example/sign/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WalletConnect/WalletConnectModalFlutter/867326d9eb1bb06abc3ff0889c9d56e7e8680496/example/sign/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png
--------------------------------------------------------------------------------
/example/sign/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WalletConnect/WalletConnectModalFlutter/867326d9eb1bb06abc3ff0889c9d56e7e8680496/example/sign/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
--------------------------------------------------------------------------------
/example/sign/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WalletConnect/WalletConnectModalFlutter/867326d9eb1bb06abc3ff0889c9d56e7e8680496/example/sign/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
--------------------------------------------------------------------------------
/example/sign/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WalletConnect/WalletConnectModalFlutter/867326d9eb1bb06abc3ff0889c9d56e7e8680496/example/sign/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png
--------------------------------------------------------------------------------
/example/sign/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WalletConnect/WalletConnectModalFlutter/867326d9eb1bb06abc3ff0889c9d56e7e8680496/example/sign/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png
--------------------------------------------------------------------------------
/example/sign/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WalletConnect/WalletConnectModalFlutter/867326d9eb1bb06abc3ff0889c9d56e7e8680496/example/sign/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
--------------------------------------------------------------------------------
/example/sign/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WalletConnect/WalletConnectModalFlutter/867326d9eb1bb06abc3ff0889c9d56e7e8680496/example/sign/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/example/sign/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WalletConnect/WalletConnectModalFlutter/867326d9eb1bb06abc3ff0889c9d56e7e8680496/example/sign/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/example/sign/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 |
--------------------------------------------------------------------------------
/example/sign/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WalletConnect/WalletConnectModalFlutter/867326d9eb1bb06abc3ff0889c9d56e7e8680496/example/sign/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/example/sign/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WalletConnect/WalletConnectModalFlutter/867326d9eb1bb06abc3ff0889c9d56e7e8680496/example/sign/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/example/sign/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WalletConnect/WalletConnectModalFlutter/867326d9eb1bb06abc3ff0889c9d56e7e8680496/example/sign/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/example/sign/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.
--------------------------------------------------------------------------------
/example/sign/ios/Runner/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/example/sign/ios/Runner/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import "GeneratedPluginRegistrant.h"
2 |
--------------------------------------------------------------------------------
/example/sign/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/sign/lib/models/accounts.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/foundation.dart';
2 |
3 | class AccountDetails {
4 | final String address;
5 | final String chain;
6 |
7 | const AccountDetails({
8 | required this.address,
9 | required this.chain,
10 | });
11 |
12 | @override
13 | bool operator ==(Object other) {
14 | if (identical(this, other)) return true;
15 |
16 | return other is AccountDetails &&
17 | other.address == address &&
18 | other.chain == chain;
19 | }
20 |
21 | @override
22 | int get hashCode => address.hashCode ^ chain.hashCode;
23 | }
24 |
25 | class Account {
26 | final int id;
27 | final String name;
28 | final String mnemonic;
29 | final String privateKey;
30 | final List details;
31 |
32 | const Account({
33 | required this.id,
34 | required this.name,
35 | required this.mnemonic,
36 | required this.privateKey,
37 | required this.details,
38 | });
39 |
40 | Account copyWith({
41 | int? id,
42 | String? name,
43 | String? mnemonic,
44 | String? privateKey,
45 | List? details,
46 | }) {
47 | return Account(
48 | id: id ?? this.id,
49 | name: name ?? this.name,
50 | mnemonic: mnemonic ?? this.mnemonic,
51 | privateKey: privateKey ?? this.privateKey,
52 | details: details ?? this.details,
53 | );
54 | }
55 |
56 | @override
57 | bool operator ==(Object other) {
58 | if (identical(this, other)) return true;
59 |
60 | return other is Account &&
61 | other.id == id &&
62 | other.name == name &&
63 | other.mnemonic == mnemonic &&
64 | other.privateKey == privateKey &&
65 | listEquals(other.details, details);
66 | }
67 |
68 | @override
69 | int get hashCode {
70 | return id.hashCode ^
71 | name.hashCode ^
72 | mnemonic.hashCode ^
73 | privateKey.hashCode ^
74 | details.hashCode;
75 | }
76 | }
77 |
--------------------------------------------------------------------------------
/example/sign/lib/models/chain_metadata.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:walletconnect_flutter_v2/walletconnect_flutter_v2.dart';
3 |
4 | enum ChainType {
5 | eip155,
6 | solana,
7 | kadena,
8 | polkadot,
9 | }
10 |
11 | class ChainMetadata {
12 | final Color color;
13 | final ChainType type;
14 | final String chainName;
15 | final String chainId;
16 | final String namespace;
17 | final String chainIcon;
18 | final String tokenName;
19 | final Map requiredNamespaces;
20 | final Map optionalNamespaces;
21 | final String rpcUrl;
22 |
23 | const ChainMetadata({
24 | required this.color,
25 | required this.type,
26 | required this.chainName,
27 | required this.chainId,
28 | required this.namespace,
29 | required this.chainIcon,
30 | required this.tokenName,
31 | required this.requiredNamespaces,
32 | required this.optionalNamespaces,
33 | required this.rpcUrl,
34 | });
35 |
36 | @override
37 | bool operator ==(Object other) {
38 | if (identical(this, other)) return true;
39 |
40 | return other is ChainMetadata &&
41 | other.color == color &&
42 | other.type == type &&
43 | other.chainName == chainName &&
44 | other.chainId == chainId &&
45 | other.namespace == namespace &&
46 | other.chainIcon == chainIcon &&
47 | other.tokenName == tokenName &&
48 | other.requiredNamespaces == requiredNamespaces &&
49 | other.optionalNamespaces == optionalNamespaces &&
50 | other.rpcUrl == rpcUrl;
51 | }
52 |
53 | @override
54 | int get hashCode {
55 | return color.hashCode ^
56 | type.hashCode ^
57 | chainName.hashCode ^
58 | chainId.hashCode ^
59 | namespace.hashCode ^
60 | chainIcon.hashCode ^
61 | tokenName.hashCode ^
62 | requiredNamespaces.hashCode ^
63 | optionalNamespaces.hashCode ^
64 | rpcUrl.hashCode;
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/example/sign/lib/models/eth/ethereum_sign_message.dart:
--------------------------------------------------------------------------------
1 | enum WCSignType {
2 | message,
3 | personalMessage,
4 | typedMessageV2,
5 | typedMessageV3,
6 | typedMessageV4,
7 | }
8 |
9 | class EthereumSignMessage {
10 | final String data;
11 | final String address;
12 | final WCSignType type;
13 |
14 | const EthereumSignMessage({
15 | required this.data,
16 | required this.address,
17 | required this.type,
18 | });
19 | }
20 |
--------------------------------------------------------------------------------
/example/sign/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/sign/lib/utils/constants.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class Constants {
4 | static const smallScreen = 640;
5 |
6 | static const String aud = 'https://walletconnect.org/login';
7 | static const String domain = 'walletconnect.org';
8 |
9 | static const String signPageTypeKey = 'signPageType';
10 | }
11 |
12 | class StyleConstants {
13 | static const Color primaryColor = Color.fromARGB(255, 16, 165, 206);
14 | static const Color secondaryColor = Color(0xFF1A1A1A);
15 | static const Color grayColor = Color.fromARGB(255, 180, 180, 180);
16 | static const Color titleTextColor = Color(0xFFFFFFFF);
17 |
18 | // Linear
19 | static const double linear8 = 8;
20 | static const double linear16 = 16;
21 | static const double linear24 = 24;
22 | static const double linear32 = 32;
23 | static const double linear48 = 48;
24 | static const double linear56 = 56;
25 | static const double linear72 = 72;
26 | static const double linear80 = 80;
27 |
28 | // Magic Number
29 | static const double magic10 = 10;
30 | static const double magic14 = 14;
31 | static const double magic20 = 20;
32 | static const double magic40 = 40;
33 | static const double magic64 = 64;
34 |
35 | // Width
36 | static const double maxWidth = 400;
37 |
38 | // Text styles
39 | static const TextStyle titleText = TextStyle(
40 | color: Colors.black,
41 | fontSize: magic40,
42 | fontWeight: FontWeight.w600,
43 | );
44 | static const TextStyle subtitleText = TextStyle(
45 | color: Colors.black,
46 | fontSize: linear24,
47 | fontWeight: FontWeight.w600,
48 | );
49 | static const TextStyle buttonText = TextStyle(
50 | color: Colors.black,
51 | fontSize: magic14,
52 | fontWeight: FontWeight.w600,
53 | );
54 | }
55 |
--------------------------------------------------------------------------------
/example/sign/lib/utils/crypto/contract.dart:
--------------------------------------------------------------------------------
1 | class ContractDetails {
2 | // Tether (USDT)
3 | static const contractAddress = '0xdac17f958d2ee523a2206206994597c13d831ec7';
4 |
5 | // vitalik.eth
6 | static const balanceAddress = '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045';
7 |
8 | static const readContractAbi = [
9 | {
10 | 'constant': true,
11 | 'inputs': [],
12 | 'name': 'name',
13 | 'outputs': [
14 | {
15 | 'name': '',
16 | 'type': 'string',
17 | },
18 | ],
19 | 'payable': false,
20 | 'stateMutability': 'view',
21 | 'type': 'function',
22 | },
23 | {
24 | 'constant': true,
25 | 'inputs': [],
26 | 'name': 'symbol',
27 | 'outputs': [
28 | {
29 | 'name': '',
30 | 'type': 'string',
31 | },
32 | ],
33 | 'payable': false,
34 | 'stateMutability': 'view',
35 | 'type': 'function',
36 | },
37 | {
38 | 'constant': true,
39 | 'inputs': [],
40 | 'name': 'totalSupply',
41 | 'outputs': [
42 | {
43 | 'name': '',
44 | 'type': 'uint256',
45 | },
46 | ],
47 | 'payable': false,
48 | 'stateMutability': 'view',
49 | 'type': 'function',
50 | },
51 | {
52 | 'constant': true,
53 | 'inputs': [
54 | {
55 | 'name': '_owner',
56 | 'type': 'address',
57 | },
58 | ],
59 | 'name': 'balanceOf',
60 | 'outputs': [
61 | {
62 | 'name': 'balance',
63 | 'type': 'uint256',
64 | },
65 | ],
66 | 'payable': false,
67 | 'stateMutability': 'view',
68 | 'type': 'function',
69 | },
70 | ];
71 |
72 | static const getFilterChangesAbi = [
73 | 'event Transfer(address indexed from, address indexed to, uint amount)',
74 | ];
75 | }
76 |
--------------------------------------------------------------------------------
/example/sign/lib/utils/crypto/helpers.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:walletconnect_flutter_dapp/models/chain_metadata.dart';
3 | import 'package:walletconnect_flutter_dapp/utils/crypto/chain_data.dart';
4 | import 'package:walletconnect_flutter_dapp/utils/crypto/eip155.dart';
5 | import 'package:walletconnect_flutter_dapp/utils/crypto/polkadot.dart';
6 | import 'package:walletconnect_flutter_dapp/utils/crypto/solana.dart';
7 |
8 | ChainMetadata getChainMetadataFromChain(String namespace) {
9 | try {
10 | return ChainData.chains
11 | .where((element) => element.namespace == namespace)
12 | .first;
13 | } catch (e) {
14 | debugPrint('getChainMetadataFromChain, Invalid chain: $namespace');
15 | }
16 | return ChainData.chains[0];
17 | }
18 |
19 | List getChainEvents(ChainType value) {
20 | if (value == ChainType.solana) {
21 | return [];
22 | } else if (value == ChainType.kadena) {
23 | return EIP155.events.values.toList(); //Kadena.events.values.toList();
24 | } else if (value == ChainType.eip155) {
25 | return EIP155.events.values.toList();
26 | } else {
27 | return [];
28 | }
29 | }
30 |
31 | List getUIChainMethods(ChainType value) {
32 | if (value == ChainType.solana) {
33 | return Solana.methods;
34 | } else if (value == ChainType.kadena) {
35 | return EIP155.methods.values.toList(); //Kadena.methods.values.toList();
36 | } else if (value == ChainType.polkadot) {
37 | return Polkadot.methods;
38 | } else if (value == ChainType.eip155) {
39 | return EIP155.methods.values.toList();
40 | } else {
41 | return [];
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/example/sign/lib/utils/dart_defines.dart:
--------------------------------------------------------------------------------
1 | class DartDefines {
2 | static const String projectId = String.fromEnvironment(
3 | 'PROJECT_ID',
4 | );
5 | }
6 |
--------------------------------------------------------------------------------
/example/sign/lib/utils/string_constants.dart:
--------------------------------------------------------------------------------
1 | class StringConstants {
2 | // General
3 | static const String cancel = 'Cancel';
4 | static const String close = 'Close';
5 | static const String ok = 'OK';
6 | static const String delete = 'Delete';
7 |
8 | // Main Page
9 | static const String appTitle = 'WalletConnect v2 Flutter dApp Demo';
10 | static const String basicPageTitle = 'Basic';
11 | static const String wcmPageTitle = 'WalletConnect Modal';
12 | static const String w3mPageTitle = 'Web3Modal';
13 | static const String pairingsPageTitle = 'Pairings';
14 | static const String sessionsPageTitle = 'Sessions';
15 | static const String authPageTitle = 'Auth';
16 | static const String settingsPageTitle = 'Settings';
17 | static const String receivedPing = 'Received Ping';
18 | static const String receivedEvent = 'Received Event';
19 |
20 | // Sign Page
21 | static const String selectChains = 'Select chains:';
22 | static const String testnetsOnly = 'Testnets only?';
23 | static const String scanQrCode = 'Scan the code';
24 | static const String copiedToClipboard = 'Copied to clipboard';
25 | static const String bareBonesSign = 'Connect Bare Bones';
26 | static const String connectionEstablished = 'Session established';
27 | static const String connectionFailed = 'Session setup failed';
28 | static const String authSucceeded = 'Authentication Successful';
29 | static const String authFailed = 'Authentication Failed';
30 |
31 | // Pairings Page
32 | static const String pairings = 'Pairings';
33 | static const String deletePairing = 'Delete Pairing?';
34 |
35 | // Sessions Page
36 | static const String sessions = 'Sessions';
37 | static const String noSessionSelected = 'No session selected';
38 | static const String sessionTopic = 'Session Topic: ';
39 | static const String methods = 'Methods';
40 | static const String events = 'Events';
41 | }
42 |
--------------------------------------------------------------------------------
/example/sign/lib/widgets/auth_item.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:walletconnect_flutter_v2/walletconnect_flutter_v2.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/sign/lib/widgets/chain_button.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:walletconnect_flutter_dapp/models/chain_metadata.dart';
3 | import 'package:walletconnect_flutter_dapp/utils/constants.dart';
4 |
5 | class ChainButton extends StatelessWidget {
6 | const ChainButton({
7 | super.key,
8 | required this.chain,
9 | required this.onPressed,
10 | this.selected = false,
11 | });
12 |
13 | final ChainMetadata chain;
14 | final VoidCallback onPressed;
15 | final bool selected;
16 |
17 | @override
18 | Widget build(BuildContext context) {
19 | return Container(
20 | width: (MediaQuery.of(context).size.width / 2) - 14,
21 | height: StyleConstants.linear48,
22 | margin: const EdgeInsets.symmetric(
23 | vertical: StyleConstants.linear8,
24 | ),
25 | child: ElevatedButton(
26 | onPressed: onPressed,
27 | style: ButtonStyle(
28 | backgroundColor: MaterialStateProperty.all(
29 | selected ? Colors.grey.shade400 : Colors.white,
30 | ),
31 | shape: MaterialStateProperty.all(
32 | RoundedRectangleBorder(
33 | side: BorderSide(
34 | color: selected ? Colors.grey.shade400 : chain.color,
35 | width: selected ? 4 : 2,
36 | ),
37 | borderRadius: BorderRadius.circular(
38 | StyleConstants.linear8,
39 | ),
40 | ),
41 | ),
42 | ),
43 | child: Text(
44 | chain.chainName,
45 | style: StyleConstants.buttonText,
46 | ),
47 | ),
48 | );
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/example/sign/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/sign/lib/widgets/pairing_item.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:walletconnect_flutter_v2/walletconnect_flutter_v2.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/sign/lib/widgets/session_item.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:walletconnect_flutter_v2/walletconnect_flutter_v2.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/sign/linux/.gitignore:
--------------------------------------------------------------------------------
1 | flutter/ephemeral
2 |
--------------------------------------------------------------------------------
/example/sign/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/sign/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/sign/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/sign/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/sign/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/sign/macos/.gitignore:
--------------------------------------------------------------------------------
1 | # Flutter-related
2 | **/Flutter/ephemeral/
3 | **/Pods/
4 |
5 | # Xcode-related
6 | **/dgph
7 | **/xcuserdata/
8 |
--------------------------------------------------------------------------------
/example/sign/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/sign/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/sign/macos/Flutter/GeneratedPluginRegistrant.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Generated file. Do not edit.
3 | //
4 |
5 | import FlutterMacOS
6 | import Foundation
7 |
8 | import package_info_plus
9 | import shared_preferences_foundation
10 | import url_launcher_macos
11 |
12 | func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
13 | FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin"))
14 | SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
15 | UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))
16 | }
17 |
--------------------------------------------------------------------------------
/example/sign/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/sign/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: 5b919d13b803cadd15ed2dc053125c68730e5126
25 | url_launcher_macos: d2691c7dd33ed713bf3544850a623080ec693d95
26 |
27 | PODFILE CHECKSUM: 236401fc2c932af29a9fcf0e97baeeb2d750d367
28 |
29 | COCOAPODS: 1.11.3
30 |
--------------------------------------------------------------------------------
/example/sign/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/sign/macos/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/example/sign/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/sign/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/sign/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "16x16",
5 | "idiom" : "mac",
6 | "filename" : "app_icon_16.png",
7 | "scale" : "1x"
8 | },
9 | {
10 | "size" : "16x16",
11 | "idiom" : "mac",
12 | "filename" : "app_icon_32.png",
13 | "scale" : "2x"
14 | },
15 | {
16 | "size" : "32x32",
17 | "idiom" : "mac",
18 | "filename" : "app_icon_32.png",
19 | "scale" : "1x"
20 | },
21 | {
22 | "size" : "32x32",
23 | "idiom" : "mac",
24 | "filename" : "app_icon_64.png",
25 | "scale" : "2x"
26 | },
27 | {
28 | "size" : "128x128",
29 | "idiom" : "mac",
30 | "filename" : "app_icon_128.png",
31 | "scale" : "1x"
32 | },
33 | {
34 | "size" : "128x128",
35 | "idiom" : "mac",
36 | "filename" : "app_icon_256.png",
37 | "scale" : "2x"
38 | },
39 | {
40 | "size" : "256x256",
41 | "idiom" : "mac",
42 | "filename" : "app_icon_256.png",
43 | "scale" : "1x"
44 | },
45 | {
46 | "size" : "256x256",
47 | "idiom" : "mac",
48 | "filename" : "app_icon_512.png",
49 | "scale" : "2x"
50 | },
51 | {
52 | "size" : "512x512",
53 | "idiom" : "mac",
54 | "filename" : "app_icon_512.png",
55 | "scale" : "1x"
56 | },
57 | {
58 | "size" : "512x512",
59 | "idiom" : "mac",
60 | "filename" : "app_icon_1024.png",
61 | "scale" : "2x"
62 | }
63 | ],
64 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/example/sign/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WalletConnect/WalletConnectModalFlutter/867326d9eb1bb06abc3ff0889c9d56e7e8680496/example/sign/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png
--------------------------------------------------------------------------------
/example/sign/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WalletConnect/WalletConnectModalFlutter/867326d9eb1bb06abc3ff0889c9d56e7e8680496/example/sign/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png
--------------------------------------------------------------------------------
/example/sign/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WalletConnect/WalletConnectModalFlutter/867326d9eb1bb06abc3ff0889c9d56e7e8680496/example/sign/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png
--------------------------------------------------------------------------------
/example/sign/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WalletConnect/WalletConnectModalFlutter/867326d9eb1bb06abc3ff0889c9d56e7e8680496/example/sign/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png
--------------------------------------------------------------------------------
/example/sign/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WalletConnect/WalletConnectModalFlutter/867326d9eb1bb06abc3ff0889c9d56e7e8680496/example/sign/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png
--------------------------------------------------------------------------------
/example/sign/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WalletConnect/WalletConnectModalFlutter/867326d9eb1bb06abc3ff0889c9d56e7e8680496/example/sign/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png
--------------------------------------------------------------------------------
/example/sign/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WalletConnect/WalletConnectModalFlutter/867326d9eb1bb06abc3ff0889c9d56e7e8680496/example/sign/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png
--------------------------------------------------------------------------------
/example/sign/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.walletconnect.flutterdapp
12 |
13 | // The copyright displayed in application information
14 | PRODUCT_COPYRIGHT = Copyright © 2023 com.example. All rights reserved.
15 |
--------------------------------------------------------------------------------
/example/sign/macos/Runner/Configs/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "../../Flutter/Flutter-Debug.xcconfig"
2 | #include "Warnings.xcconfig"
3 |
--------------------------------------------------------------------------------
/example/sign/macos/Runner/Configs/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "../../Flutter/Flutter-Release.xcconfig"
2 | #include "Warnings.xcconfig"
3 |
--------------------------------------------------------------------------------
/example/sign/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/sign/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/sign/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/sign/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/sign/macos/Runner/Release.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.app-sandbox
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/sign/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/sign/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/sign/web/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WalletConnect/WalletConnectModalFlutter/867326d9eb1bb06abc3ff0889c9d56e7e8680496/example/sign/web/favicon.png
--------------------------------------------------------------------------------
/example/sign/web/icons/Icon-192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WalletConnect/WalletConnectModalFlutter/867326d9eb1bb06abc3ff0889c9d56e7e8680496/example/sign/web/icons/Icon-192.png
--------------------------------------------------------------------------------
/example/sign/web/icons/Icon-512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WalletConnect/WalletConnectModalFlutter/867326d9eb1bb06abc3ff0889c9d56e7e8680496/example/sign/web/icons/Icon-512.png
--------------------------------------------------------------------------------
/example/sign/web/icons/Icon-maskable-192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WalletConnect/WalletConnectModalFlutter/867326d9eb1bb06abc3ff0889c9d56e7e8680496/example/sign/web/icons/Icon-maskable-192.png
--------------------------------------------------------------------------------
/example/sign/web/icons/Icon-maskable-512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WalletConnect/WalletConnectModalFlutter/867326d9eb1bb06abc3ff0889c9d56e7e8680496/example/sign/web/icons/Icon-maskable-512.png
--------------------------------------------------------------------------------
/example/sign/web/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 | walletconnect_flutter_dapp
33 |
34 |
35 |
39 |
40 |
41 |
42 |
43 |
58 |
59 |
60 |
--------------------------------------------------------------------------------
/example/sign/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/sign/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/sign/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 |
11 | void RegisterPlugins(flutter::PluginRegistry* registry) {
12 | UrlLauncherWindowsRegisterWithRegistrar(
13 | registry->GetRegistrarForPlugin("UrlLauncherWindows"));
14 | }
15 |
--------------------------------------------------------------------------------
/example/sign/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/sign/windows/flutter/generated_plugins.cmake:
--------------------------------------------------------------------------------
1 | #
2 | # Generated file, do not edit.
3 | #
4 |
5 | list(APPEND FLUTTER_PLUGIN_LIST
6 | url_launcher_windows
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}/windows 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}/windows plugins/${ffi_plugin})
23 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries})
24 | endforeach(ffi_plugin)
25 |
--------------------------------------------------------------------------------
/example/sign/windows/runner/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.14)
2 | project(runner LANGUAGES CXX)
3 |
4 | # Define the application target. To change its name, change BINARY_NAME in the
5 | # top-level CMakeLists.txt, not the value here, or `flutter run` will no longer
6 | # work.
7 | #
8 | # Any new source files that you add to the application should be added here.
9 | add_executable(${BINARY_NAME} WIN32
10 | "flutter_window.cpp"
11 | "main.cpp"
12 | "utils.cpp"
13 | "win32_window.cpp"
14 | "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc"
15 | "Runner.rc"
16 | "runner.exe.manifest"
17 | )
18 |
19 | # Apply the standard set of build settings. This can be removed for applications
20 | # that need different build settings.
21 | apply_standard_settings(${BINARY_NAME})
22 |
23 | # Add preprocessor definitions for the build version.
24 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION=\"${FLUTTER_VERSION}\"")
25 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MAJOR=${FLUTTER_VERSION_MAJOR}")
26 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MINOR=${FLUTTER_VERSION_MINOR}")
27 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_PATCH=${FLUTTER_VERSION_PATCH}")
28 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_BUILD=${FLUTTER_VERSION_BUILD}")
29 |
30 | # Disable Windows macros that collide with C++ standard library functions.
31 | target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX")
32 |
33 | # Add dependency libraries and include directories. Add any application-specific
34 | # dependencies here.
35 | target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app)
36 | target_link_libraries(${BINARY_NAME} PRIVATE "dwmapi.lib")
37 | target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}")
38 |
39 | # Run the Flutter tool portions of the build. This must not be removed.
40 | add_dependencies(${BINARY_NAME} flutter_assemble)
41 |
--------------------------------------------------------------------------------
/example/sign/windows/runner/flutter_window.cpp:
--------------------------------------------------------------------------------
1 | #include "flutter_window.h"
2 |
3 | #include
4 |
5 | #include "flutter/generated_plugin_registrant.h"
6 |
7 | FlutterWindow::FlutterWindow(const flutter::DartProject& project)
8 | : project_(project) {}
9 |
10 | FlutterWindow::~FlutterWindow() {}
11 |
12 | bool FlutterWindow::OnCreate() {
13 | if (!Win32Window::OnCreate()) {
14 | return false;
15 | }
16 |
17 | RECT frame = GetClientArea();
18 |
19 | // The size here must match the window dimensions to avoid unnecessary surface
20 | // creation / destruction in the startup path.
21 | flutter_controller_ = std::make_unique(
22 | frame.right - frame.left, frame.bottom - frame.top, project_);
23 | // Ensure that basic setup of the controller was successful.
24 | if (!flutter_controller_->engine() || !flutter_controller_->view()) {
25 | return false;
26 | }
27 | RegisterPlugins(flutter_controller_->engine());
28 | SetChildContent(flutter_controller_->view()->GetNativeWindow());
29 |
30 | flutter_controller_->engine()->SetNextFrameCallback([&]() {
31 | this->Show();
32 | });
33 |
34 | return true;
35 | }
36 |
37 | void FlutterWindow::OnDestroy() {
38 | if (flutter_controller_) {
39 | flutter_controller_ = nullptr;
40 | }
41 |
42 | Win32Window::OnDestroy();
43 | }
44 |
45 | LRESULT
46 | FlutterWindow::MessageHandler(HWND hwnd, UINT const message,
47 | WPARAM const wparam,
48 | LPARAM const lparam) noexcept {
49 | // Give Flutter, including plugins, an opportunity to handle window messages.
50 | if (flutter_controller_) {
51 | std::optional result =
52 | flutter_controller_->HandleTopLevelWindowProc(hwnd, message, wparam,
53 | lparam);
54 | if (result) {
55 | return *result;
56 | }
57 | }
58 |
59 | switch (message) {
60 | case WM_FONTCHANGE:
61 | flutter_controller_->engine()->ReloadSystemFonts();
62 | break;
63 | }
64 |
65 | return Win32Window::MessageHandler(hwnd, message, wparam, lparam);
66 | }
67 |
--------------------------------------------------------------------------------
/example/sign/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/sign/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/sign/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/sign/windows/runner/resources/app_icon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WalletConnect/WalletConnectModalFlutter/867326d9eb1bb06abc3ff0889c9d56e7e8680496/example/sign/windows/runner/resources/app_icon.ico
--------------------------------------------------------------------------------
/example/sign/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/sign/windows/runner/utils.cpp:
--------------------------------------------------------------------------------
1 | #include "utils.h"
2 |
3 | #include
4 | #include
5 | #include
6 | #include
7 |
8 | #include
9 |
10 | void CreateAndAttachConsole() {
11 | if (::AllocConsole()) {
12 | FILE *unused;
13 | if (freopen_s(&unused, "CONOUT$", "w", stdout)) {
14 | _dup2(_fileno(stdout), 1);
15 | }
16 | if (freopen_s(&unused, "CONOUT$", "w", stderr)) {
17 | _dup2(_fileno(stdout), 2);
18 | }
19 | std::ios::sync_with_stdio();
20 | FlutterDesktopResyncOutputStreams();
21 | }
22 | }
23 |
24 | std::vector GetCommandLineArguments() {
25 | // Convert the UTF-16 command line arguments to UTF-8 for the Engine to use.
26 | int argc;
27 | wchar_t** argv = ::CommandLineToArgvW(::GetCommandLineW(), &argc);
28 | if (argv == nullptr) {
29 | return std::vector();
30 | }
31 |
32 | std::vector command_line_arguments;
33 |
34 | // Skip the first argument as it's the binary name.
35 | for (int i = 1; i < argc; i++) {
36 | command_line_arguments.push_back(Utf8FromUtf16(argv[i]));
37 | }
38 |
39 | ::LocalFree(argv);
40 |
41 | return command_line_arguments;
42 | }
43 |
44 | std::string Utf8FromUtf16(const wchar_t* utf16_string) {
45 | if (utf16_string == nullptr) {
46 | return std::string();
47 | }
48 | int target_length = ::WideCharToMultiByte(
49 | CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string,
50 | -1, nullptr, 0, nullptr, nullptr)
51 | -1; // remove the trailing null character
52 | int input_length = (int)wcslen(utf16_string);
53 | std::string utf8_string;
54 | if (target_length <= 0 || target_length > utf8_string.max_size()) {
55 | return utf8_string;
56 | }
57 | utf8_string.resize(target_length);
58 | int converted_length = ::WideCharToMultiByte(
59 | CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string,
60 | input_length, utf8_string.data(), target_length, nullptr, nullptr);
61 | if (converted_length == 0) {
62 | return std::string();
63 | }
64 | return utf8_string;
65 | }
66 |
--------------------------------------------------------------------------------
/example/sign/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 |
--------------------------------------------------------------------------------
/generate_files.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | echo ' 🔄 Updating dependencies...'
4 | flutter pub get
5 | flutter pub run build_runner build --delete-conflicting-outputs
6 |
7 | cd example/sign/
8 |
9 | echo ' ⬇️ Getting dependencies...'
10 | flutter pub get
11 | flutter pub run build_runner build --delete-conflicting-outputs
12 |
--------------------------------------------------------------------------------
/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, '11.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 |
8 |
--------------------------------------------------------------------------------
/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 |
4 | @UIApplicationMain
5 | @objc class AppDelegate: FlutterAppDelegate {
6 | override func application(
7 | _ application: UIApplication,
8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
9 | ) -> Bool {
10 | GeneratedPluginRegistrant.register(with: self)
11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions)
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WalletConnect/WalletConnectModalFlutter/867326d9eb1bb06abc3ff0889c9d56e7e8680496/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WalletConnect/WalletConnectModalFlutter/867326d9eb1bb06abc3ff0889c9d56e7e8680496/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WalletConnect/WalletConnectModalFlutter/867326d9eb1bb06abc3ff0889c9d56e7e8680496/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WalletConnect/WalletConnectModalFlutter/867326d9eb1bb06abc3ff0889c9d56e7e8680496/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WalletConnect/WalletConnectModalFlutter/867326d9eb1bb06abc3ff0889c9d56e7e8680496/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WalletConnect/WalletConnectModalFlutter/867326d9eb1bb06abc3ff0889c9d56e7e8680496/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WalletConnect/WalletConnectModalFlutter/867326d9eb1bb06abc3ff0889c9d56e7e8680496/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WalletConnect/WalletConnectModalFlutter/867326d9eb1bb06abc3ff0889c9d56e7e8680496/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WalletConnect/WalletConnectModalFlutter/867326d9eb1bb06abc3ff0889c9d56e7e8680496/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WalletConnect/WalletConnectModalFlutter/867326d9eb1bb06abc3ff0889c9d56e7e8680496/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WalletConnect/WalletConnectModalFlutter/867326d9eb1bb06abc3ff0889c9d56e7e8680496/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WalletConnect/WalletConnectModalFlutter/867326d9eb1bb06abc3ff0889c9d56e7e8680496/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WalletConnect/WalletConnectModalFlutter/867326d9eb1bb06abc3ff0889c9d56e7e8680496/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WalletConnect/WalletConnectModalFlutter/867326d9eb1bb06abc3ff0889c9d56e7e8680496/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WalletConnect/WalletConnectModalFlutter/867326d9eb1bb06abc3ff0889c9d56e7e8680496/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.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/WalletConnectModalFlutter/867326d9eb1bb06abc3ff0889c9d56e7e8680496/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WalletConnect/WalletConnectModalFlutter/867326d9eb1bb06abc3ff0889c9d56e7e8680496/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WalletConnect/WalletConnectModalFlutter/867326d9eb1bb06abc3ff0889c9d56e7e8680496/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/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/ios/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CADisableMinimumFrameDurationOnPhone
6 |
7 | CFBundleDevelopmentRegion
8 | $(DEVELOPMENT_LANGUAGE)
9 | CFBundleDisplayName
10 | Web3modal Flutter
11 | CFBundleExecutable
12 | $(EXECUTABLE_NAME)
13 | CFBundleIdentifier
14 | $(PRODUCT_BUNDLE_IDENTIFIER)
15 | CFBundleInfoDictionaryVersion
16 | 6.0
17 | CFBundleName
18 | walletconnect_modal_flutter
19 | CFBundlePackageType
20 | APPL
21 | CFBundleShortVersionString
22 | $(FLUTTER_BUILD_NAME)
23 | CFBundleSignature
24 | ????
25 | CFBundleVersion
26 | $(FLUTTER_BUILD_NUMBER)
27 | LSRequiresIPhoneOS
28 |
29 | UIApplicationSupportsIndirectInputEvents
30 |
31 | UILaunchStoryboardName
32 | LaunchScreen
33 | UIMainStoryboardFile
34 | Main
35 | UISupportedInterfaceOrientations
36 |
37 | UIInterfaceOrientationPortrait
38 | UIInterfaceOrientationLandscapeLeft
39 | UIInterfaceOrientationLandscapeRight
40 |
41 | UISupportedInterfaceOrientations~ipad
42 |
43 | UIInterfaceOrientationPortrait
44 | UIInterfaceOrientationPortraitUpsideDown
45 | UIInterfaceOrientationLandscapeLeft
46 | UIInterfaceOrientationLandscapeRight
47 |
48 | UIViewControllerBasedStatusBarAppearance
49 |
50 |
51 |
52 |
--------------------------------------------------------------------------------
/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/constants.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class WalletConnectModalConstants {
4 | static const Key helpPageKey = Key('helpPageKey');
5 | static const Key qrCodePageKey = Key('qrCodePageKey');
6 | static const Key walletListShortPageKey = Key('walletListShortPageKey');
7 | static const Key walletListLongPageKey = Key('walletListLongPageKey');
8 | static const Key qrCodeAndWalletListPageKey =
9 | Key('qrCodeAndWalletListFullPageKey');
10 | static const Key getAWalletPageKey = Key('getAWalletPageKey');
11 |
12 | // Buttons
13 | static const Key helpButtonKey = Key('helpButtonKey');
14 | static const Key closeModalButtonKey = Key('closeModalButtonKey');
15 | static const Key getAWalletButtonKey = Key('getAWalletButtonKey');
16 | static const Key navbarBackButtonKey = Key('navbarBackButtonKey');
17 | static const Key gridListViewAllButtonKey = Key('gridListViewAllButtonKey');
18 | }
19 |
--------------------------------------------------------------------------------
/lib/constants/namespaces.dart:
--------------------------------------------------------------------------------
1 | import 'package:walletconnect_flutter_v2/walletconnect_flutter_v2.dart';
2 |
3 | class NamespaceConstants {
4 | static const Map ethereum = {
5 | 'eip155': RequiredNamespace(
6 | methods: [
7 | 'eth_sendTransaction',
8 | 'personal_sign',
9 | 'eth_sign',
10 | 'eth_signTypedData',
11 | ],
12 | chains: ['eip155:1'],
13 | events: [
14 | 'chainChanged',
15 | 'accountsChanged',
16 | ],
17 | ),
18 | };
19 |
20 | static const Map polygon = {
21 | 'eip155': RequiredNamespace(
22 | methods: [
23 | 'eth_sendTransaction',
24 | 'personal_sign',
25 | 'eth_sign',
26 | 'eth_signTypedData',
27 | ],
28 | chains: ['eip155:137'],
29 | events: [
30 | 'chainChanged',
31 | 'accountsChanged',
32 | ],
33 | ),
34 | };
35 | }
36 |
--------------------------------------------------------------------------------
/lib/constants/string_constants.dart:
--------------------------------------------------------------------------------
1 | class StringConstants {
2 | // URLS
3 | static const String getAWalletExploreWalletsUrl =
4 | 'https://explorer.walletconnect.com/?type=wallet';
5 |
6 | // TEXT
7 | static const String connectButtonError = 'Network Error';
8 | static const String connectButtonReconnecting = 'Reconnecting';
9 | static const String connectButtonIdle = 'Connect Wallet';
10 | static const String connectButtonConnecting = 'Connecting...';
11 | static const String connectButtonConnected = 'Disconnect';
12 |
13 | // Misc
14 | static const String noResults = 'No results found';
15 |
16 | // Storage
17 | static const String recentWallet = 'recentWallet';
18 | }
19 |
--------------------------------------------------------------------------------
/lib/models/launch_url_exception.dart:
--------------------------------------------------------------------------------
1 | class LaunchUrlException {
2 | final String message;
3 |
4 | LaunchUrlException(this.message);
5 |
6 | @override
7 | String toString() {
8 | return 'LaunchUrlException{message: $message}';
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/lib/pages/qr_code_page.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter/services.dart';
3 | import 'package:walletconnect_modal_flutter/constants/constants.dart';
4 | import 'package:walletconnect_modal_flutter/services/utils/toast/toast_message.dart';
5 | import 'package:walletconnect_modal_flutter/services/utils/toast/toast_utils_singleton.dart';
6 | import 'package:walletconnect_modal_flutter/services/walletconnect_modal/i_walletconnect_modal_service.dart';
7 | import 'package:walletconnect_modal_flutter/widgets/qr_code_widget.dart';
8 | import 'package:walletconnect_modal_flutter/widgets/walletconnect_icon_button.dart';
9 | import 'package:walletconnect_modal_flutter/widgets/walletconnect_modal_navbar.dart';
10 | import 'package:walletconnect_modal_flutter/widgets/walletconnect_modal_navbar_title.dart';
11 | import 'package:walletconnect_modal_flutter/widgets/walletconnect_modal_provider.dart';
12 |
13 | class QRCodePage extends StatelessWidget {
14 | const QRCodePage()
15 | : super(
16 | key: WalletConnectModalConstants.qrCodePageKey,
17 | );
18 |
19 | @override
20 | Widget build(BuildContext context) {
21 | final service = WalletConnectModalProvider.of(context).service;
22 |
23 | return WalletConnectModalNavBar(
24 | title: const WalletConnectModalNavbarTitle(
25 | title: 'Scan the code',
26 | ),
27 | actionWidget: WalletConnectIconButton(
28 | iconPath: 'assets/icons/copy.svg',
29 | onPressed: () {
30 | _copyQrCodeToClipboard(context);
31 | },
32 | ),
33 | child: QRCodeWidget(
34 | service: service,
35 | logoPath: 'assets/walletconnect_logo_white.png',
36 | ),
37 | );
38 | }
39 |
40 | Future _copyQrCodeToClipboard(BuildContext context) async {
41 | final IWalletConnectModalService service =
42 | WalletConnectModalProvider.of(context).service;
43 | await Clipboard.setData(
44 | ClipboardData(
45 | text: service.wcUri!,
46 | ),
47 | );
48 | toastUtils.instance.show(
49 | ToastMessage(
50 | type: ToastType.info,
51 | text: 'Link copied',
52 | ),
53 | );
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/lib/pages/wallet_list_long_page.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:walletconnect_modal_flutter/constants/constants.dart';
3 | import 'package:walletconnect_modal_flutter/models/listings.dart';
4 | import 'package:walletconnect_modal_flutter/services/explorer/explorer_service_singleton.dart';
5 | import 'package:walletconnect_modal_flutter/services/walletconnect_modal/i_walletconnect_modal_service.dart';
6 | import 'package:walletconnect_modal_flutter/widgets/grid_list/grid_list.dart';
7 | import 'package:walletconnect_modal_flutter/widgets/grid_list/grid_list_wallet_item.dart';
8 | import 'package:walletconnect_modal_flutter/widgets/walletconnect_modal_navbar.dart';
9 | import 'package:walletconnect_modal_flutter/widgets/walletconnect_modal_provider.dart';
10 | import 'package:walletconnect_modal_flutter/widgets/walletconnect_modal_search_bar.dart';
11 |
12 | class WalletListLongPage extends StatelessWidget {
13 | const WalletListLongPage()
14 | : super(
15 | key: WalletConnectModalConstants.walletListLongPageKey,
16 | );
17 |
18 | @override
19 | Widget build(BuildContext context) {
20 | final IWalletConnectModalService service =
21 | WalletConnectModalProvider.of(context).service;
22 |
23 | return WalletConnectModalNavBar(
24 | title: WalletConnectModalSearchBar(
25 | hintText: 'Search wallets',
26 | onSearch: (String query) {
27 | explorerService.instance!.filterList(
28 | query: query,
29 | );
30 | },
31 | ),
32 | onBack: () {
33 | // When we leave this page, we want to reset the list to its original state
34 | explorerService.instance!.filterList(
35 | query: null,
36 | );
37 | },
38 | child: GridList(
39 | state: GridListState.long,
40 | provider: explorerService.instance!,
41 | onSelect: (WalletData data) {
42 | service.connectWallet(
43 | walletData: data,
44 | );
45 | },
46 | createListItem: (info, iconSize) {
47 | return GridListWalletItem(
48 | listItem: info,
49 | imageSize: iconSize,
50 | );
51 | },
52 | ),
53 | );
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/lib/services/explorer/explorer_service_singleton.dart:
--------------------------------------------------------------------------------
1 | import 'package:walletconnect_modal_flutter/services/explorer/i_explorer_service.dart';
2 |
3 | class ExplorerServiceSingleton {
4 | IExplorerService? instance;
5 | }
6 |
7 | final explorerService = ExplorerServiceSingleton();
8 |
--------------------------------------------------------------------------------
/lib/services/explorer/i_explorer_service.dart:
--------------------------------------------------------------------------------
1 | import 'package:walletconnect_flutter_v2/walletconnect_flutter_v2.dart';
2 | import 'package:walletconnect_modal_flutter/models/listings.dart';
3 | import 'package:walletconnect_modal_flutter/widgets/grid_list/grid_list_provider.dart';
4 |
5 | enum ExcludedWalletState {
6 | all,
7 | list,
8 | }
9 |
10 | abstract class IExplorerService implements GridListProvider {
11 | /// The root URI of the explorer API.
12 | String get explorerUriRoot;
13 |
14 | /// The project ID used when querying the explorer API.
15 | String get projectId;
16 |
17 | /// The recommended wallets that will be prioritized in the modal.
18 | /// Even if the [excludedWalletIds] list contains a wallet, it will still be
19 | /// displayed if it is in this list.
20 | Set? recommendedWalletIds;
21 |
22 | /// How the list of excluded wallets will be handled.
23 | abstract ExcludedWalletState excludedWalletState;
24 |
25 | /// The wallets that will be excluded from the modal.
26 | Set? excludedWalletIds;
27 |
28 | Future init();
29 |
30 | String getWalletImageUrl({
31 | required String imageId,
32 | });
33 |
34 | String getAssetImageUrl({
35 | required String imageId,
36 | });
37 |
38 | Redirect? getRedirect({
39 | required String name,
40 | });
41 |
42 | Future> fetchListings({
43 | required String endpoint,
44 | required String referer,
45 | ListingParams? params,
46 | });
47 | }
48 |
--------------------------------------------------------------------------------
/lib/services/storage_service/i_storage_service.dart:
--------------------------------------------------------------------------------
1 | abstract class IStorageService {
2 | Future init();
3 | String? getString(String key);
4 | Future setString(String key, String value);
5 | }
6 |
--------------------------------------------------------------------------------
/lib/services/storage_service/storage_service.dart:
--------------------------------------------------------------------------------
1 | import 'package:shared_preferences/shared_preferences.dart';
2 | import 'package:walletconnect_modal_flutter/services/storage_service/i_storage_service.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) {
14 | return _prefs?.getString(key);
15 | }
16 |
17 | @override
18 | Future setString(String key, String value) async {
19 | return _prefs!.setString(key, value);
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/lib/services/storage_service/storage_service_singleton.dart:
--------------------------------------------------------------------------------
1 | import 'package:walletconnect_modal_flutter/services/storage_service/i_storage_service.dart';
2 | import 'package:walletconnect_modal_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/utils/core/core_utils_singleton.dart:
--------------------------------------------------------------------------------
1 | import 'package:walletconnect_modal_flutter/services/utils/core/core_utils.dart';
2 | import 'package:walletconnect_modal_flutter/services/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/services/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 isHttpUrl(String url);
4 |
5 | /// Creates a URL that ends with :// if the provided URL didn't have it.
6 | String createSafeUrl(String url);
7 |
8 | /// Creates a URL that ends with / if the provided URL didn't have it.
9 | String createPlainUrl(String url);
10 |
11 | /// Formats a native URL for the given [appUrl] and [wcUri].
12 | /// metamask:// is a native URL
13 | Uri? formatNativeUrl(String? appUrl, String wcUri);
14 |
15 | /// Formats a universal URL for the given [appUrl] and [wcUri].
16 | /// https://metamask.app.link/ is a universal URL
17 | Uri? formatUniversalUrl(String? appUrl, String wcUri);
18 |
19 | /// Returns the user agent string. Used with the explorer and other API endpoints.
20 | String getUserAgent();
21 | }
22 |
--------------------------------------------------------------------------------
/lib/services/utils/logger/logger_util.dart:
--------------------------------------------------------------------------------
1 | import 'package:logger/logger.dart';
2 |
3 | class LoggerUtil {
4 | static Logger logger = Logger(
5 | level: Level.off,
6 | printer: PrettyPrinter(),
7 | );
8 |
9 | static void setLogLevel(Level level) {
10 | logger = Logger(
11 | level: level,
12 | printer: PrettyPrinter(
13 | methodCount: 10,
14 | ),
15 | );
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/lib/services/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 |
--------------------------------------------------------------------------------
/lib/services/utils/platform/platform_utils.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:universal_io/io.dart';
3 | import 'package:flutter/foundation.dart' show kIsWeb;
4 | import 'package:walletconnect_modal_flutter/services/utils/platform/i_platform_utils.dart';
5 |
6 | class PlatformUtils extends IPlatformUtils {
7 | @override
8 | PlatformExact getPlatformExact() {
9 | if (Platform.isAndroid) {
10 | return PlatformExact.android;
11 | } else if (Platform.isIOS) {
12 | return PlatformExact.iOS;
13 | } else if (Platform.isLinux) {
14 | return PlatformExact.linux;
15 | } else if (Platform.isMacOS) {
16 | return PlatformExact.macOS;
17 | } else if (Platform.isWindows) {
18 | return PlatformExact.windows;
19 | } else if (kIsWeb) {
20 | return PlatformExact.web;
21 | }
22 | return PlatformExact.web;
23 | }
24 |
25 | @override
26 | PlatformType getPlatformType() {
27 | if (kIsWeb) {
28 | return PlatformType.web;
29 | }
30 | if (Platform.isAndroid || Platform.isIOS) {
31 | return PlatformType.mobile;
32 | } else if (Platform.isLinux || Platform.isMacOS || Platform.isWindows) {
33 | return PlatformType.desktop;
34 | }
35 | return PlatformType.mobile;
36 | }
37 |
38 | @override
39 | bool canDetectInstalledApps() {
40 | return getPlatformType() == PlatformType.mobile;
41 | }
42 |
43 | @override
44 | bool isBottomSheet() {
45 | return getPlatformType() == PlatformType.mobile;
46 | }
47 |
48 | @override
49 | bool isLongBottomSheet(Orientation orientation) {
50 | return getPlatformType() == PlatformType.mobile &&
51 | orientation == Orientation.landscape;
52 | }
53 |
54 | @override
55 | bool isMobileWidth(double width) {
56 | return width <= 500.0;
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/lib/services/utils/platform/platform_utils_singleton.dart:
--------------------------------------------------------------------------------
1 | import 'package:walletconnect_modal_flutter/services/utils/platform/i_platform_utils.dart';
2 | import 'package:walletconnect_modal_flutter/services/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/services/utils/toast/i_toast_utils.dart:
--------------------------------------------------------------------------------
1 | import 'package:walletconnect_modal_flutter/services/utils/toast/toast_message.dart';
2 | import 'dart:async';
3 |
4 | class ToastMessageCompleter {
5 | final ToastMessage message;
6 | final Completer completer = Completer();
7 |
8 | ToastMessageCompleter(this.message);
9 | }
10 |
11 | abstract class IToastUtils {
12 | Stream get toasts;
13 |
14 | Future show(ToastMessage message);
15 |
16 | void clear();
17 | }
18 |
--------------------------------------------------------------------------------
/lib/services/utils/toast/toast_message.dart:
--------------------------------------------------------------------------------
1 | import 'dart:async';
2 |
3 | enum ToastType { info, error }
4 |
5 | class ToastMessage {
6 | final ToastType type;
7 | final String text;
8 | final Duration duration;
9 | final Completer completer = Completer();
10 |
11 | ToastMessage({
12 | required this.type,
13 | required this.text,
14 | this.duration = const Duration(seconds: 2),
15 | });
16 | }
17 |
--------------------------------------------------------------------------------
/lib/services/utils/toast/toast_utils.dart:
--------------------------------------------------------------------------------
1 | import 'package:w_common/disposable.dart';
2 | import 'package:walletconnect_modal_flutter/services/utils/toast/i_toast_utils.dart';
3 | import 'package:walletconnect_modal_flutter/services/utils/toast/toast_message.dart';
4 | import 'dart:async';
5 |
6 | class ToastUtils extends IToastUtils with Disposable {
7 | final _toastController = StreamController.broadcast();
8 |
9 | // final _queue = Queue();
10 |
11 | // bool _isShowing = false;
12 |
13 | @override
14 | Stream get toasts => _toastController.stream;
15 |
16 | @override
17 | Future show(ToastMessage? message) async {
18 | _toastController.add(message);
19 |
20 | // _queue.add(message);
21 |
22 | // if (!_isShowing) {
23 | // _popToast();
24 | // }
25 |
26 | // await message.completer.future;
27 | }
28 |
29 | @override
30 | void clear() {
31 | // _queue.clear();
32 | _toastController.add(null);
33 | }
34 |
35 | // Future _popToast() async {
36 | // if (_queue.isNotEmpty) {
37 | // _isShowing = true;
38 | // final ToastMessage message = _queue.removeFirst();
39 | // _toastController.add(message);
40 | // await message.completer.future;
41 | // _isShowing = false;
42 | // _popToast();
43 | // } else {
44 | // _isShowing = false;
45 | // _toastController.add(null);
46 | // }
47 | // }
48 |
49 | // @override
50 | // // ignore: prefer_void_to_null
51 | // Future onDispose() async {
52 | // _toastController.close();
53 | // }
54 | }
55 |
--------------------------------------------------------------------------------
/lib/services/utils/toast/toast_utils_singleton.dart:
--------------------------------------------------------------------------------
1 | import 'package:walletconnect_modal_flutter/services/utils/toast/i_toast_utils.dart';
2 | import 'package:walletconnect_modal_flutter/services/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/services/utils/url/i_url_utils.dart:
--------------------------------------------------------------------------------
1 | import 'package:url_launcher/url_launcher.dart';
2 |
3 | abstract class IUrlUtils {
4 | const IUrlUtils();
5 |
6 | Future isInstalled(String? uri);
7 |
8 | Future launchUrl(
9 | Uri url, {
10 | LaunchMode? mode,
11 | });
12 |
13 | Future launchRedirect({
14 | Uri? nativeUri,
15 | Uri? universalUri,
16 | });
17 |
18 | Future navigateDeepLink({
19 | String? nativeLink,
20 | String? universalLink,
21 | required String wcURI,
22 | });
23 | }
24 |
--------------------------------------------------------------------------------
/lib/services/utils/url/url_utils_singleton.dart:
--------------------------------------------------------------------------------
1 | import 'package:walletconnect_modal_flutter/services/utils/url/i_url_utils.dart';
2 | import 'package:walletconnect_modal_flutter/services/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/services/utils/widget_stack/i_widget_stack.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | abstract class IWidgetStack with ChangeNotifier {
4 | /// Returns the current widget.
5 | Widget getCurrent();
6 |
7 | /// Pushes a widget to the stack.
8 | void add(Widget widget);
9 |
10 | /// Removes a widget from the stack.
11 | void pop();
12 |
13 | /// Checks if the stack can be popped.
14 | bool canPop();
15 |
16 | /// Removes widgets from the stack until the given type of widget is found.
17 | void popUntil(Key key);
18 |
19 | /// Checks if the stack contains a widget with the given key.
20 | bool containsKey(Key key);
21 |
22 | /// Clears the stack.
23 | void clear();
24 |
25 | /// Adds a default widget to the stack based on platform.
26 | void addDefault();
27 | }
28 |
--------------------------------------------------------------------------------
/lib/services/utils/widget_stack/widget_stack_singleton.dart:
--------------------------------------------------------------------------------
1 | import 'package:walletconnect_modal_flutter/services/utils/widget_stack/i_widget_stack.dart';
2 | import 'package:walletconnect_modal_flutter/services/utils/widget_stack/widget_stack.dart';
3 |
4 | class WidgetStackSingleton {
5 | IWidgetStack instance;
6 |
7 | WidgetStackSingleton() : instance = WidgetStack();
8 | }
9 |
10 | final widgetStack = WidgetStackSingleton();
11 |
--------------------------------------------------------------------------------
/lib/version.dart:
--------------------------------------------------------------------------------
1 | // Generated code. Do not modify.
2 | const packageVersion = '2.1.19';
3 |
--------------------------------------------------------------------------------
/lib/walletconnect_modal_flutter.dart:
--------------------------------------------------------------------------------
1 | library walletconnect_modal_flutter;
2 |
3 | // Utils
4 | export 'services/utils/logger/logger_util.dart';
5 | // export 'services/utils/core/core_utils_singleton.dart';
6 | // export 'services/utils/platform/platform_utils_singleton.dart';
7 | // export 'services/utils/toast/toast_utils_singleton.dart';
8 | // export 'services/utils/url/url_utils_singleton.dart';
9 | // export 'services/utils/widget_stack/widget_stack_singleton.dart';
10 | export 'constants/namespaces.dart';
11 |
12 | // Models
13 | export 'models/walletconnect_modal_theme_data.dart';
14 |
15 | // Services
16 | export 'services/walletconnect_modal_services.dart';
17 | export 'services/walletconnect_modal/i_walletconnect_modal_service.dart';
18 | export 'services/walletconnect_modal/walletconnect_modal_service.dart';
19 |
20 | // Widgets
21 | export 'widgets/walletconnect_modal_theme.dart';
22 | export 'widgets/walletconnect_modal_connect.dart';
23 |
--------------------------------------------------------------------------------
/lib/widgets/grid_list/grid_list_item.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class GridListItem extends StatelessWidget {
4 | const GridListItem({
5 | super.key,
6 | required this.onSelect,
7 | required this.child,
8 | });
9 |
10 | final void Function() onSelect;
11 | final Widget child;
12 |
13 | @override
14 | Widget build(BuildContext context) {
15 | return MaterialButton(
16 | visualDensity: VisualDensity.compact,
17 | padding: const EdgeInsets.all(0),
18 | onPressed: onSelect,
19 | shape: RoundedRectangleBorder(
20 | borderRadius: BorderRadius.circular(8),
21 | ),
22 | elevation: 1,
23 | focusElevation: 1,
24 | hoverElevation: 1,
25 | highlightElevation: 1,
26 | child: child,
27 | );
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/lib/widgets/grid_list/grid_list_item_model.dart:
--------------------------------------------------------------------------------
1 | class GridListItemModel {
2 | final String image;
3 | final String id;
4 | final String title;
5 | final String? description;
6 | final T data;
7 |
8 | GridListItemModel({
9 | required this.image,
10 | required this.id,
11 | required this.title,
12 | this.description,
13 | required this.data,
14 | });
15 |
16 | GridListItemModel copyWith({
17 | String? image,
18 | String? id,
19 | String? title,
20 | String? description,
21 | T? data,
22 | }) {
23 | return GridListItemModel(
24 | image: image ?? this.image,
25 | id: id ?? this.id,
26 | title: title ?? this.title,
27 | description: description ?? this.description,
28 | data: data ?? this.data,
29 | );
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/lib/widgets/grid_list/grid_list_provider.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:walletconnect_modal_flutter/widgets/grid_list/grid_list_item_model.dart';
3 |
4 | abstract class GridListProvider {
5 | abstract ValueNotifier>> itemList;
6 | abstract ValueNotifier initialized;
7 |
8 | void filterList({
9 | String? query,
10 | });
11 |
12 | void updateSort();
13 | }
14 |
--------------------------------------------------------------------------------
/lib/widgets/toast/walletconnect_modal_toast_manager.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:walletconnect_modal_flutter/services/utils/toast/toast_message.dart';
3 | import 'package:walletconnect_modal_flutter/services/utils/toast/toast_utils_singleton.dart';
4 | import 'package:walletconnect_modal_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(
18 | message: snapshot.data!,
19 | );
20 | }
21 | return const SizedBox.shrink();
22 | },
23 | );
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/lib/widgets/wallet_image.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:walletconnect_modal_flutter/widgets/grid_list/grid_list.dart';
3 |
4 | class WalletImage extends StatelessWidget {
5 | const WalletImage({
6 | super.key,
7 | required this.imageUrl,
8 | this.imageSize = GridList.tileSize,
9 | });
10 |
11 | final String imageUrl;
12 | final double imageSize;
13 |
14 | @override
15 | Widget build(BuildContext context) {
16 | return Container(
17 | width: imageSize,
18 | height: imageSize,
19 | decoration: BoxDecoration(
20 | borderRadius: BorderRadius.circular(
21 | GridList.getTileBorderRadius(imageSize),
22 | ),
23 | ),
24 | clipBehavior: Clip.antiAlias,
25 | child: Image.network(imageUrl),
26 | );
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/lib/widgets/walletconnect_icon_button.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_svg/svg.dart';
3 | import 'package:walletconnect_modal_flutter/widgets/walletconnect_modal_theme.dart';
4 |
5 | class WalletConnectIconButton extends StatelessWidget {
6 | const WalletConnectIconButton({
7 | super.key,
8 | required this.onPressed,
9 | required this.iconPath,
10 | this.color,
11 | this.size = 26,
12 | });
13 |
14 | final String iconPath;
15 | final void Function() onPressed;
16 | final Color? color;
17 | final double size;
18 |
19 | @override
20 | Widget build(BuildContext context) {
21 | return IconButton(
22 | onPressed: onPressed,
23 | icon: SvgPicture.asset(
24 | iconPath,
25 | width: size,
26 | height: size,
27 | package: 'walletconnect_modal_flutter',
28 | colorFilter: ColorFilter.mode(
29 | color ?? WalletConnectModalTheme.getData(context).primary100,
30 | BlendMode.srcIn,
31 | ),
32 | ),
33 | );
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/lib/widgets/walletconnect_modal_navbar_title.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:walletconnect_modal_flutter/widgets/walletconnect_modal_theme.dart';
3 |
4 | class WalletConnectModalNavbarTitle extends StatelessWidget {
5 | const WalletConnectModalNavbarTitle({
6 | super.key,
7 | required this.title,
8 | });
9 |
10 | final String title;
11 |
12 | @override
13 | Widget build(BuildContext context) {
14 | return Text(
15 | title,
16 | style: TextStyle(
17 | fontSize: 20,
18 | fontWeight: FontWeight.w600,
19 | color: WalletConnectModalTheme.getData(context).foreground100,
20 | ),
21 | textAlign: TextAlign.center,
22 | );
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/lib/widgets/walletconnect_modal_provider.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:walletconnect_modal_flutter/walletconnect_modal_flutter.dart';
3 |
4 | class WalletConnectModalProvider extends InheritedWidget {
5 | final IWalletConnectModalService service;
6 |
7 | const WalletConnectModalProvider({
8 | super.key,
9 | required this.service,
10 | required super.child,
11 | });
12 |
13 | static WalletConnectModalProvider? maybeOf(BuildContext context) {
14 | return context
15 | .dependOnInheritedWidgetOfExactType();
16 | }
17 |
18 | static WalletConnectModalProvider of(BuildContext context) {
19 | final WalletConnectModalProvider? result = maybeOf(context);
20 | assert(result != null, 'No WalletConnectModalProvider found in context');
21 | return result!;
22 | }
23 |
24 | @override
25 | bool updateShouldNotify(WalletConnectModalProvider oldWidget) {
26 | return true;
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/lib/widgets/walletconnect_modal_theme.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:walletconnect_modal_flutter/models/walletconnect_modal_theme_data.dart';
3 |
4 | class WalletConnectModalTheme extends InheritedWidget {
5 | const WalletConnectModalTheme({
6 | super.key,
7 | required this.data,
8 | required super.child,
9 | });
10 |
11 | final WalletConnectModalThemeData data;
12 |
13 | static WalletConnectModalTheme? maybeOf(BuildContext context) {
14 | return context
15 | .dependOnInheritedWidgetOfExactType();
16 | }
17 |
18 | static WalletConnectModalTheme of(BuildContext context) {
19 | final WalletConnectModalTheme? result = maybeOf(context);
20 | assert(result != null, 'No WalletConnectModal theme found in context');
21 | return result!;
22 | }
23 |
24 | static WalletConnectModalThemeData getData(BuildContext context) {
25 | final WalletConnectModalTheme? theme = maybeOf(context);
26 | return theme?.data ?? WalletConnectModalThemeData.lightMode;
27 | }
28 |
29 | @override
30 | bool updateShouldNotify(covariant InheritedWidget oldWidget) {
31 | return true;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/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 package_info_plus
9 | import shared_preferences_foundation
10 | import url_launcher_macos
11 |
12 | func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
13 | FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin"))
14 | SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
15 | UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))
16 | }
17 |
--------------------------------------------------------------------------------
/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/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "16x16",
5 | "idiom" : "mac",
6 | "filename" : "app_icon_16.png",
7 | "scale" : "1x"
8 | },
9 | {
10 | "size" : "16x16",
11 | "idiom" : "mac",
12 | "filename" : "app_icon_32.png",
13 | "scale" : "2x"
14 | },
15 | {
16 | "size" : "32x32",
17 | "idiom" : "mac",
18 | "filename" : "app_icon_32.png",
19 | "scale" : "1x"
20 | },
21 | {
22 | "size" : "32x32",
23 | "idiom" : "mac",
24 | "filename" : "app_icon_64.png",
25 | "scale" : "2x"
26 | },
27 | {
28 | "size" : "128x128",
29 | "idiom" : "mac",
30 | "filename" : "app_icon_128.png",
31 | "scale" : "1x"
32 | },
33 | {
34 | "size" : "128x128",
35 | "idiom" : "mac",
36 | "filename" : "app_icon_256.png",
37 | "scale" : "2x"
38 | },
39 | {
40 | "size" : "256x256",
41 | "idiom" : "mac",
42 | "filename" : "app_icon_256.png",
43 | "scale" : "1x"
44 | },
45 | {
46 | "size" : "256x256",
47 | "idiom" : "mac",
48 | "filename" : "app_icon_512.png",
49 | "scale" : "2x"
50 | },
51 | {
52 | "size" : "512x512",
53 | "idiom" : "mac",
54 | "filename" : "app_icon_512.png",
55 | "scale" : "1x"
56 | },
57 | {
58 | "size" : "512x512",
59 | "idiom" : "mac",
60 | "filename" : "app_icon_1024.png",
61 | "scale" : "2x"
62 | }
63 | ],
64 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WalletConnect/WalletConnectModalFlutter/867326d9eb1bb06abc3ff0889c9d56e7e8680496/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png
--------------------------------------------------------------------------------
/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WalletConnect/WalletConnectModalFlutter/867326d9eb1bb06abc3ff0889c9d56e7e8680496/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png
--------------------------------------------------------------------------------
/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WalletConnect/WalletConnectModalFlutter/867326d9eb1bb06abc3ff0889c9d56e7e8680496/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png
--------------------------------------------------------------------------------
/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WalletConnect/WalletConnectModalFlutter/867326d9eb1bb06abc3ff0889c9d56e7e8680496/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png
--------------------------------------------------------------------------------
/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WalletConnect/WalletConnectModalFlutter/867326d9eb1bb06abc3ff0889c9d56e7e8680496/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png
--------------------------------------------------------------------------------
/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WalletConnect/WalletConnectModalFlutter/867326d9eb1bb06abc3ff0889c9d56e7e8680496/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png
--------------------------------------------------------------------------------
/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WalletConnect/WalletConnectModalFlutter/867326d9eb1bb06abc3ff0889c9d56e7e8680496/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png
--------------------------------------------------------------------------------
/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 = walletconnect_modal_flutter
9 |
10 | // The application's bundle identifier
11 | PRODUCT_BUNDLE_IDENTIFIER = com.example.walletconnect_modalFlutter
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: walletconnect_modal_flutter
2 | description: The WalletConnectModal for WalletConnect built using Flutter.
3 | version: 2.1.20
4 | repository: https://github.com/WalletConnect/WalletConnectModalFlutter
5 |
6 | environment:
7 | sdk: '>=2.19.0 <4.0.0'
8 |
9 | dependencies:
10 | appcheck: ^1.5.1
11 | cupertino_icons: ^1.0.8
12 | event: ^2.1.2
13 | flutter:
14 | sdk: flutter
15 | flutter_keyboard_visibility: ^6.0.0
16 | flutter_svg: ^2.0.9
17 | freezed_annotation: ^2.4.1
18 | http: ^1.2.0
19 | json_annotation: ^4.9.0
20 | logger: ^2.0.2+1
21 | qr_flutter: ^4.1.0
22 | shared_preferences: ^2.2.3
23 | smooth_page_indicator: ^1.1.0
24 | universal_io: ^2.2.2
25 | url_launcher: ^6.2.6
26 | w_common: ^3.0.1
27 | walletconnect_flutter_v2: ^2.3.0
28 |
29 | dev_dependencies:
30 | build_runner: ^2.4.8
31 | build_version: ^2.1.1
32 | flutter_lints: ^2.0.0
33 | flutter_test:
34 | sdk: flutter
35 | freezed: ^2.4.6
36 | json_serializable: ^6.7.1
37 | mockito: ^5.4.4
38 | network_image_mock: ^2.1.1
39 |
40 |
41 | flutter:
42 | uses-material-design: true
43 |
44 | assets:
45 | - assets/
46 | - assets/help_page/
47 | - assets/icons/
48 |
49 | platforms:
50 | android:
51 | ios:
52 |
--------------------------------------------------------------------------------
/test/mock_classes.dart:
--------------------------------------------------------------------------------
1 | import 'package:walletconnect_flutter_v2/apis/core/pairing/pairing_store.dart';
2 | import 'package:walletconnect_flutter_v2/apis/core/relay_client/relay_client.dart';
3 | import 'package:walletconnect_flutter_v2/walletconnect_flutter_v2.dart';
4 | import 'package:walletconnect_modal_flutter/services/explorer/explorer_service.dart';
5 | import 'package:walletconnect_modal_flutter/services/storage_service/storage_service.dart';
6 | import 'package:walletconnect_modal_flutter/services/utils/platform/platform_utils.dart';
7 | import 'package:walletconnect_modal_flutter/services/utils/toast/toast_utils.dart';
8 | import 'package:walletconnect_modal_flutter/services/utils/url/url_utils.dart';
9 | import 'package:walletconnect_modal_flutter/walletconnect_modal_flutter.dart';
10 | import 'package:mockito/annotations.dart';
11 | import 'package:http/http.dart' as http;
12 |
13 | @GenerateMocks(
14 | [
15 | ExplorerService,
16 | WalletConnectModalService,
17 | UrlUtils,
18 | PlatformUtils,
19 | ToastUtils,
20 | Web3App,
21 | Sessions,
22 | RelayClient,
23 | StorageService,
24 | http.Client,
25 | ],
26 | customMocks: [
27 | MockSpec(onMissingStub: OnMissingStub.returnDefault),
28 | ],
29 | )
30 | class Mocks {}
31 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/test/utils/core_utils_test.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter_test/flutter_test.dart';
2 | import 'package:walletconnect_flutter_v2/walletconnect_flutter_v2.dart';
3 | import 'package:walletconnect_modal_flutter/services/utils/core/core_utils.dart';
4 |
5 | void main() {
6 | final coreUtils = CoreUtils();
7 |
8 | group('CoreUtils', () {
9 | test('isHttpUrl', () {
10 | expect(coreUtils.isHttpUrl('http://example.com'), true);
11 | expect(coreUtils.isHttpUrl('https://example.com'), true);
12 | expect(coreUtils.isHttpUrl('ftp://example.com'), false);
13 | });
14 |
15 | test('formatNativeUrl', () {
16 | expect(coreUtils.formatNativeUrl(null, 'wcUri'), null);
17 | expect(coreUtils.formatNativeUrl('', 'wcUri'), null);
18 | expect(
19 | coreUtils.formatNativeUrl('http://example.com', 'wcUri').toString(),
20 | 'http://example.com/wc?uri=wcUri',
21 | );
22 | expect(
23 | coreUtils.formatNativeUrl('myapp', 'wcUri').toString(),
24 | 'myapp://wc?uri=wcUri',
25 | );
26 | });
27 |
28 | test('formatUniversalUrl', () {
29 | expect(coreUtils.formatUniversalUrl(null, 'wcUri'), null);
30 | expect(coreUtils.formatUniversalUrl('', 'wcUri'), null);
31 | expect(
32 | coreUtils.formatUniversalUrl('myapp', 'wcUri').toString(),
33 | 'myapp://wc?uri=wcUri',
34 | );
35 | expect(
36 | coreUtils.formatUniversalUrl('http://example.com', 'wcUri').toString(),
37 | 'http://example.com/wc?uri=wcUri',
38 | );
39 | expect(
40 | coreUtils.formatUniversalUrl('http://example.com/', 'wcUri').toString(),
41 | 'http://example.com/wc?uri=wcUri',
42 | );
43 | });
44 |
45 | test('getUserAgent', () {
46 | final userAgent = coreUtils.getUserAgent();
47 | expect(userAgent.startsWith('w3m-flutter-'), true);
48 | expect(userAgent.contains('/flutter-core-'), true);
49 | expect(userAgent.contains(packageVersion), true);
50 | expect(userAgent.endsWith(WalletConnectUtils.getOS()), true);
51 | });
52 | });
53 | }
54 |
--------------------------------------------------------------------------------
/test/utils/platform_utils_test.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter_test/flutter_test.dart';
2 | import 'package:walletconnect_modal_flutter/services/utils/platform/i_platform_utils.dart';
3 | import 'package:walletconnect_modal_flutter/services/utils/platform/platform_utils.dart';
4 |
5 | void main() {
6 | final utils = PlatformUtils();
7 |
8 | group('Platform Utils', () {
9 | test('getPlatformType returns correct platform type', () {
10 | expect(utils.getPlatformType(), isA());
11 | });
12 |
13 | test('isMobileWidth returns true when width is <= 500.0', () {
14 | expect(utils.isMobileWidth(500.0), isTrue);
15 | });
16 |
17 | test('isMobileWidth returns false when width is > 500.0', () {
18 | expect(utils.isMobileWidth(501.0), isFalse);
19 | });
20 | });
21 | }
22 |
--------------------------------------------------------------------------------
/web/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WalletConnect/WalletConnectModalFlutter/867326d9eb1bb06abc3ff0889c9d56e7e8680496/web/favicon.png
--------------------------------------------------------------------------------
/web/icons/Icon-192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WalletConnect/WalletConnectModalFlutter/867326d9eb1bb06abc3ff0889c9d56e7e8680496/web/icons/Icon-192.png
--------------------------------------------------------------------------------
/web/icons/Icon-512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WalletConnect/WalletConnectModalFlutter/867326d9eb1bb06abc3ff0889c9d56e7e8680496/web/icons/Icon-512.png
--------------------------------------------------------------------------------
/web/icons/Icon-maskable-192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WalletConnect/WalletConnectModalFlutter/867326d9eb1bb06abc3ff0889c9d56e7e8680496/web/icons/Icon-maskable-192.png
--------------------------------------------------------------------------------
/web/icons/Icon-maskable-512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WalletConnect/WalletConnectModalFlutter/867326d9eb1bb06abc3ff0889c9d56e7e8680496/web/icons/Icon-maskable-512.png
--------------------------------------------------------------------------------
/web/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 | walletconnect_modal_flutter
33 |
34 |
35 |
39 |
40 |
41 |
42 |
43 |
58 |
59 |
60 |
--------------------------------------------------------------------------------
/web/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "walletconnect_modal_flutter",
3 | "short_name": "walletconnect_modal_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 |
11 | void RegisterPlugins(flutter::PluginRegistry* registry) {
12 | UrlLauncherWindowsRegisterWithRegistrar(
13 | registry->GetRegistrarForPlugin("UrlLauncherWindows"));
14 | }
15 |
--------------------------------------------------------------------------------
/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 | url_launcher_windows
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}/windows 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}/windows plugins/${ffi_plugin})
23 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries})
24 | endforeach(ffi_plugin)
25 |
--------------------------------------------------------------------------------
/windows/runner/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.14)
2 | project(runner LANGUAGES CXX)
3 |
4 | # Define the application target. To change its name, change BINARY_NAME in the
5 | # top-level CMakeLists.txt, not the value here, or `flutter run` will no longer
6 | # work.
7 | #
8 | # Any new source files that you add to the application should be added here.
9 | add_executable(${BINARY_NAME} WIN32
10 | "flutter_window.cpp"
11 | "main.cpp"
12 | "utils.cpp"
13 | "win32_window.cpp"
14 | "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc"
15 | "Runner.rc"
16 | "runner.exe.manifest"
17 | )
18 |
19 | # Apply the standard set of build settings. This can be removed for applications
20 | # that need different build settings.
21 | apply_standard_settings(${BINARY_NAME})
22 |
23 | # Add preprocessor definitions for the build version.
24 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION=\"${FLUTTER_VERSION}\"")
25 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MAJOR=${FLUTTER_VERSION_MAJOR}")
26 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MINOR=${FLUTTER_VERSION_MINOR}")
27 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_PATCH=${FLUTTER_VERSION_PATCH}")
28 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_BUILD=${FLUTTER_VERSION_BUILD}")
29 |
30 | # Disable Windows macros that collide with C++ standard library functions.
31 | target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX")
32 |
33 | # Add dependency libraries and include directories. Add any application-specific
34 | # dependencies here.
35 | target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app)
36 | target_link_libraries(${BINARY_NAME} PRIVATE "dwmapi.lib")
37 | target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}")
38 |
39 | # Run the Flutter tool portions of the build. This must not be removed.
40 | add_dependencies(${BINARY_NAME} flutter_assemble)
41 |
--------------------------------------------------------------------------------
/windows/runner/flutter_window.cpp:
--------------------------------------------------------------------------------
1 | #include "flutter_window.h"
2 |
3 | #include
4 |
5 | #include "flutter/generated_plugin_registrant.h"
6 |
7 | FlutterWindow::FlutterWindow(const flutter::DartProject& project)
8 | : project_(project) {}
9 |
10 | FlutterWindow::~FlutterWindow() {}
11 |
12 | bool FlutterWindow::OnCreate() {
13 | if (!Win32Window::OnCreate()) {
14 | return false;
15 | }
16 |
17 | RECT frame = GetClientArea();
18 |
19 | // The size here must match the window dimensions to avoid unnecessary surface
20 | // creation / destruction in the startup path.
21 | flutter_controller_ = std::make_unique(
22 | frame.right - frame.left, frame.bottom - frame.top, project_);
23 | // Ensure that basic setup of the controller was successful.
24 | if (!flutter_controller_->engine() || !flutter_controller_->view()) {
25 | return false;
26 | }
27 | RegisterPlugins(flutter_controller_->engine());
28 | SetChildContent(flutter_controller_->view()->GetNativeWindow());
29 |
30 | flutter_controller_->engine()->SetNextFrameCallback([&]() {
31 | this->Show();
32 | });
33 |
34 | return true;
35 | }
36 |
37 | void FlutterWindow::OnDestroy() {
38 | if (flutter_controller_) {
39 | flutter_controller_ = nullptr;
40 | }
41 |
42 | Win32Window::OnDestroy();
43 | }
44 |
45 | LRESULT
46 | FlutterWindow::MessageHandler(HWND hwnd, UINT const message,
47 | WPARAM const wparam,
48 | LPARAM const lparam) noexcept {
49 | // Give Flutter, including plugins, an opportunity to handle window messages.
50 | if (flutter_controller_) {
51 | std::optional result =
52 | flutter_controller_->HandleTopLevelWindowProc(hwnd, message, wparam,
53 | lparam);
54 | if (result) {
55 | return *result;
56 | }
57 | }
58 |
59 | switch (message) {
60 | case WM_FONTCHANGE:
61 | flutter_controller_->engine()->ReloadSystemFonts();
62 | break;
63 | }
64 |
65 | return Win32Window::MessageHandler(hwnd, message, wparam, lparam);
66 | }
67 |
--------------------------------------------------------------------------------
/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"walletconnect_modal_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/WalletConnectModalFlutter/867326d9eb1bb06abc3ff0889c9d56e7e8680496/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.cpp:
--------------------------------------------------------------------------------
1 | #include "utils.h"
2 |
3 | #include
4 | #include
5 | #include
6 | #include
7 |
8 | #include
9 |
10 | void CreateAndAttachConsole() {
11 | if (::AllocConsole()) {
12 | FILE *unused;
13 | if (freopen_s(&unused, "CONOUT$", "w", stdout)) {
14 | _dup2(_fileno(stdout), 1);
15 | }
16 | if (freopen_s(&unused, "CONOUT$", "w", stderr)) {
17 | _dup2(_fileno(stdout), 2);
18 | }
19 | std::ios::sync_with_stdio();
20 | FlutterDesktopResyncOutputStreams();
21 | }
22 | }
23 |
24 | std::vector GetCommandLineArguments() {
25 | // Convert the UTF-16 command line arguments to UTF-8 for the Engine to use.
26 | int argc;
27 | wchar_t** argv = ::CommandLineToArgvW(::GetCommandLineW(), &argc);
28 | if (argv == nullptr) {
29 | return std::vector();
30 | }
31 |
32 | std::vector command_line_arguments;
33 |
34 | // Skip the first argument as it's the binary name.
35 | for (int i = 1; i < argc; i++) {
36 | command_line_arguments.push_back(Utf8FromUtf16(argv[i]));
37 | }
38 |
39 | ::LocalFree(argv);
40 |
41 | return command_line_arguments;
42 | }
43 |
44 | std::string Utf8FromUtf16(const wchar_t* utf16_string) {
45 | if (utf16_string == nullptr) {
46 | return std::string();
47 | }
48 | int target_length = ::WideCharToMultiByte(
49 | CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string,
50 | -1, nullptr, 0, nullptr, nullptr)
51 | -1; // remove the trailing null character
52 | int input_length = (int)wcslen(utf16_string);
53 | std::string utf8_string;
54 | if (target_length <= 0 || target_length > utf8_string.max_size()) {
55 | return utf8_string;
56 | }
57 | utf8_string.resize(target_length);
58 | int converted_length = ::WideCharToMultiByte(
59 | CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string,
60 | input_length, utf8_string.data(), target_length, nullptr, nullptr);
61 | if (converted_length == 0) {
62 | return std::string();
63 | }
64 | return utf8_string;
65 | }
66 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------