├── .github ├── PULL_REQUEST_TEMPLATE.md └── workflows │ └── main.yaml ├── .gitignore ├── .idea └── runConfigurations │ ├── development.xml │ ├── production.xml │ └── staging.xml ├── .metadata ├── .vscode ├── extensions.json └── launch.json ├── LICENSE ├── README.md ├── analysis_options.yaml ├── android ├── .gitignore ├── app │ ├── build.gradle │ └── src │ │ ├── debug │ │ └── AndroidManifest.xml │ │ ├── development │ │ ├── ic_launcher-playstore.png │ │ └── res │ │ │ ├── drawable │ │ │ └── ic_launcher_foreground.xml │ │ │ ├── mipmap-anydpi-v26 │ │ │ ├── ic_launcher.xml │ │ │ └── ic_launcher_round.xml │ │ │ ├── mipmap-hdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-mdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxxhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ └── values │ │ │ └── ic_launcher_background.xml │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── ic_launcher-playstore.png │ │ ├── kotlin │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── verygoodcore │ │ │ │ └── MainActivity.kt │ │ └── res │ │ │ ├── drawable-v21 │ │ │ └── launch_background.xml │ │ │ ├── drawable │ │ │ ├── ic_launch_image.xml │ │ │ ├── ic_launcher_foreground.xml │ │ │ └── launch_background.xml │ │ │ ├── mipmap-anydpi-v26 │ │ │ ├── ic_launcher.xml │ │ │ └── ic_launcher_round.xml │ │ │ ├── mipmap-hdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-mdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxxhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ │ ├── values-night │ │ │ └── styles.xml │ │ │ └── values │ │ │ ├── ic_launcher_background.xml │ │ │ └── styles.xml │ │ ├── profile │ │ └── AndroidManifest.xml │ │ └── staging │ │ ├── ic_launcher-playstore.png │ │ └── res │ │ ├── drawable │ │ └── ic_launcher_foreground.xml │ │ ├── mipmap-anydpi-v26 │ │ ├── ic_launcher.xml │ │ └── ic_launcher_round.xml │ │ ├── mipmap-hdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-mdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxxhdpi │ │ ├── ic_launcher.png │ │ └── ic_launcher_round.png │ │ └── values │ │ └── ic_launcher_background.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties └── settings.gradle ├── assets ├── .env.dev.example ├── .evn.example ├── abi │ ├── ERC-20.json │ └── abi.json └── images │ └── svg │ └── logo.svg ├── coverage_badge.svg ├── 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 │ │ ├── development.xcscheme │ │ ├── production.xcscheme │ │ └── staging.xcscheme ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── IDEWorkspaceChecks.plist │ │ └── WorkspaceSettings.xcsettings └── Runner │ ├── AppDelegate.swift │ ├── Assets.xcassets │ ├── AppIcon-dev.appiconset │ │ ├── 100.png │ │ ├── 1024.png │ │ ├── 114.png │ │ ├── 120.png │ │ ├── 128.png │ │ ├── 144.png │ │ ├── 152.png │ │ ├── 16.png │ │ ├── 167.png │ │ ├── 172.png │ │ ├── 180.png │ │ ├── 196.png │ │ ├── 20.png │ │ ├── 216.png │ │ ├── 256.png │ │ ├── 29.png │ │ ├── 32.png │ │ ├── 40.png │ │ ├── 48.png │ │ ├── 50.png │ │ ├── 512.png │ │ ├── 55.png │ │ ├── 57.png │ │ ├── 58.png │ │ ├── 60.png │ │ ├── 64.png │ │ ├── 72.png │ │ ├── 76.png │ │ ├── 80.png │ │ ├── 87.png │ │ ├── 88.png │ │ └── Contents.json │ ├── AppIcon-stg.appiconset │ │ ├── 100.png │ │ ├── 1024.png │ │ ├── 114.png │ │ ├── 120.png │ │ ├── 128.png │ │ ├── 144.png │ │ ├── 152.png │ │ ├── 16.png │ │ ├── 167.png │ │ ├── 172.png │ │ ├── 180.png │ │ ├── 196.png │ │ ├── 20.png │ │ ├── 216.png │ │ ├── 256.png │ │ ├── 29.png │ │ ├── 32.png │ │ ├── 40.png │ │ ├── 48.png │ │ ├── 50.png │ │ ├── 512.png │ │ ├── 55.png │ │ ├── 57.png │ │ ├── 58.png │ │ ├── 60.png │ │ ├── 64.png │ │ ├── 72.png │ │ ├── 76.png │ │ ├── 80.png │ │ ├── 87.png │ │ ├── 88.png │ │ └── Contents.json │ ├── AppIcon.appiconset │ │ ├── 100.png │ │ ├── 1024.png │ │ ├── 114.png │ │ ├── 120.png │ │ ├── 128.png │ │ ├── 144.png │ │ ├── 152.png │ │ ├── 16.png │ │ ├── 167.png │ │ ├── 172.png │ │ ├── 180.png │ │ ├── 196.png │ │ ├── 20.png │ │ ├── 216.png │ │ ├── 256.png │ │ ├── 29.png │ │ ├── 32.png │ │ ├── 40.png │ │ ├── 48.png │ │ ├── 50.png │ │ ├── 512.png │ │ ├── 55.png │ │ ├── 57.png │ │ ├── 58.png │ │ ├── 60.png │ │ ├── 64.png │ │ ├── 72.png │ │ ├── 76.png │ │ ├── 80.png │ │ ├── 87.png │ │ ├── 88.png │ │ └── Contents.json │ ├── Contents.json │ └── LaunchImage.imageset │ │ ├── Contents.json │ │ ├── LaunchImage@1x.png │ │ ├── LaunchImage@2x.png │ │ ├── LaunchImage@3x.png │ │ └── README.md │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── Info.plist │ └── Runner-Bridging-Header.h ├── l10n.yaml ├── lib ├── app │ ├── app.dart │ ├── app_router.dart │ ├── cubit │ │ ├── app_cubit.dart │ │ └── app_state.dart │ ├── view │ │ └── app.dart │ └── widgets │ │ ├── dialogs.dart │ │ └── widgets.dart ├── bootstrap.dart ├── data │ └── repositories │ │ ├── contract_repository_impl.dart │ │ ├── phrase_repository_impl.dart │ │ └── repositories.dart ├── domain │ ├── models │ │ ├── models.dart │ │ └── wallet_model.dart │ └── repositories │ │ ├── contract_repository.dart │ │ ├── phrase_repository.dart │ │ ├── repositories.dart │ │ └── token_repository.dart ├── l10n │ ├── arb │ │ ├── app_en.arb │ │ └── app_es.arb │ └── l10n.dart ├── main_development.dart ├── main_production.dart ├── main_staging.dart └── presentation │ ├── authentication │ ├── authentication.dart │ ├── consent │ │ ├── consent.dart │ │ └── view │ │ │ └── consent_page.dart │ ├── create_pin │ │ ├── create_pin.dart │ │ ├── cubit │ │ │ ├── create_pin_cubit.dart │ │ │ └── create_pin_state.dart │ │ └── view │ │ │ └── create_pin_page.dart │ ├── create_wallet │ │ ├── create_wallet.dart │ │ └── view │ │ │ └── create_wallet_page.dart │ ├── landing │ │ ├── cubit │ │ │ ├── auth_landing_cubit.dart │ │ │ └── auth_landing_state.dart │ │ ├── landing.dart │ │ └── view │ │ │ └── landing_page.dart │ └── seed_phrase │ │ ├── cubit │ │ ├── seed_phrase_cubit.dart │ │ └── seed_phrase_state.dart │ │ ├── seed_phrase.dart │ │ ├── view │ │ ├── confirm_seed_page.dart │ │ └── seed_phrase_page.dart │ │ └── widgets │ │ ├── mnemonics_chip.dart │ │ └── widgets.dart │ ├── home │ ├── bloc │ │ ├── home_bloc.dart │ │ ├── home_event.dart │ │ └── home_state.dart │ ├── cubit │ │ ├── add_token_cubit.dart │ │ ├── add_token_state.dart │ │ ├── home_cubit.dart │ │ └── home_state.dart │ ├── home.dart │ ├── view │ │ └── home_page.dart │ └── widgets │ │ ├── action_button.dart │ │ ├── add_token_bottom_sheet.dart │ │ ├── send_bottom_sheet.dart │ │ ├── swap_bottom_sheet.dart │ │ └── widgets.dart │ └── landing │ ├── landing.dart │ └── view │ ├── landing_page.dart │ └── splash_page.dart ├── packages └── cs_ui │ ├── README.md │ ├── analysis_options.yaml │ ├── lib │ ├── cs_ui.dart │ └── src │ │ ├── colors.dart │ │ ├── extension │ │ ├── extension.dart │ │ ├── size.dart │ │ └── stringx.dart │ │ ├── navigation │ │ ├── app_bottom_navigation.dart │ │ └── navigation.dart │ │ ├── theme.dart │ │ ├── typography │ │ ├── font_weights.dart │ │ ├── text_styles.dart │ │ └── typography.dart │ │ └── widgets │ │ ├── cs_flat_button.dart │ │ ├── custom_text_field.dart │ │ ├── input_box.dart │ │ ├── intl_phone_text_field.dart │ │ ├── loader_button.dart │ │ ├── otp_text_field.dart │ │ ├── phone_number_input.dart │ │ ├── select_box.dart │ │ ├── solid_button.dart │ │ ├── solid_material_button.dart │ │ ├── text_area.dart │ │ ├── utils.dart │ │ └── widget.dart │ ├── pubspec.yaml │ └── test │ └── src │ └── cs_ui_test.dart ├── pubspec.lock ├── pubspec.yaml ├── screenshots └── import_token.png ├── test ├── app │ └── view │ │ └── app_test.dart ├── counter │ ├── cubit │ │ └── counter_cubit_test.dart │ └── view │ │ └── counter_page_test.dart └── helpers │ ├── helpers.dart │ └── pump_app.dart ├── web ├── favicon.png ├── icons │ ├── Icon-192.png │ ├── Icon-512.png │ └── favicon.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/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 8 | 9 | ## Description 10 | 11 | 12 | 13 | ## Type of Change 14 | 15 | 16 | 17 | - [ ] ✨ New feature (non-breaking change which adds functionality) 18 | - [ ] 🛠️ Bug fix (non-breaking change which fixes an issue) 19 | - [ ] ❌ Breaking change (fix or feature that would cause existing functionality to change) 20 | - [ ] 🧹 Code refactor 21 | - [ ] ✅ Build configuration change 22 | - [ ] 📝 Documentation 23 | - [ ] 🗑️ Chore 24 | -------------------------------------------------------------------------------- /.github/workflows/main.yaml: -------------------------------------------------------------------------------- 1 | name: crypto_wallet 2 | 3 | on: [pull_request, push] 4 | 5 | jobs: 6 | build: 7 | uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/flutter_package.yml@v1 8 | with: 9 | flutter_channel: stable 10 | flutter_version: 2.10.0 11 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.lock 4 | *.log 5 | *.pyc 6 | *.swp 7 | .DS_Store 8 | .atom/ 9 | .buildlog/ 10 | .history 11 | .svn/ 12 | 13 | # IntelliJ related 14 | *.iml 15 | *.ipr 16 | *.iws 17 | .idea/* 18 | 19 | # Visual Studio Code related 20 | .classpath 21 | .project 22 | .settings/ 23 | .vscode/* 24 | 25 | # Flutter repo-specific 26 | /bin/cache/ 27 | /bin/mingit/ 28 | /dev/benchmarks/mega_gallery/ 29 | /dev/bots/.recipe_deps 30 | /dev/bots/android_tools/ 31 | /dev/docs/doc/ 32 | /dev/docs/flutter.docs.zip 33 | /dev/docs/lib/ 34 | /dev/docs/pubspec.yaml 35 | /dev/integration_tests/**/xcuserdata 36 | /dev/integration_tests/**/Pods 37 | /packages/flutter/coverage/ 38 | version 39 | 40 | # packages file containing multi-root paths 41 | .packages.generated 42 | 43 | # Flutter/Dart/Pub related 44 | **/doc/api/ 45 | **/ios/Flutter/.last_build_id 46 | .dart_tool/ 47 | .flutter-plugins 48 | .flutter-plugins-dependencies 49 | .packages 50 | .pub-cache/ 51 | .pub/ 52 | build/ 53 | flutter_*.png 54 | linked_*.ds 55 | unlinked.ds 56 | unlinked_spec.ds 57 | .fvm/ 58 | 59 | # Android related 60 | **/android/**/gradle-wrapper.jar 61 | **/android/.gradle 62 | **/android/captures/ 63 | **/android/gradlew 64 | **/android/gradlew.bat 65 | **/android/local.properties 66 | **/android/**/GeneratedPluginRegistrant.java 67 | **/android/key.properties 68 | **/android/.idea/ 69 | *.jks 70 | 71 | # iOS/XCode related 72 | **/ios/**/*.mode1v3 73 | **/ios/**/*.mode2v3 74 | **/ios/**/*.moved-aside 75 | **/ios/**/*.pbxuser 76 | **/ios/**/*.perspectivev3 77 | **/ios/**/*sync/ 78 | **/ios/**/.sconsign.dblite 79 | **/ios/**/.tags* 80 | **/ios/**/.vagrant/ 81 | **/ios/**/DerivedData/ 82 | **/ios/**/Icon? 83 | **/ios/**/Pods/ 84 | **/ios/**/.symlinks/ 85 | **/ios/**/profile 86 | **/ios/**/xcuserdata 87 | **/ios/.generated/ 88 | **/ios/Flutter/App.framework 89 | **/ios/Flutter/Flutter.framework 90 | **/ios/Flutter/Flutter.podspec 91 | **/ios/Flutter/Generated.xcconfig 92 | **/ios/Flutter/app.flx 93 | **/ios/Flutter/app.zip 94 | **/ios/Flutter/.last_build_id 95 | **/ios/Flutter/flutter_assets/ 96 | **/ios/Flutter/flutter_export_environment.sh 97 | **/ios/ServiceDefinitions.json 98 | **/ios/Runner/GeneratedPluginRegistrant.* 99 | 100 | # Coverage 101 | coverage/ 102 | 103 | # Submodules 104 | !pubspec.lock 105 | packages/**/pubspec.lock 106 | 107 | # Web related 108 | lib/generated_plugin_registrant.dart 109 | 110 | # Symbolication related 111 | app.*.symbols 112 | 113 | # Obfuscation related 114 | app.*.map.json 115 | 116 | # Environment variables 117 | *.env 118 | *.env.dev 119 | 120 | # Exceptions to the above rules. 121 | !**/ios/**/default.mode1v3 122 | !**/ios/**/default.mode2v3 123 | !**/ios/**/default.pbxuser 124 | !**/ios/**/default.perspectivev3 125 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 126 | !/dev/ci/**/Gemfile.lock 127 | !.vscode/extensions.json 128 | !.vscode/launch.json 129 | !.idea/codeStyles/ 130 | !.idea/dictionaries/ 131 | !.idea/runConfigurations/ 132 | -------------------------------------------------------------------------------- /.idea/runConfigurations/development.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | -------------------------------------------------------------------------------- /.idea/runConfigurations/production.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | -------------------------------------------------------------------------------- /.idea/runConfigurations/staging.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | -------------------------------------------------------------------------------- /.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 and should not be manually edited. 5 | 6 | version: 7 | revision: 9b2d32b605630f28625709ebd9d78ab3016b2bf6 8 | channel: stable 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | // See https://go.microsoft.com/fwlink/?LinkId=827846 3 | // for the documentation about the extensions.json format 4 | "recommendations": [ 5 | "dart-code.dart-code", 6 | "dart-code.flutter", 7 | "felixangelov.bloc" 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "name": "Launch development", 9 | "request": "launch", 10 | "type": "dart", 11 | "program": "lib/main_development.dart", 12 | "args": [ 13 | "--flavor", 14 | "development", 15 | "--target", 16 | "lib/main_development.dart" 17 | ] 18 | }, 19 | { 20 | "name": "Launch staging", 21 | "request": "launch", 22 | "type": "dart", 23 | "program": "lib/main_staging.dart", 24 | "args": ["--flavor", "staging", "--target", "lib/main_staging.dart"] 25 | }, 26 | { 27 | "name": "Launch production", 28 | "request": "launch", 29 | "type": "dart", 30 | "program": "lib/main_production.dart", 31 | "args": ["--flavor", "production", "--target", "lib/main_production.dart"] 32 | } 33 | ] 34 | } 35 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Very Good Ventures 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Crypto Wallet 2 | 3 | ![coverage][coverage_badge] 4 | [![style: very good analysis][very_good_analysis_badge]][very_good_analysis_link] 5 | [![License: MIT][license_badge]][license_link] 6 | 7 | 8 | 9 | ## Getting Started 🚀 10 | 11 | This project contains 3 flavors: 12 | 13 | - development 14 | - staging 15 | - production 16 | 17 | To run the desired flavor either use the launch configuration in VSCode/Android Studio or use the following commands: 18 | 19 | ```sh 20 | # Development 21 | $ flutter run --flavor development --target lib/main_development.dart 22 | 23 | # Staging 24 | $ flutter run --flavor staging --target lib/main_staging.dart 25 | 26 | # Production 27 | $ flutter run --flavor production --target lib/main_production.dart 28 | ``` 29 | 30 | ## 📸 Screen Shots 31 | 32 |

33 | 34 |

35 | 36 | 37 | 38 | [coverage_badge]: coverage_badge.svg 39 | [flutter_localizations_link]: https://api.flutter.dev/flutter/flutter_localizations/flutter_localizations-library.html 40 | [internationalization_link]: https://flutter.dev/docs/development/accessibility-and-localization/internationalization 41 | [license_badge]: https://img.shields.io/badge/license-MIT-blue.svg 42 | [license_link]: https://opensource.org/licenses/MIT 43 | [very_good_analysis_badge]: https://img.shields.io/badge/style-very_good_analysis-B22C89.svg 44 | [very_good_analysis_link]: https://pub.dev/packages/very_good_analysis 45 | [very_good_cli_link]: https://github.com/VeryGoodOpenSource/very_good_cli 46 | -------------------------------------------------------------------------------- /analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:very_good_analysis/analysis_options.2.4.0.yaml 2 | linter: 3 | rules: 4 | public_member_api_docs: false 5 | -------------------------------------------------------------------------------- /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 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/development/ic_launcher-playstore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/android/app/src/development/ic_launcher-playstore.png -------------------------------------------------------------------------------- /android/app/src/development/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /android/app/src/development/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /android/app/src/development/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/android/app/src/development/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/development/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/android/app/src/development/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/development/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/android/app/src/development/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/development/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/android/app/src/development/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/development/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/android/app/src/development/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/development/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/android/app/src/development/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/development/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/android/app/src/development/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/development/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/android/app/src/development/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/development/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/android/app/src/development/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/development/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/android/app/src/development/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/development/res/values/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFFFFF 4 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 14 | 18 | 22 | 23 | 24 | 25 | 26 | 27 | 29 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /android/app/src/main/ic_launcher-playstore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/android/app/src/main/ic_launcher-playstore.png -------------------------------------------------------------------------------- /android/app/src/main/kotlin/com/example/verygoodcore/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.verygoodcore.crypto_wallet 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 | 8 | 9 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFFFFF 4 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/staging/ic_launcher-playstore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/android/app/src/staging/ic_launcher-playstore.png -------------------------------------------------------------------------------- /android/app/src/staging/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /android/app/src/staging/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /android/app/src/staging/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/android/app/src/staging/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/staging/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/android/app/src/staging/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/staging/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/android/app/src/staging/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/staging/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/android/app/src/staging/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/staging/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/android/app/src/staging/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/staging/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/android/app/src/staging/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/staging/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/android/app/src/staging/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/staging/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/android/app/src/staging/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/staging/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/android/app/src/staging/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/staging/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/android/app/src/staging/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/staging/res/values/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFFFFF 4 | -------------------------------------------------------------------------------- /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 | #Fri Jun 23 08:50:38 CEST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip 7 | -------------------------------------------------------------------------------- /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/.env.dev.example: -------------------------------------------------------------------------------- 1 | ALCHEMY_API= -------------------------------------------------------------------------------- /assets/.evn.example: -------------------------------------------------------------------------------- 1 | ALCHEMY_API= -------------------------------------------------------------------------------- /assets/abi/abi.json: -------------------------------------------------------------------------------- 1 | [{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}] -------------------------------------------------------------------------------- /coverage_badge.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | coverage 16 | coverage 17 | 100% 18 | 100% 19 | 20 | -------------------------------------------------------------------------------- /ios/.gitignore: -------------------------------------------------------------------------------- 1 | *.mode1v3 2 | *.mode2v3 3 | *.moved-aside 4 | *.pbxuser 5 | *.perspectivev3 6 | **/*sync/ 7 | .sconsign.dblite 8 | .tags* 9 | **/.vagrant/ 10 | **/DerivedData/ 11 | Icon? 12 | **/Pods/ 13 | **/.symlinks/ 14 | profile 15 | xcuserdata 16 | **/.generated/ 17 | Flutter/App.framework 18 | Flutter/Flutter.framework 19 | Flutter/Flutter.podspec 20 | Flutter/Generated.xcconfig 21 | Flutter/app.flx 22 | Flutter/app.zip 23 | Flutter/flutter_assets/ 24 | Flutter/flutter_export_environment.sh 25 | ServiceDefinitions.json 26 | Runner/GeneratedPluginRegistrant.* 27 | 28 | # Exceptions to above rules. 29 | !default.mode1v3 30 | !default.mode2v3 31 | !default.pbxuser 32 | !default.perspectivev3 33 | -------------------------------------------------------------------------------- /ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 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 | 9.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, '9.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 | end 36 | 37 | post_install do |installer| 38 | installer.pods_project.targets.each do |target| 39 | flutter_additional_ios_build_settings(target) 40 | end 41 | end 42 | -------------------------------------------------------------------------------- /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.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 41 | 42 | 52 | 54 | 60 | 61 | 62 | 63 | 69 | 71 | 77 | 78 | 79 | 80 | 82 | 83 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/xcshareddata/xcschemes/development.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 45 | 51 | 52 | 53 | 54 | 60 | 62 | 68 | 69 | 70 | 71 | 73 | 74 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/xcshareddata/xcschemes/production.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 45 | 51 | 52 | 53 | 54 | 60 | 62 | 68 | 69 | 70 | 71 | 73 | 74 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/xcshareddata/xcschemes/staging.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 45 | 51 | 52 | 53 | 54 | 60 | 62 | 68 | 69 | 70 | 71 | 73 | 74 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 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-dev.appiconset/100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/100.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/1024.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/114.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/120.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/128.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/144.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/152.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/16.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/167.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/167.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/172.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/172.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/180.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/196.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/196.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/20.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/216.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/216.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/256.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/29.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/32.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/40.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/48.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/50.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/512.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/55.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/55.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/57.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/58.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/58.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/60.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/64.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/72.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/76.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/80.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/87.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/87.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/88.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon-dev.appiconset/88.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/100.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/1024.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/114.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/120.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/128.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/144.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/152.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/16.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/167.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/167.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/172.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/172.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/180.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/196.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/196.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/20.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/216.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/216.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/256.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/29.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/32.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/40.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/48.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/50.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/512.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/55.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/55.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/57.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/58.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/58.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/60.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/64.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/72.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/76.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/80.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/87.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/87.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/88.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon-stg.appiconset/88.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon.appiconset/100.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon.appiconset/1024.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon.appiconset/114.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon.appiconset/120.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon.appiconset/128.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon.appiconset/144.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon.appiconset/152.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon.appiconset/16.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/167.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon.appiconset/167.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/172.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon.appiconset/172.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon.appiconset/180.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/196.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon.appiconset/196.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon.appiconset/20.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/216.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon.appiconset/216.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon.appiconset/256.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon.appiconset/29.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon.appiconset/32.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon.appiconset/40.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon.appiconset/48.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon.appiconset/50.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon.appiconset/512.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/55.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon.appiconset/55.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon.appiconset/57.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/58.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon.appiconset/58.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon.appiconset/60.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon.appiconset/64.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon.appiconset/72.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon.appiconset/76.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon.appiconset/80.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/87.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon.appiconset/87.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/88.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/AppIcon.appiconset/88.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "LaunchImage@1x.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "filename" : "LaunchImage@2x.png", 10 | "idiom" : "universal", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "filename" : "LaunchImage@3x.png", 15 | "idiom" : "universal", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "author" : "xcode", 21 | "version" : 1 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/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/LaunchScreen.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 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /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 | CFBundleLocalizations 6 | 7 | en 8 | es 9 | 10 | CFBundleDevelopmentRegion 11 | $(DEVELOPMENT_LANGUAGE) 12 | CFBundleDisplayName 13 | $(FLAVOR_APP_NAME) 14 | CFBundleExecutable 15 | $(EXECUTABLE_NAME) 16 | CFBundleIdentifier 17 | $(PRODUCT_BUNDLE_IDENTIFIER) 18 | CFBundleInfoDictionaryVersion 19 | 6.0 20 | CFBundleName 21 | Crypto Wallet 22 | CFBundlePackageType 23 | APPL 24 | CFBundleShortVersionString 25 | $(FLUTTER_BUILD_NAME) 26 | CFBundleSignature 27 | ???? 28 | CFBundleVersion 29 | $(FLUTTER_BUILD_NUMBER) 30 | LSRequiresIPhoneOS 31 | 32 | UILaunchStoryboardName 33 | LaunchScreen 34 | UIMainStoryboardFile 35 | Main 36 | UISupportedInterfaceOrientations 37 | 38 | UIInterfaceOrientationPortrait 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | UISupportedInterfaceOrientations~ipad 43 | 44 | UIInterfaceOrientationPortrait 45 | UIInterfaceOrientationPortraitUpsideDown 46 | UIInterfaceOrientationLandscapeLeft 47 | UIInterfaceOrientationLandscapeRight 48 | 49 | UIViewControllerBasedStatusBarAppearance 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /l10n.yaml: -------------------------------------------------------------------------------- 1 | arb-dir: lib/l10n/arb 2 | template-arb-file: app_en.arb 3 | output-localization-file: app_localizations.dart 4 | nullable-getter: false 5 | -------------------------------------------------------------------------------- /lib/app/app.dart: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2022, Very Good Ventures 2 | // https://verygood.ventures 3 | // 4 | // Use of this source code is governed by an MIT-style 5 | // license that can be found in the LICENSE file or at 6 | // https://opensource.org/licenses/MIT. 7 | 8 | export 'app_router.dart'; 9 | export 'cubit/app_cubit.dart'; 10 | export 'view/app.dart'; 11 | export 'widgets/widgets.dart'; 12 | -------------------------------------------------------------------------------- /lib/app/cubit/app_cubit.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:bloc/bloc.dart'; 4 | import 'package:crypto_wallet/domain/models/wallet_model.dart'; 5 | import 'package:crypto_wallet/domain/repositories/phrase_repository.dart'; 6 | import 'package:equatable/equatable.dart'; 7 | 8 | part 'app_state.dart'; 9 | 10 | class AppCubit extends Cubit { 11 | AppCubit({required PhraseRepository phraseRepository}) 12 | : _phraseRepository = phraseRepository, 13 | super(const AppState()) { 14 | _streamSubscription = _phraseRepository.status.listen( 15 | updateAuthStatus, 16 | ); 17 | } 18 | 19 | late final StreamSubscription _streamSubscription; 20 | 21 | final PhraseRepository _phraseRepository; 22 | 23 | void updateWalletModel(WalletModel walletModel) { 24 | emit(state.copyWith(wallet: walletModel)); 25 | } 26 | 27 | void updateAuthStatus(AuthStatus status) { 28 | emit( 29 | state.copyWith( 30 | authStatus: status, 31 | ), 32 | ); 33 | } 34 | 35 | @override 36 | Future close() { 37 | _streamSubscription.cancel(); 38 | return super.close(); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /lib/app/cubit/app_state.dart: -------------------------------------------------------------------------------- 1 | part of 'app_cubit.dart'; 2 | 3 | class AppState extends Equatable { 4 | const AppState({ 5 | this.wallet = const WalletModel(), 6 | this.authStatus = AuthStatus.unknown, 7 | }); 8 | 9 | AppState copyWith({ 10 | final WalletModel? wallet, 11 | final AuthStatus? authStatus, 12 | }) => 13 | AppState( 14 | wallet: wallet ?? this.wallet, 15 | authStatus: authStatus ?? this.authStatus, 16 | ); 17 | 18 | final WalletModel wallet; 19 | final AuthStatus authStatus; 20 | 21 | @override 22 | List get props => [wallet, authStatus]; 23 | } 24 | -------------------------------------------------------------------------------- /lib/app/view/app.dart: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2022, Very Good Ventures 2 | // https://verygood.ventures 3 | // 4 | // Use of this source code is governed by an MIT-style 5 | // license that can be found in the LICENSE file or at 6 | // https://opensource.org/licenses/MIT. 7 | 8 | import 'package:crypto_wallet/app/app.dart'; 9 | import 'package:crypto_wallet/domain/repositories/contract_repository.dart'; 10 | import 'package:crypto_wallet/domain/repositories/phrase_repository.dart'; 11 | import 'package:crypto_wallet/presentation/authentication/seed_phrase/cubit/seed_phrase_cubit.dart'; 12 | import 'package:cs_ui/cs_ui.dart'; 13 | import 'package:flutter/material.dart'; 14 | import 'package:flutter_bloc/flutter_bloc.dart'; 15 | // import 'package:flutter_localizations/flutter_localizations.dart'; 16 | 17 | class App extends StatelessWidget { 18 | const App({ 19 | Key? key, 20 | required this.phraseRepository, 21 | required this.contractRepository, 22 | }) : super(key: key); 23 | 24 | final PhraseRepository phraseRepository; 25 | final ContractRepository contractRepository; 26 | 27 | @override 28 | Widget build(BuildContext context) { 29 | return MultiRepositoryProvider( 30 | providers: [ 31 | RepositoryProvider( 32 | create: (_) => phraseRepository, 33 | ), 34 | RepositoryProvider( 35 | create: (_) => contractRepository, 36 | ), 37 | ], 38 | child: MultiBlocProvider( 39 | providers: [ 40 | BlocProvider( 41 | create: (context) => SeedPhraseCubit( 42 | phraseRepository: phraseRepository, 43 | ), 44 | ), 45 | BlocProvider( 46 | create: (context) => AppCubit(phraseRepository: phraseRepository), 47 | ), 48 | ], 49 | child: const _App(), 50 | ), 51 | ); 52 | } 53 | } 54 | 55 | class _App extends StatelessWidget { 56 | const _App({Key? key}) : super(key: key); 57 | 58 | @override 59 | Widget build(BuildContext context) { 60 | return MaterialApp( 61 | debugShowCheckedModeBanner: false, 62 | theme: ThemeData( 63 | appBarTheme: const AppBarTheme(color: Color(0xFF13B9FF)), 64 | scaffoldBackgroundColor: CsColors.scaffold, 65 | colorScheme: ColorScheme.fromSwatch( 66 | accentColor: const Color(0xFF13B9FF), 67 | ), 68 | ), 69 | // localizationsDelegates: const [ 70 | // AppLocalizations.delegate, 71 | // GlobalMaterialLocalizations.delegate, 72 | // ], 73 | // supportedLocales: AppLocalizations.supportedLocales, 74 | initialRoute: WalletPages.splash, 75 | onGenerateRoute: AppRouter.onRouteGenerate, 76 | ); 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /lib/app/widgets/dialogs.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | extension ContextX on BuildContext {} 4 | -------------------------------------------------------------------------------- /lib/app/widgets/widgets.dart: -------------------------------------------------------------------------------- 1 | export 'dialogs.dart'; 2 | -------------------------------------------------------------------------------- /lib/bootstrap.dart: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2022, Very Good Ventures 2 | // https://verygood.ventures 3 | // 4 | // Use of this source code is governed by an MIT-style 5 | // license that can be found in the LICENSE file or at 6 | // https://opensource.org/licenses/MIT. 7 | 8 | import 'dart:async'; 9 | import 'dart:developer'; 10 | 11 | import 'package:bloc/bloc.dart'; 12 | import 'package:flutter/widgets.dart'; 13 | 14 | class AppBlocObserver extends BlocObserver { 15 | @override 16 | void onChange(BlocBase bloc, Change change) { 17 | super.onChange(bloc, change); 18 | log('onChange(${bloc.runtimeType}, $change)'); 19 | } 20 | 21 | @override 22 | void onError(BlocBase bloc, Object error, StackTrace stackTrace) { 23 | log('onError(${bloc.runtimeType}, $error, $stackTrace)'); 24 | super.onError(bloc, error, stackTrace); 25 | } 26 | } 27 | 28 | Future bootstrap(FutureOr Function() builder) async { 29 | FlutterError.onError = (details) { 30 | log(details.exceptionAsString(), stackTrace: details.stack); 31 | }; 32 | 33 | await runZonedGuarded( 34 | () async { 35 | await BlocOverrides.runZoned( 36 | () async => runApp(await builder()), 37 | blocObserver: AppBlocObserver(), 38 | ); 39 | }, 40 | (error, stackTrace) => log(error.toString(), stackTrace: stackTrace), 41 | ); 42 | } 43 | -------------------------------------------------------------------------------- /lib/data/repositories/phrase_repository_impl.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | import 'dart:convert'; 3 | 4 | import 'package:bip39/bip39.dart' as bip39; 5 | import 'package:crypto_wallet/domain/models/wallet_model.dart'; 6 | import 'package:crypto_wallet/domain/repositories/phrase_repository.dart'; 7 | import 'package:ed25519_hd_key/ed25519_hd_key.dart'; 8 | import 'package:encrypt/encrypt.dart'; 9 | import 'package:flutter_secure_storage/flutter_secure_storage.dart'; 10 | import 'package:hex/hex.dart'; 11 | import 'package:web3dart/web3dart.dart'; 12 | 13 | class IncorrectPasswordException implements Exception {} 14 | 15 | class PhraseRepositoryImpl extends PhraseRepository { 16 | PhraseRepositoryImpl({FlutterSecureStorage? storage}) 17 | : _storage = storage ?? const FlutterSecureStorage(); 18 | 19 | final FlutterSecureStorage _storage; 20 | 21 | @override 22 | Stream get status async* { 23 | final data = await _storage.read(key: 'data'); 24 | final ivData = await _storage.read(key: 'iv'); 25 | final salt = await _storage.read(key: 'salt'); 26 | if (data != null && ivData != null && salt != null) { 27 | yield AuthStatus.authenticated; 28 | } else { 29 | yield AuthStatus.unauthenticated; 30 | } 31 | } 32 | 33 | @override 34 | Future generatePrivatekey(String mnemonics) async { 35 | final seedBytes = bip39.mnemonicToSeed(mnemonics); 36 | final masterKey = await ED25519_HD_KEY.getMasterKeyFromSeed(seedBytes); 37 | final privateKeyHex = HEX.encode(masterKey.key); 38 | return privateKeyHex; 39 | } 40 | 41 | @override 42 | Future generatePublicKey(String privateKeyHex) async { 43 | final privateKey = EthPrivateKey.fromHex(privateKeyHex); 44 | final publicAddress = await privateKey.extractAddress(); 45 | return publicAddress; 46 | } 47 | 48 | @override 49 | String getMnemonics() => bip39.generateMnemonic(); 50 | 51 | @override 52 | Future saveData(WalletModel data, String password) async { 53 | final salt = IV.fromSecureRandom(16); 54 | final secretKey = Key.fromUtf8(password).stretch(16, salt: salt.bytes); 55 | final jsonData = json.encode(data.toJson()); 56 | final iv = IV.fromSecureRandom(16); 57 | final encrypter = Encrypter(AES(secretKey, mode: AESMode.cbc)); 58 | 59 | final encrypted = encrypter.encrypt(jsonData, iv: iv); 60 | await _storage.write(key: 'data', value: encrypted.base64); 61 | await _storage.write(key: 'iv', value: iv.base64); 62 | await _storage.write(key: 'salt', value: salt.base64); 63 | } 64 | 65 | @override 66 | Future retrieveData(String password) async { 67 | try { 68 | final data = await _storage.read(key: 'data'); 69 | final iv = await _storage.read(key: 'iv'); 70 | final salt = await _storage.read(key: 'salt'); 71 | if (data == null || iv == null || salt == null) return null; 72 | final secretKey = 73 | Key.fromUtf8(password).stretch(16, salt: IV.fromBase64(salt).bytes); 74 | final encrypter = Encrypter(AES(secretKey, mode: AESMode.cbc)); 75 | 76 | final encrypted = encrypter.decrypt( 77 | Encrypted.fromBase64(data), 78 | iv: IV.fromBase64(iv), 79 | ); 80 | final jsonData = jsonDecode(encrypted) as Map; 81 | return WalletModel.fromJson(jsonData); 82 | } catch (e) { 83 | throw IncorrectPasswordException(); 84 | } 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /lib/data/repositories/repositories.dart: -------------------------------------------------------------------------------- 1 | export 'contract_repository_impl.dart'; 2 | export 'phrase_repository_impl.dart'; 3 | -------------------------------------------------------------------------------- /lib/domain/models/models.dart: -------------------------------------------------------------------------------- 1 | export 'wallet_model.dart'; 2 | -------------------------------------------------------------------------------- /lib/domain/models/wallet_model.dart: -------------------------------------------------------------------------------- 1 | class WalletModel { 2 | const WalletModel({ 3 | this.privateKey, 4 | this.publicKey, 5 | }); 6 | 7 | factory WalletModel.fromJson(Map json) => WalletModel( 8 | privateKey: json['private_key'] as String?, 9 | publicKey: json['public_key'] as String?, 10 | ); 11 | 12 | Map toJson() => { 13 | 'private_key': privateKey, 14 | 'public_key': publicKey, 15 | }; 16 | 17 | final String? privateKey; 18 | final String? publicKey; 19 | } 20 | -------------------------------------------------------------------------------- /lib/domain/repositories/contract_repository.dart: -------------------------------------------------------------------------------- 1 | import 'package:web3dart/web3dart.dart'; 2 | 3 | abstract class ContractRepository { 4 | Future initialize(); 5 | 6 | Future getTokenSymbol(String contractAddress); 7 | 8 | Future getTokenDecimal(String contractAddress); 9 | 10 | Future getTokenBalance(String contractAddress, String publicKey); 11 | 12 | Future getTransactions(String contractAddress); 13 | 14 | Stream getEthBalance(String publicKey); 15 | 16 | Future sendEth( 17 | {required String privateKey, required String to, required BigInt amount}); 18 | 19 | void dispose(); 20 | } 21 | -------------------------------------------------------------------------------- /lib/domain/repositories/phrase_repository.dart: -------------------------------------------------------------------------------- 1 | import 'package:crypto_wallet/domain/models/wallet_model.dart'; 2 | import 'package:web3dart/web3dart.dart'; 3 | 4 | enum AuthStatus { 5 | authenticated, 6 | unauthenticated, 7 | unknown, 8 | } 9 | 10 | abstract class PhraseRepository { 11 | Future generatePrivatekey(String mnemonics); 12 | 13 | Future generatePublicKey(String privateKeyHex); 14 | 15 | String getMnemonics(); 16 | 17 | Future saveData(WalletModel data, String password); 18 | 19 | Future retrieveData(String password); 20 | 21 | Stream get status; 22 | } 23 | -------------------------------------------------------------------------------- /lib/domain/repositories/repositories.dart: -------------------------------------------------------------------------------- 1 | export 'contract_repository.dart'; 2 | export 'phrase_repository.dart'; 3 | export 'token_repository.dart'; 4 | -------------------------------------------------------------------------------- /lib/domain/repositories/token_repository.dart: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/lib/domain/repositories/token_repository.dart -------------------------------------------------------------------------------- /lib/l10n/arb/app_en.arb: -------------------------------------------------------------------------------- 1 | { 2 | "@@locale": "en", 3 | "counterAppBarTitle": "Counter", 4 | "@counterAppBarTitle": { 5 | "description": "Text shown in the AppBar of the Counter Page" 6 | } 7 | } -------------------------------------------------------------------------------- /lib/l10n/arb/app_es.arb: -------------------------------------------------------------------------------- 1 | { 2 | "@@locale": "es", 3 | "counterAppBarTitle": "Contador", 4 | "@counterAppBarTitle": { 5 | "description": "Texto mostrado en la AppBar de la página del contador" 6 | } 7 | } -------------------------------------------------------------------------------- /lib/l10n/l10n.dart: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2022, Very Good Ventures 2 | // https://verygood.ventures 3 | // 4 | // Use of this source code is governed by an MIT-style 5 | // license that can be found in the LICENSE file or at 6 | // https://opensource.org/licenses/MIT. 7 | 8 | // import 'package:flutter/widgets.dart'; 9 | // import 'package:flutter_gen/gen_l10n/app_localizations.dart'; 10 | 11 | // export 'package:flutter_gen/gen_l10n/app_localizations.dart'; 12 | 13 | // extension AppLocalizationsX on BuildContext { 14 | // AppLocalizations get l10n => AppLocalizations.of(this); 15 | // } 16 | -------------------------------------------------------------------------------- /lib/main_development.dart: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2022, Very Good Ventures 2 | // https://verygood.ventures 3 | // 4 | // Use of this source code is governed by an MIT-style 5 | // license that can be found in the LICENSE file or at 6 | // https://opensource.org/licenses/MIT. 7 | 8 | import 'package:crypto_wallet/app/app.dart'; 9 | import 'package:crypto_wallet/bootstrap.dart'; 10 | import 'package:crypto_wallet/data/repositories/repositories.dart'; 11 | import 'package:cryptography_flutter/cryptography_flutter.dart'; 12 | import 'package:flutter_dotenv/flutter_dotenv.dart'; 13 | import 'package:flutter_secure_storage/flutter_secure_storage.dart'; 14 | 15 | Future main() async { 16 | const storage = FlutterSecureStorage(); 17 | FlutterCryptography.enable(); 18 | await dotenv.load(fileName: 'assets/.env.dev'); 19 | await bootstrap( 20 | () => App( 21 | phraseRepository: PhraseRepositoryImpl(storage: storage), 22 | contractRepository: ContractRepositoryImpl( 23 | phraseRepository: PhraseRepositoryImpl(storage: storage), 24 | ), 25 | ), 26 | ); 27 | } 28 | -------------------------------------------------------------------------------- /lib/main_production.dart: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2022, Very Good Ventures 2 | // https://verygood.ventures 3 | // 4 | // Use of this source code is governed by an MIT-style 5 | // license that can be found in the LICENSE file or at 6 | // https://opensource.org/licenses/MIT. 7 | 8 | import 'package:crypto_wallet/app/app.dart'; 9 | import 'package:crypto_wallet/bootstrap.dart'; 10 | import 'package:crypto_wallet/data/repositories/repositories.dart'; 11 | import 'package:cryptography_flutter/cryptography_flutter.dart'; 12 | import 'package:flutter_dotenv/flutter_dotenv.dart'; 13 | import 'package:flutter_secure_storage/flutter_secure_storage.dart'; 14 | 15 | Future main() async { 16 | const storage = FlutterSecureStorage(); 17 | FlutterCryptography.enable(); 18 | await dotenv.load(fileName: 'assets/.env'); 19 | await bootstrap( 20 | () => App( 21 | phraseRepository: PhraseRepositoryImpl(storage: storage), 22 | contractRepository: ContractRepositoryImpl( 23 | phraseRepository: PhraseRepositoryImpl(storage: storage), 24 | ), 25 | ), 26 | ); 27 | } 28 | -------------------------------------------------------------------------------- /lib/main_staging.dart: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2022, Very Good Ventures 2 | // https://verygood.ventures 3 | // 4 | // Use of this source code is governed by an MIT-style 5 | // license that can be found in the LICENSE file or at 6 | // https://opensource.org/licenses/MIT. 7 | 8 | import 'package:crypto_wallet/app/app.dart'; 9 | import 'package:crypto_wallet/bootstrap.dart'; 10 | import 'package:crypto_wallet/data/repositories/repositories.dart'; 11 | import 'package:cryptography_flutter/cryptography_flutter.dart'; 12 | import 'package:flutter_dotenv/flutter_dotenv.dart'; 13 | import 'package:flutter_secure_storage/flutter_secure_storage.dart'; 14 | 15 | Future main() async { 16 | const storage = FlutterSecureStorage(); 17 | FlutterCryptography.enable(); 18 | await dotenv.load(fileName: 'assets/.env.dev'); 19 | await bootstrap( 20 | () => App( 21 | phraseRepository: PhraseRepositoryImpl(storage: storage), 22 | contractRepository: ContractRepositoryImpl( 23 | phraseRepository: PhraseRepositoryImpl(storage: storage), 24 | ), 25 | ), 26 | ); 27 | } 28 | -------------------------------------------------------------------------------- /lib/presentation/authentication/authentication.dart: -------------------------------------------------------------------------------- 1 | export 'consent/consent.dart'; 2 | export 'create_pin/create_pin.dart'; 3 | export 'create_wallet/create_wallet.dart'; 4 | export 'landing/landing.dart'; 5 | export 'seed_phrase/seed_phrase.dart'; 6 | -------------------------------------------------------------------------------- /lib/presentation/authentication/consent/consent.dart: -------------------------------------------------------------------------------- 1 | export 'view/consent_page.dart'; 2 | -------------------------------------------------------------------------------- /lib/presentation/authentication/consent/view/consent_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class ConsentPage extends StatelessWidget { 4 | const ConsentPage({Key? key}) : super(key: key); 5 | 6 | @override 7 | Widget build(BuildContext context) { 8 | return Container(); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /lib/presentation/authentication/create_pin/create_pin.dart: -------------------------------------------------------------------------------- 1 | export 'cubit/create_pin_cubit.dart'; 2 | export 'view/create_pin_page.dart'; 3 | -------------------------------------------------------------------------------- /lib/presentation/authentication/create_pin/cubit/create_pin_cubit.dart: -------------------------------------------------------------------------------- 1 | import 'package:bloc/bloc.dart'; 2 | import 'package:crypto_wallet/domain/models/wallet_model.dart'; 3 | import 'package:crypto_wallet/domain/repositories/phrase_repository.dart'; 4 | import 'package:equatable/equatable.dart'; 5 | 6 | part 'create_pin_state.dart'; 7 | 8 | class CreatePinCubit extends Cubit { 9 | CreatePinCubit({required PhraseRepository phraseRepository}) 10 | : _phraseRepository = phraseRepository, 11 | super(const CreatePinState()); 12 | 13 | final PhraseRepository _phraseRepository; 14 | 15 | Future getUserKeys(String mnemonics, String password) async { 16 | try { 17 | final privateKey = await _phraseRepository.generatePrivatekey(mnemonics); 18 | final publicKey = await _phraseRepository.generatePublicKey(privateKey); 19 | final data = WalletModel( 20 | privateKey: privateKey, 21 | publicKey: publicKey.toString(), 22 | ); 23 | await _phraseRepository.saveData(data, password); 24 | emit(state.copyWith(status: CreatePinStatus.success, walletModel: data)); 25 | } on Exception { 26 | emit(state.copyWith(status: CreatePinStatus.failure)); 27 | } 28 | } 29 | 30 | void onPasswordChanged(String password) { 31 | emit(state.copyWith(password: password)); 32 | isPinValid(); 33 | } 34 | 35 | void onConfirmPasswordChanged(String password) { 36 | emit(state.copyWith(confirmPassword: password)); 37 | isPinValid(); 38 | } 39 | 40 | void isPinValid() { 41 | if (state.password.isNotEmpty && 42 | state.confirmPassword.isNotEmpty && 43 | state.password.length >= 8 && 44 | state.confirmPassword.length >= 8 && 45 | state.password == state.confirmPassword) { 46 | emit(state.copyWith(isValid: true, status: CreatePinStatus.initial)); 47 | } else { 48 | emit(state.copyWith(isValid: false, status: CreatePinStatus.initial)); 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /lib/presentation/authentication/create_pin/cubit/create_pin_state.dart: -------------------------------------------------------------------------------- 1 | part of 'create_pin_cubit.dart'; 2 | 3 | enum CreatePinStatus { 4 | initial, 5 | failure, 6 | success, 7 | } 8 | 9 | class CreatePinState extends Equatable { 10 | const CreatePinState({ 11 | this.password = '', 12 | this.confirmPassword = '', 13 | this.isValid = false, 14 | this.status = CreatePinStatus.initial, 15 | this.walletModel = const WalletModel(), 16 | }); 17 | 18 | CreatePinState copyWith({ 19 | final CreatePinStatus? status, 20 | final String? password, 21 | final String? confirmPassword, 22 | final bool? isValid, 23 | final WalletModel? walletModel, 24 | }) => 25 | CreatePinState( 26 | status: status ?? this.status, 27 | confirmPassword: confirmPassword ?? this.confirmPassword, 28 | password: password ?? this.password, 29 | isValid: isValid ?? this.isValid, 30 | walletModel: walletModel ?? this.walletModel, 31 | ); 32 | 33 | final CreatePinStatus status; 34 | final String password; 35 | final String confirmPassword; 36 | final bool isValid; 37 | final WalletModel walletModel; 38 | @override 39 | List get props => [ 40 | status, 41 | password, 42 | confirmPassword, 43 | isValid, 44 | walletModel, 45 | ]; 46 | } 47 | -------------------------------------------------------------------------------- /lib/presentation/authentication/create_wallet/create_wallet.dart: -------------------------------------------------------------------------------- 1 | export 'view/create_wallet_page.dart'; 2 | -------------------------------------------------------------------------------- /lib/presentation/authentication/create_wallet/view/create_wallet_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:cs_ui/cs_ui.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_svg/svg.dart'; 4 | 5 | class CreateWalletPage extends StatelessWidget { 6 | const CreateWalletPage({Key? key}) : super(key: key); 7 | 8 | @override 9 | Widget build(BuildContext context) { 10 | return Scaffold( 11 | body: SafeArea( 12 | child: Padding( 13 | padding: const EdgeInsets.all(20), 14 | child: Column( 15 | mainAxisAlignment: MainAxisAlignment.center, 16 | children: [ 17 | SvgPicture.asset( 18 | 'assets/images/svg/logo.svg', 19 | width: 100, 20 | height: 100, 21 | ), 22 | SizedBox(height: context.minBlockVertical * 5), 23 | SolidButton( 24 | text: 'Create a new Wallet', 25 | onPressed: () {}, 26 | ), 27 | SizedBox(height: context.minBlockVertical), 28 | TextButton( 29 | onPressed: () {}, 30 | child: Text( 31 | 'I already have a wallet', 32 | style: CsTextStyle.caption.copyWith( 33 | color: CsColors.primary, 34 | fontSize: 14, 35 | fontWeight: CsFontWeight.medium, 36 | ), 37 | ), 38 | ) 39 | ], 40 | ), 41 | ), 42 | ), 43 | ); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /lib/presentation/authentication/landing/cubit/auth_landing_cubit.dart: -------------------------------------------------------------------------------- 1 | import 'package:bloc/bloc.dart'; 2 | import 'package:crypto_wallet/data/repositories/repositories.dart'; 3 | import 'package:crypto_wallet/domain/models/wallet_model.dart'; 4 | import 'package:crypto_wallet/domain/repositories/phrase_repository.dart'; 5 | import 'package:equatable/equatable.dart'; 6 | 7 | part 'auth_landing_state.dart'; 8 | 9 | class AuthLandingCubit extends Cubit { 10 | AuthLandingCubit({required PhraseRepository phraseRepository}) 11 | : _phraseRepository = phraseRepository, 12 | super(const AuthLandingState()); 13 | 14 | final PhraseRepository _phraseRepository; 15 | 16 | void onPasswordChanged(String password) { 17 | emit(state.copyWith(password: password)); 18 | isValid(); 19 | } 20 | 21 | void isValid() { 22 | if (state.password.isNotEmpty && state.password.length >= 8) { 23 | emit(state.copyWith(isValid: true)); 24 | } else { 25 | emit(state.copyWith(isValid: false)); 26 | } 27 | } 28 | 29 | Future onSubmitted() async { 30 | try { 31 | final response = await _phraseRepository.retrieveData(state.password); 32 | if (response != null) { 33 | emit( 34 | state.copyWith( 35 | status: AuthLandingStatus.success, 36 | walletModel: response, 37 | ), 38 | ); 39 | } else { 40 | emit( 41 | state.copyWith( 42 | status: AuthLandingStatus.failure, 43 | errorMessage: 'Oops an error occur, Try again', 44 | ), 45 | ); 46 | } 47 | } on IncorrectPasswordException { 48 | emit( 49 | state.copyWith( 50 | status: AuthLandingStatus.failure, 51 | errorMessage: 'Incorrect password', 52 | ), 53 | ); 54 | } on Exception { 55 | emit( 56 | state.copyWith( 57 | status: AuthLandingStatus.failure, 58 | errorMessage: 'Oops an error occur, Try again', 59 | ), 60 | ); 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /lib/presentation/authentication/landing/cubit/auth_landing_state.dart: -------------------------------------------------------------------------------- 1 | part of 'auth_landing_cubit.dart'; 2 | 3 | enum AuthLandingStatus { 4 | initial, 5 | failure, 6 | loading, 7 | success, 8 | } 9 | 10 | class AuthLandingState extends Equatable { 11 | const AuthLandingState({ 12 | this.password = '', 13 | this.errorMessage = '', 14 | this.isValid = false, 15 | this.walletModel = const WalletModel(), 16 | this.status = AuthLandingStatus.initial, 17 | }); 18 | 19 | AuthLandingState copyWith({ 20 | final String? password, 21 | final AuthLandingStatus? status, 22 | final bool? isValid, 23 | final WalletModel? walletModel, 24 | final String? errorMessage, 25 | }) => 26 | AuthLandingState( 27 | password: password ?? this.password, 28 | status: status ?? this.status, 29 | isValid: isValid ?? this.isValid, 30 | walletModel: walletModel ?? this.walletModel, 31 | errorMessage: errorMessage ?? this.errorMessage, 32 | ); 33 | 34 | final String password; 35 | final bool isValid; 36 | final String errorMessage; 37 | final WalletModel walletModel; 38 | final AuthLandingStatus status; 39 | 40 | @override 41 | List get props => 42 | [password, walletModel, status, isValid, errorMessage]; 43 | } 44 | -------------------------------------------------------------------------------- /lib/presentation/authentication/landing/landing.dart: -------------------------------------------------------------------------------- 1 | export 'cubit/auth_landing_cubit.dart'; 2 | export 'view/landing_page.dart'; 3 | -------------------------------------------------------------------------------- /lib/presentation/authentication/landing/view/landing_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:crypto_wallet/app/app.dart'; 2 | import 'package:crypto_wallet/domain/repositories/phrase_repository.dart'; 3 | import 'package:crypto_wallet/presentation/authentication/landing/landing.dart'; 4 | import 'package:cs_ui/cs_ui.dart'; 5 | import 'package:flutter/material.dart'; 6 | import 'package:flutter_bloc/flutter_bloc.dart'; 7 | import 'package:flutter_svg/svg.dart'; 8 | 9 | class AuthLandingPage extends StatelessWidget { 10 | const AuthLandingPage({Key? key}) : super(key: key); 11 | 12 | @override 13 | Widget build(BuildContext context) { 14 | return BlocProvider( 15 | create: (context) => 16 | AuthLandingCubit(phraseRepository: context.read()), 17 | child: const AuthLandingView(), 18 | ); 19 | } 20 | } 21 | 22 | class AuthLandingView extends StatelessWidget { 23 | const AuthLandingView({Key? key}) : super(key: key); 24 | 25 | @override 26 | Widget build(BuildContext context) { 27 | return Scaffold( 28 | body: SafeArea( 29 | child: Padding( 30 | padding: const EdgeInsets.all(20), 31 | child: BlocListener( 32 | listenWhen: (previous, current) => 33 | previous.status != current.status, 34 | listener: (context, state) { 35 | if (state.status == AuthLandingStatus.failure) { 36 | context.showErrorMessage(state.errorMessage); 37 | } else if (state.status == AuthLandingStatus.success) { 38 | context.read().updateWalletModel(state.walletModel); 39 | context.push(WalletPages.home); 40 | } 41 | }, 42 | child: Column( 43 | mainAxisAlignment: MainAxisAlignment.center, 44 | children: [ 45 | SvgPicture.asset( 46 | 'assets/images/svg/logo.svg', 47 | width: 100, 48 | height: 100, 49 | ), 50 | SizedBox(height: context.minBlockVertical * 2), 51 | Text( 52 | 'Welcome Back!', 53 | style: CsTextStyle.headline2.copyWith( 54 | fontWeight: CsFontWeight.bold, 55 | ), 56 | ), 57 | SizedBox(height: context.minBlockVertical * 7), 58 | Align( 59 | alignment: Alignment.centerLeft, 60 | child: Text( 61 | 'Password', 62 | style: CsTextStyle.overline.copyWith(), 63 | ), 64 | ), 65 | SizedBox(height: context.minBlockVertical), 66 | InputBox( 67 | hintText: 'Enter your password', 68 | onChanged: context.read().onPasswordChanged, 69 | isPassword: true, 70 | validator: (value) { 71 | if (value?.isEmpty ?? true) { 72 | return 'Password is required'; 73 | } 74 | return null; 75 | }, 76 | ), 77 | SizedBox(height: context.minBlockVertical * 5), 78 | BlocBuilder( 79 | builder: (context, state) { 80 | return SolidButton( 81 | text: 'Unlock', 82 | onPressed: state.isValid 83 | ? () => context.read().onSubmitted() 84 | : null, 85 | ); 86 | }, 87 | ), 88 | ], 89 | ), 90 | ), 91 | ), 92 | ), 93 | ); 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /lib/presentation/authentication/seed_phrase/cubit/seed_phrase_cubit.dart: -------------------------------------------------------------------------------- 1 | import 'dart:math'; 2 | 3 | import 'package:bloc/bloc.dart'; 4 | import 'package:crypto_wallet/domain/repositories/phrase_repository.dart'; 5 | import 'package:equatable/equatable.dart'; 6 | import 'package:flutter/foundation.dart'; 7 | 8 | part 'seed_phrase_state.dart'; 9 | 10 | class SeedPhraseCubit extends Cubit { 11 | SeedPhraseCubit({required PhraseRepository phraseRepository}) 12 | : _phraseRepository = phraseRepository, 13 | super(const SeedPhraseState()); 14 | 15 | final PhraseRepository _phraseRepository; 16 | 17 | void generateMnemonic() { 18 | final mnemonic = _phraseRepository.getMnemonics(); 19 | final mnemonics = mnemonic.toList; 20 | final randomMnemonics = [...mnemonics]..shuffle(Random.secure()); 21 | 22 | emit( 23 | state.copyWith( 24 | mnemonics: mnemonics, 25 | randomMnemonics: randomMnemonics, 26 | ), 27 | ); 28 | } 29 | 30 | void addSelectedMnemonics(String text) { 31 | final currentSelectedMnemonics = []; 32 | for (final mnemonic in state.confirmMnemonics) { 33 | currentSelectedMnemonics.add(mnemonic); 34 | } 35 | if (state.confirmMnemonics.contains(text)) { 36 | currentSelectedMnemonics.remove(text); 37 | } else { 38 | currentSelectedMnemonics.add(text); 39 | } 40 | emit( 41 | state.copyWith( 42 | confirmMnemonics: currentSelectedMnemonics, 43 | isMnemonicsValid: false, 44 | status: SeedPhraseStatus.initial, 45 | ), 46 | ); 47 | validateMnemonics(); 48 | } 49 | 50 | void clearSelectedMnemonics() { 51 | emit( 52 | state.copyWith( 53 | confirmMnemonics: [], 54 | isMnemonicsValid: false, 55 | status: SeedPhraseStatus.initial, 56 | ), 57 | ); 58 | } 59 | 60 | void validateMnemonics() { 61 | if (state.confirmMnemonics.length != 12) return; 62 | if (listEquals(state.mnemonics, state.confirmMnemonics)) { 63 | emit( 64 | state.copyWith( 65 | status: SeedPhraseStatus.success, 66 | isMnemonicsValid: true, 67 | ), 68 | ); 69 | } else { 70 | emit( 71 | state.copyWith( 72 | status: SeedPhraseStatus.failure, 73 | errorMessage: 'Invalid Mnemonics', 74 | isMnemonicsValid: false, 75 | ), 76 | ); 77 | } 78 | } 79 | } 80 | //shaft outdoor kingdom romance priority tooth delay harsh walk candy curious viable 81 | 82 | extension StringX on String { 83 | List get toList => split(' ').toList(); 84 | } 85 | -------------------------------------------------------------------------------- /lib/presentation/authentication/seed_phrase/cubit/seed_phrase_state.dart: -------------------------------------------------------------------------------- 1 | part of 'seed_phrase_cubit.dart'; 2 | 3 | enum SeedPhraseStatus { 4 | initial, 5 | loading, 6 | failure, 7 | success, 8 | } 9 | 10 | class SeedPhraseState extends Equatable { 11 | const SeedPhraseState({ 12 | this.mnemonics = const [], 13 | this.randomMnemonics = const [], 14 | this.confirmMnemonics = const [], 15 | this.errorMessage = '', 16 | this.isMnemonicsValid = false, 17 | this.status = SeedPhraseStatus.initial, 18 | }); 19 | 20 | SeedPhraseState copyWith({ 21 | List? mnemonics, 22 | String? generatedSeedHex, 23 | String? confirmSeedHex, 24 | List? randomMnemonics, 25 | List? confirmMnemonics, 26 | String? generatedSeedEntropy, 27 | SeedPhraseStatus? status, 28 | bool? isMnemonicsValid, 29 | String? confirmEntropy, 30 | String? errorMessage, 31 | }) { 32 | return SeedPhraseState( 33 | mnemonics: mnemonics ?? this.mnemonics, 34 | randomMnemonics: randomMnemonics ?? this.randomMnemonics, 35 | confirmMnemonics: confirmMnemonics ?? this.confirmMnemonics, 36 | status: status ?? this.status, 37 | isMnemonicsValid: isMnemonicsValid ?? this.isMnemonicsValid, 38 | errorMessage: errorMessage ?? this.errorMessage, 39 | ); 40 | } 41 | 42 | final List mnemonics; 43 | final List randomMnemonics; 44 | final List confirmMnemonics; 45 | final SeedPhraseStatus status; 46 | final String errorMessage; 47 | final bool isMnemonicsValid; 48 | 49 | @override 50 | List get props => [ 51 | mnemonics, 52 | randomMnemonics, 53 | status, 54 | confirmMnemonics, 55 | isMnemonicsValid, 56 | errorMessage, 57 | ]; 58 | } 59 | -------------------------------------------------------------------------------- /lib/presentation/authentication/seed_phrase/seed_phrase.dart: -------------------------------------------------------------------------------- 1 | export 'cubit/seed_phrase_cubit.dart'; 2 | export 'view/confirm_seed_page.dart'; 3 | export 'view/seed_phrase_page.dart'; 4 | export 'widgets/widgets.dart'; 5 | -------------------------------------------------------------------------------- /lib/presentation/authentication/seed_phrase/widgets/mnemonics_chip.dart: -------------------------------------------------------------------------------- 1 | import 'package:cs_ui/cs_ui.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class MnemonicsChip extends StatelessWidget { 5 | const MnemonicsChip({ 6 | Key? key, 7 | required this.text, 8 | this.onTap, 9 | this.index, 10 | this.isSelected = false, 11 | }) : super(key: key); 12 | 13 | final String text; 14 | final VoidCallback? onTap; 15 | final bool isSelected; 16 | final int? index; 17 | 18 | @override 19 | Widget build(BuildContext context) { 20 | return InkWell( 21 | splashColor: CsColors.primary.withOpacity(0.5), 22 | borderRadius: BorderRadius.circular(10), 23 | onTap: onTap, 24 | child: Container( 25 | padding: const EdgeInsets.symmetric( 26 | horizontal: 10, 27 | vertical: 10, 28 | ), 29 | decoration: BoxDecoration( 30 | borderRadius: BorderRadius.circular(10), 31 | border: Border.all(color: CsColors.primary), 32 | color: isSelected 33 | ? CsColors.primary.withOpacity(0.7) 34 | : CsColors.background, 35 | ), 36 | child: (index != null) 37 | ? Row( 38 | mainAxisSize: MainAxisSize.min, 39 | children: [ 40 | Text( 41 | index.toString(), 42 | style: CsTextStyle.caption.copyWith( 43 | fontSize: 16, 44 | fontWeight: CsFontWeight.bold, 45 | color: CsColors.black.withOpacity(0.6), 46 | ), 47 | ), 48 | SizedBox( 49 | width: context.minBlockHorizontal * 2, 50 | ), 51 | Text( 52 | text, 53 | style: CsTextStyle.caption.copyWith( 54 | fontSize: 18, 55 | fontWeight: CsFontWeight.semiBold, 56 | ), 57 | ), 58 | ], 59 | ) 60 | : Text( 61 | text, 62 | style: CsTextStyle.caption.copyWith( 63 | fontSize: 18, 64 | fontWeight: CsFontWeight.semiBold, 65 | color: isSelected ? Colors.transparent : CsColors.black, 66 | ), 67 | ), 68 | ), 69 | ); 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /lib/presentation/authentication/seed_phrase/widgets/widgets.dart: -------------------------------------------------------------------------------- 1 | export 'mnemonics_chip.dart'; 2 | -------------------------------------------------------------------------------- /lib/presentation/home/bloc/home_bloc.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:bloc/bloc.dart'; 4 | import 'package:crypto_wallet/domain/repositories/repositories.dart'; 5 | import 'package:equatable/equatable.dart'; 6 | import 'package:web3dart/web3dart.dart'; 7 | 8 | part 'home_event.dart'; 9 | part 'home_state.dart'; 10 | 11 | class HomeBloc extends Bloc { 12 | HomeBloc({required ContractRepository contractRepository}) 13 | : _contractRepository = contractRepository, 14 | super(const HomeState()) { 15 | on(_onGetEthBalance); 16 | } 17 | 18 | final ContractRepository _contractRepository; 19 | 20 | Future _onGetEthBalance( 21 | GetEthBalanceEvent event, 22 | Emitter emit, 23 | ) async { 24 | await emit.forEach( 25 | _contractRepository.getEthBalance(event.publicKey), 26 | onData: (EtherAmount data) => state.copyWith(ethBalance: data), 27 | ); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /lib/presentation/home/bloc/home_event.dart: -------------------------------------------------------------------------------- 1 | part of 'home_bloc.dart'; 2 | 3 | abstract class HomeEvent extends Equatable { 4 | const HomeEvent(); 5 | 6 | @override 7 | List get props => []; 8 | } 9 | 10 | class GetEthBalanceEvent extends HomeEvent { 11 | const GetEthBalanceEvent(this.publicKey); 12 | 13 | final String publicKey; 14 | 15 | @override 16 | List get props => [publicKey]; 17 | } 18 | -------------------------------------------------------------------------------- /lib/presentation/home/bloc/home_state.dart: -------------------------------------------------------------------------------- 1 | part of 'home_bloc.dart'; 2 | 3 | class HomeState extends Equatable { 4 | const HomeState({this.ethBalance}); 5 | 6 | HomeState copyWith({ 7 | EtherAmount? ethBalance, 8 | }) { 9 | return HomeState( 10 | ethBalance: ethBalance ?? this.ethBalance, 11 | ); 12 | } 13 | 14 | final EtherAmount? ethBalance; 15 | @override 16 | List get props => [ethBalance]; 17 | } 18 | -------------------------------------------------------------------------------- /lib/presentation/home/cubit/add_token_cubit.dart: -------------------------------------------------------------------------------- 1 | import 'package:bloc/bloc.dart'; 2 | import 'package:crypto_wallet/domain/repositories/repositories.dart'; 3 | import 'package:equatable/equatable.dart'; 4 | 5 | part 'add_token_state.dart'; 6 | 7 | class AddTokenCubit extends Cubit { 8 | AddTokenCubit({required ContractRepository contractRepository}) 9 | : _contractRepository = contractRepository, 10 | super(const AddTokenState()); 11 | 12 | final ContractRepository _contractRepository; 13 | 14 | void onContractAddressChanged(String address) { 15 | emit(state.copyWith(contractAddress: address)); 16 | 17 | getContractDetails(); 18 | } 19 | 20 | Future getContractDetails() async { 21 | if (state.contractAddress.length < 40) return; 22 | emit( 23 | state.copyWith( 24 | status: AddTokenStatus.loading, 25 | ), 26 | ); 27 | final symbol = 28 | await _contractRepository.getTokenSymbol(state.contractAddress); 29 | final decimal = 30 | await _contractRepository.getTokenDecimal(state.contractAddress); 31 | 32 | emit( 33 | state.copyWith( 34 | status: AddTokenStatus.success, 35 | tokenDecimal: decimal, 36 | tokenSymbol: symbol, 37 | ), 38 | ); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /lib/presentation/home/cubit/add_token_state.dart: -------------------------------------------------------------------------------- 1 | part of 'add_token_cubit.dart'; 2 | 3 | enum AddTokenStatus { 4 | initial, 5 | loading, 6 | success, 7 | failure, 8 | } 9 | 10 | class AddTokenState extends Equatable { 11 | const AddTokenState({ 12 | this.contractAddress = '', 13 | this.tokenSymbol = '', 14 | this.tokenDecimal = '', 15 | this.status = AddTokenStatus.initial, 16 | }); 17 | 18 | AddTokenState copyWith({ 19 | final String? contractAddress, 20 | final String? tokenSymbol, 21 | final String? tokenDecimal, 22 | final AddTokenStatus? status, 23 | }) { 24 | return AddTokenState( 25 | contractAddress: contractAddress ?? this.contractAddress, 26 | tokenSymbol: tokenSymbol ?? this.tokenSymbol, 27 | tokenDecimal: tokenDecimal ?? this.tokenDecimal, 28 | status: status ?? this.status, 29 | ); 30 | } 31 | 32 | final AddTokenStatus status; 33 | final String contractAddress; 34 | final String tokenSymbol; 35 | final String tokenDecimal; 36 | @override 37 | List get props => 38 | [status, contractAddress, tokenSymbol, tokenDecimal]; 39 | } 40 | -------------------------------------------------------------------------------- /lib/presentation/home/cubit/home_cubit.dart: -------------------------------------------------------------------------------- 1 | import 'package:bloc/bloc.dart'; 2 | import 'package:crypto_wallet/domain/repositories/repositories.dart'; 3 | import 'package:equatable/equatable.dart'; 4 | import 'package:web3dart/web3dart.dart'; 5 | 6 | part 'home_state.dart'; 7 | 8 | class HomeCubit extends Cubit { 9 | HomeCubit( 10 | {required PhraseRepository phraseRepository, 11 | required ContractRepository contractRepository}) 12 | : _phraseRepository = phraseRepository, 13 | _contractRepository = contractRepository, 14 | super(const HomeState()) { 15 | emit( 16 | state.copyWith( 17 | ethBalance: EtherAmount.zero(), 18 | ), 19 | ); 20 | } 21 | 22 | final PhraseRepository _phraseRepository; 23 | final ContractRepository _contractRepository; 24 | 25 | Future getEthBalance(String publicKey) async {} 26 | 27 | @override 28 | Future close() { 29 | _contractRepository.dispose(); 30 | return super.close(); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /lib/presentation/home/cubit/home_state.dart: -------------------------------------------------------------------------------- 1 | part of 'home_cubit.dart'; 2 | 3 | class HomeState extends Equatable { 4 | const HomeState({ 5 | this.ethBalance, 6 | }); 7 | 8 | HomeState copyWith({ 9 | EtherAmount? ethBalance, 10 | }) { 11 | return HomeState( 12 | ethBalance: ethBalance ?? this.ethBalance, 13 | ); 14 | } 15 | 16 | final EtherAmount? ethBalance; 17 | @override 18 | List get props => [ethBalance]; 19 | } 20 | -------------------------------------------------------------------------------- /lib/presentation/home/home.dart: -------------------------------------------------------------------------------- 1 | export 'bloc/home_bloc.dart'; 2 | export 'cubit/add_token_cubit.dart'; 3 | export 'view/home_page.dart'; 4 | export 'widgets/widgets.dart'; 5 | -------------------------------------------------------------------------------- /lib/presentation/home/widgets/action_button.dart: -------------------------------------------------------------------------------- 1 | import 'package:cs_ui/cs_ui.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class ActionButton extends StatelessWidget { 5 | const ActionButton({ 6 | Key? key, 7 | required this.icon, 8 | required this.text, 9 | this.onTap, 10 | }) : super(key: key); 11 | 12 | final IconData icon; 13 | final String text; 14 | final VoidCallback? onTap; 15 | 16 | @override 17 | Widget build(BuildContext context) { 18 | return GestureDetector( 19 | onTap: onTap, 20 | child: Column( 21 | children: [ 22 | CircleAvatar( 23 | backgroundColor: CsColors.primary, 24 | radius: 30, 25 | child: Icon( 26 | icon, 27 | color: CsColors.white, 28 | size: 30, 29 | ), 30 | ), 31 | Text( 32 | text, 33 | style: CsTextStyle.overline.copyWith( 34 | fontSize: 18, 35 | fontWeight: CsFontWeight.medium, 36 | ), 37 | ), 38 | ], 39 | ), 40 | ); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /lib/presentation/home/widgets/send_bottom_sheet.dart: -------------------------------------------------------------------------------- 1 | import 'package:cs_ui/cs_ui.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class SendBottomSheet extends StatelessWidget { 5 | const SendBottomSheet({Key? key}) : super(key: key); 6 | 7 | @override 8 | Widget build(BuildContext context) { 9 | return Container( 10 | height: context.screenHeight - (context.screenHeight / 3), 11 | padding: const EdgeInsets.only( 12 | left: 20, 13 | right: 20, 14 | top: 20, 15 | ), 16 | decoration: const BoxDecoration( 17 | color: CsColors.white, 18 | borderRadius: BorderRadius.vertical( 19 | top: Radius.circular(40), 20 | ), 21 | ), 22 | child: Column( 23 | children: [ 24 | Align( 25 | child: Text( 26 | 'Send', 27 | style: CsTextStyle.headline2.copyWith( 28 | fontWeight: CsFontWeight.bold, 29 | ), 30 | ), 31 | ), 32 | SizedBox(height: context.minBlockVertical * 2), 33 | const InputBox( 34 | hintText: 'Search, public address (0x), ENS', 35 | ), 36 | const Spacer(), 37 | Row( 38 | children: [ 39 | Expanded( 40 | child: SolidButton( 41 | text: 'Cancel', 42 | color: Colors.white, 43 | textColor: CsColors.primary, 44 | border: const BorderSide(color: CsColors.primary), 45 | onPressed: () {}, 46 | ), 47 | ), 48 | SizedBox(width: context.minBlockHorizontal * 5), 49 | Expanded( 50 | child: SolidButton( 51 | text: 'Next', 52 | onPressed: () {}, 53 | ), 54 | ), 55 | ], 56 | ), 57 | SizedBox(height: context.minBlockVertical * 4), 58 | ], 59 | ), 60 | ); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /lib/presentation/home/widgets/swap_bottom_sheet.dart: -------------------------------------------------------------------------------- 1 | import 'package:cs_ui/cs_ui.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class SwapBottomSheet extends StatelessWidget { 5 | const SwapBottomSheet({Key? key}) : super(key: key); 6 | 7 | @override 8 | Widget build(BuildContext context) { 9 | return Container( 10 | height: context.screenHeight - (context.screenHeight / 3), 11 | padding: const EdgeInsets.only( 12 | left: 20, 13 | right: 20, 14 | top: 20, 15 | ), 16 | decoration: const BoxDecoration( 17 | color: CsColors.white, 18 | borderRadius: BorderRadius.vertical( 19 | top: Radius.circular(40), 20 | ), 21 | ), 22 | child: Column( 23 | crossAxisAlignment: CrossAxisAlignment.start, 24 | children: [ 25 | Align( 26 | child: Text( 27 | 'Swap', 28 | style: CsTextStyle.headline2.copyWith( 29 | fontWeight: CsFontWeight.bold, 30 | ), 31 | ), 32 | ), 33 | SizedBox(height: context.minBlockVertical * 2), 34 | const Text('Swap from'), 35 | const InputBox( 36 | hintText: 'Search, public address (0x), ENS', 37 | ), 38 | SizedBox(height: context.minBlockVertical * 2), 39 | const Text('Swap to'), 40 | const InputBox( 41 | hintText: 'Search, public address (0x), ENS', 42 | ), 43 | const Spacer(), 44 | SolidButton( 45 | text: 'Review', 46 | onPressed: () {}, 47 | ), 48 | SizedBox(height: context.minBlockVertical * 4), 49 | ], 50 | ), 51 | ); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /lib/presentation/home/widgets/widgets.dart: -------------------------------------------------------------------------------- 1 | export 'action_button.dart'; 2 | export 'add_token_bottom_sheet.dart'; 3 | export 'send_bottom_sheet.dart'; 4 | export 'swap_bottom_sheet.dart'; 5 | -------------------------------------------------------------------------------- /lib/presentation/landing/landing.dart: -------------------------------------------------------------------------------- 1 | export 'view/landing_page.dart'; 2 | -------------------------------------------------------------------------------- /lib/presentation/landing/view/landing_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:crypto_wallet/app/app.dart'; 2 | import 'package:cs_ui/cs_ui.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:flutter_svg/svg.dart'; 5 | 6 | class LandingPage extends StatelessWidget { 7 | const LandingPage({Key? key}) : super(key: key); 8 | 9 | @override 10 | Widget build(BuildContext context) { 11 | return Scaffold( 12 | body: SafeArea( 13 | child: Padding( 14 | padding: const EdgeInsets.all(20), 15 | child: Column( 16 | mainAxisAlignment: MainAxisAlignment.center, 17 | children: [ 18 | Expanded( 19 | child: Column( 20 | mainAxisAlignment: MainAxisAlignment.center, 21 | children: [ 22 | SvgPicture.asset( 23 | 'assets/images/svg/logo.svg', 24 | width: 100, 25 | height: 100, 26 | ), 27 | SizedBox(height: context.minBlockVertical * 2), 28 | Text( 29 | 'CSWallet', 30 | style: CsTextStyle.headline2.copyWith( 31 | fontWeight: CsFontWeight.bold, 32 | ), 33 | ), 34 | ], 35 | ), 36 | ), 37 | SizedBox(height: context.minBlockVertical * 5), 38 | SolidButton( 39 | text: 'Create a new Wallet', 40 | onPressed: () => context.push(WalletPages.seedPhrase), 41 | ), 42 | SizedBox(height: context.minBlockVertical * 2), 43 | SolidButton( 44 | text: 'I already have a wallet', 45 | color: CsColors.secondary, 46 | textColor: CsColors.white, 47 | onPressed: () => context.push(WalletPages.home), 48 | ), 49 | ], 50 | ), 51 | ), 52 | ), 53 | ); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /lib/presentation/landing/view/splash_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:crypto_wallet/app/app.dart'; 2 | import 'package:crypto_wallet/domain/repositories/repositories.dart'; 3 | import 'package:crypto_wallet/presentation/authentication/landing/landing.dart'; 4 | import 'package:crypto_wallet/presentation/landing/view/landing_page.dart'; 5 | import 'package:flutter/material.dart'; 6 | import 'package:flutter_bloc/flutter_bloc.dart'; 7 | 8 | class SplashPage extends StatelessWidget { 9 | const SplashPage({Key? key}) : super(key: key); 10 | 11 | @override 12 | Widget build(BuildContext context) { 13 | return BlocBuilder( 14 | builder: (context, state) { 15 | if (state.authStatus == AuthStatus.authenticated) { 16 | return const AuthLandingPage(); 17 | } else if (state.authStatus == AuthStatus.unauthenticated) { 18 | return const LandingPage(); 19 | } else { 20 | return const LandingPage(); 21 | } 22 | }, 23 | ); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /packages/cs_ui/README.md: -------------------------------------------------------------------------------- 1 | # cs_ui 2 | 3 | [![style: very good analysis][very_good_analysis_badge]][very_good_analysis_link] 4 | [![License: MIT][license_badge]][license_link] 5 | 6 | A Very Good Project created by Very Good CLI. 7 | 8 | [license_badge]: https://img.shields.io/badge/license-MIT-blue.svg 9 | [license_link]: https://opensource.org/licenses/MIT 10 | [very_good_analysis_badge]: https://img.shields.io/badge/style-very_good_analysis-B22C89.svg 11 | [very_good_analysis_link]: https://pub.dev/packages/very_good_analysis -------------------------------------------------------------------------------- /packages/cs_ui/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:very_good_analysis/analysis_options.2.3.0.yaml 2 | 3 | linter: 4 | rules: 5 | public_member_api_docs: false -------------------------------------------------------------------------------- /packages/cs_ui/lib/cs_ui.dart: -------------------------------------------------------------------------------- 1 | library cs_ui; 2 | 3 | export 'src/colors.dart'; 4 | export 'src/extension/extension.dart'; 5 | export 'src/navigation/navigation.dart'; 6 | export 'src/theme.dart'; 7 | export 'src/typography/typography.dart'; 8 | export 'src/widgets/widget.dart'; 9 | -------------------------------------------------------------------------------- /packages/cs_ui/lib/src/colors.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class CsColors { 4 | static const primary = Color(0xfff3b007); 5 | static const secondary = Color(0xFF242526); 6 | static const primaryIcon = Color(0xFF342774); 7 | static const secondaryIcon = Color(0xFF727AEF); 8 | static const scaffold = Colors.white; 9 | static const secondaryButton = Color(0xFF3277D8); 10 | static const white = Color(0xFFFFFFFF); 11 | static const grey = Color(0xFFCECECE); 12 | static const black = Color(0xFF000000); 13 | static const danger = Color(0xFFFF0000); 14 | static const background = white; 15 | static const primaryText = black; 16 | static const secondaryText = Color(0xFFEEEEEE); 17 | static const secondaryText2 = Color(0xFF262626); 18 | static const primaryBorder = Color(0xFFE5F4FF); 19 | static const secondaryBorder = Color(0xFFBCD3F5); 20 | static const secondaryBorder2 = Color(0xFF707070); 21 | } 22 | -------------------------------------------------------------------------------- /packages/cs_ui/lib/src/extension/extension.dart: -------------------------------------------------------------------------------- 1 | export './size.dart'; 2 | export './stringx.dart'; 3 | -------------------------------------------------------------------------------- /packages/cs_ui/lib/src/extension/stringx.dart: -------------------------------------------------------------------------------- 1 | import 'package:intl/intl.dart'; 2 | 3 | extension StringX on String { 4 | String get ngn => '₦'; 5 | String get svg => 'assets/svg/$this.svg'; 6 | String get png => 'assets/png/$this.png'; 7 | String get capitalizeFirst => isNotEmpty && [0].isNotEmpty 8 | ? '${this[0].toUpperCase()}${substring(1)}' 9 | : ''; 10 | String get capitalize => 11 | trim().split(' ').map((e) => e.capitalizeFirst).join(' '); 12 | 13 | String get formatMoney => 14 | ngn + NumberFormat.currency(symbol: '').format(double.parse(this)); 15 | 16 | String get formatDate => 17 | '${DateFormat.d().format(DateTime.parse(this))}/${DateFormat.M().format(DateTime.parse(this))}/${DateFormat.y().format(DateTime.parse(this))}'; 18 | 19 | String get formatTime => DateFormat.Hms().format(DateTime.parse(this)); 20 | 21 | String get formatATime => DateFormat.jm().format(DateTime.parse(this)); 22 | } 23 | -------------------------------------------------------------------------------- /packages/cs_ui/lib/src/navigation/navigation.dart: -------------------------------------------------------------------------------- 1 | export './app_bottom_navigation.dart'; 2 | -------------------------------------------------------------------------------- /packages/cs_ui/lib/src/theme.dart: -------------------------------------------------------------------------------- 1 | import 'package:cs_ui/cs_ui.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class CsTheme { 5 | static final light = ThemeData.light().copyWith( 6 | scaffoldBackgroundColor: CsColors.scaffold, 7 | ); 8 | static final dark = ThemeData.dark().copyWith( 9 | scaffoldBackgroundColor: const Color(0xFF222222), 10 | ); 11 | } 12 | -------------------------------------------------------------------------------- /packages/cs_ui/lib/src/typography/font_weights.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class CsFontWeight { 4 | /// FontWeight value of `w900` 5 | static const FontWeight black = FontWeight.w900; 6 | 7 | /// FontWeight value of `w800` 8 | static const FontWeight extraBold = FontWeight.w800; 9 | 10 | /// FontWeight value of `w700` 11 | static const FontWeight bold = FontWeight.w700; 12 | 13 | /// FontWeight value of `w600` 14 | static const FontWeight semiBold = FontWeight.w600; 15 | 16 | /// FontWeight value of `w500` 17 | static const FontWeight medium = FontWeight.w500; 18 | 19 | /// FontWeight value of `w400` 20 | static const FontWeight regular = FontWeight.w400; 21 | 22 | /// FontWeight value of `w300` 23 | static const FontWeight light = FontWeight.w300; 24 | 25 | /// FontWeight value of `w200` 26 | static const FontWeight extraLight = FontWeight.w200; 27 | 28 | /// FontWeight value of `w100` 29 | static const FontWeight thin = FontWeight.w100; 30 | } 31 | -------------------------------------------------------------------------------- /packages/cs_ui/lib/src/typography/text_styles.dart: -------------------------------------------------------------------------------- 1 | import 'package:cs_ui/cs_ui.dart'; 2 | import 'package:flutter/material.dart'; 3 | // import 'package:google_fonts/google_fonts.dart'; 4 | 5 | class CsTextStyle { 6 | static const TextStyle _textStyle = TextStyle( 7 | color: CsColors.primaryText, 8 | fontWeight: CsFontWeight.regular, 9 | ); 10 | 11 | /// Headline 1 Text Style 12 | static TextStyle get headline1 { 13 | return _textStyle.copyWith( 14 | fontSize: 56, 15 | fontWeight: CsFontWeight.medium, 16 | ); 17 | } 18 | 19 | /// Headline 2 Text Style 20 | static TextStyle get headline2 { 21 | return _textStyle.copyWith( 22 | fontSize: 30, 23 | fontWeight: CsFontWeight.regular, 24 | ); 25 | } 26 | 27 | /// Headline 3 Text Style 28 | static TextStyle get headline3 { 29 | return _textStyle.copyWith( 30 | fontSize: 24, 31 | fontWeight: CsFontWeight.regular, 32 | ); 33 | } 34 | 35 | /// Headline 4 Text Style 36 | static TextStyle get headline4 { 37 | return _textStyle.copyWith( 38 | fontSize: 22, 39 | fontWeight: CsFontWeight.bold, 40 | ); 41 | } 42 | 43 | /// Headline 5 Text Style 44 | static TextStyle get headline5 { 45 | return _textStyle.copyWith( 46 | fontSize: 22, 47 | fontWeight: CsFontWeight.medium, 48 | ); 49 | } 50 | 51 | /// Headline 6 Text Style 52 | static TextStyle get headline6 { 53 | return _textStyle.copyWith( 54 | fontSize: 20, 55 | fontWeight: CsFontWeight.medium, 56 | ); 57 | } 58 | 59 | /// Subtitle 1 Text Style 60 | static TextStyle get subtitle1 { 61 | return _textStyle.copyWith( 62 | fontSize: 16, 63 | fontWeight: CsFontWeight.bold, 64 | ); 65 | } 66 | 67 | /// Subtitle 2 Text Style 68 | static TextStyle get subtitle2 { 69 | return _textStyle.copyWith( 70 | fontSize: 14, 71 | fontWeight: CsFontWeight.bold, 72 | ); 73 | } 74 | 75 | /// Body Text 1 Text Style 76 | static TextStyle get bodyText1 { 77 | return _textStyle.copyWith( 78 | fontSize: 18, 79 | fontWeight: CsFontWeight.medium, 80 | ); 81 | } 82 | 83 | /// Body Text 2 Text Style (the default) 84 | static TextStyle get bodyText2 { 85 | return _textStyle.copyWith( 86 | fontSize: 16, 87 | fontWeight: CsFontWeight.regular, 88 | ); 89 | } 90 | 91 | /// Caption Text Style 92 | static TextStyle get caption { 93 | return _textStyle.copyWith( 94 | fontSize: 14, 95 | fontWeight: CsFontWeight.regular, 96 | ); 97 | } 98 | 99 | /// Overline Text Style 100 | static TextStyle get overline { 101 | return _textStyle.copyWith( 102 | fontSize: 16, 103 | fontWeight: CsFontWeight.regular, 104 | ); 105 | } 106 | 107 | /// Button Text Style 108 | static TextStyle get button { 109 | return _textStyle.copyWith( 110 | fontSize: 18, 111 | fontWeight: CsFontWeight.medium, 112 | ); 113 | } 114 | 115 | /// Text Button Text Style 116 | static TextStyle get textButton { 117 | return _textStyle.copyWith( 118 | fontSize: 16, 119 | fontWeight: CsFontWeight.medium, 120 | ); 121 | } 122 | 123 | ///Big Text 124 | static TextStyle get bigText => _textStyle.copyWith( 125 | fontSize: 27, 126 | fontWeight: CsFontWeight.black, 127 | ); 128 | 129 | ///Small Text 130 | static TextStyle get smallText => _textStyle.copyWith( 131 | fontSize: 14, 132 | fontWeight: CsFontWeight.regular, 133 | ); 134 | } 135 | -------------------------------------------------------------------------------- /packages/cs_ui/lib/src/typography/typography.dart: -------------------------------------------------------------------------------- 1 | export './font_weights.dart'; 2 | export './text_styles.dart'; 3 | -------------------------------------------------------------------------------- /packages/cs_ui/lib/src/widgets/cs_flat_button.dart: -------------------------------------------------------------------------------- 1 | import 'package:cs_ui/cs_ui.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class CsFlatButton extends StatelessWidget { 5 | const CsFlatButton({ 6 | Key? key, 7 | this.text, 8 | this.onPressed, 9 | this.color = CsColors.primary, 10 | this.textColor = CsColors.black, 11 | this.fontWeight = CsFontWeight.bold, 12 | this.textSize = 18.0, 13 | this.elevation = 0.0, 14 | this.radius = 50, 15 | this.border = const BorderSide(color: CsColors.primary), 16 | }) : super(key: key); 17 | 18 | final String? text; 19 | final VoidCallback? onPressed; 20 | final Color color; 21 | final Color textColor; 22 | final double textSize; 23 | final double elevation; 24 | final BorderSide border; 25 | final FontWeight fontWeight; 26 | final double radius; 27 | 28 | @override 29 | Widget build(BuildContext context) { 30 | return ConstrainedBox( 31 | constraints: 32 | BoxConstraints.tightFor(width: MediaQuery.of(context).size.width), 33 | child: TextButton( 34 | onPressed: onPressed, 35 | style: TextButton.styleFrom( 36 | primary: color, 37 | shape: RoundedRectangleBorder( 38 | borderRadius: BorderRadius.circular(radius), 39 | ), 40 | ), 41 | child: Padding( 42 | padding: const EdgeInsets.all(10), 43 | child: Text( 44 | text!, 45 | style: CsTextStyle.caption.copyWith( 46 | color: textColor, 47 | fontSize: textSize, 48 | fontWeight: fontWeight, 49 | ), 50 | ), 51 | ), 52 | ), 53 | ); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /packages/cs_ui/lib/src/widgets/intl_phone_text_field.dart: -------------------------------------------------------------------------------- 1 | import 'package:cs_ui/cs_ui.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:intl_phone_number_input/intl_phone_number_input.dart'; 4 | 5 | typedef IntlPhone = PhoneNumber; 6 | 7 | class IntlPhoneTextField extends StatelessWidget { 8 | const IntlPhoneTextField({ 9 | Key? key, 10 | this.initialValue, 11 | this.onInputChanged, 12 | this.onSaved, 13 | this.controller, 14 | this.validator, 15 | this.hintText, 16 | this.borderSide = const BorderSide(color: Color(0xFFF6F6F6)), 17 | this.value, 18 | }) : super(key: key); 19 | 20 | final PhoneNumber? initialValue; 21 | 22 | final ValueChanged? onInputChanged; 23 | 24 | final ValueChanged? onSaved; 25 | 26 | final TextEditingController? controller; 27 | 28 | final String? value; 29 | 30 | final FormFieldValidator? validator; 31 | 32 | final String? hintText; 33 | 34 | final BorderSide borderSide; 35 | 36 | @override 37 | Widget build(BuildContext context) { 38 | return InternationalPhoneNumberInput( 39 | textFieldController: controller, 40 | onInputChanged: onInputChanged, 41 | validator: validator, 42 | formatInput: false, 43 | selectorConfig: const SelectorConfig( 44 | selectorType: PhoneInputSelectorType.BOTTOM_SHEET, 45 | setSelectorButtonAsPrefixIcon: true, 46 | leadingPadding: 10, 47 | ), 48 | // locale: 'ng', 49 | textStyle: const TextStyle( 50 | color: CsColors.black, 51 | fontSize: 15, 52 | fontWeight: FontWeight.w500, 53 | ), 54 | autoValidateMode: AutovalidateMode.onUserInteraction, 55 | selectorTextStyle: const TextStyle(color: Colors.black), 56 | initialValue: initialValue, 57 | maxLength: 12, 58 | inputDecoration: InputDecoration( 59 | hintStyle: CsTextStyle.overline.copyWith( 60 | color: const Color(0xFF9EA1A7), 61 | fontWeight: CsFontWeight.medium, 62 | ), 63 | hintText: hintText, 64 | // labelText: labelText, 65 | labelStyle: const TextStyle( 66 | color: CsColors.black, 67 | ), 68 | 69 | counterText: '', 70 | fillColor: CsColors.background, 71 | filled: true, 72 | focusedBorder: OutlineInputBorder( 73 | borderRadius: BorderRadius.circular( 74 | 8, 75 | ), 76 | borderSide: borderSide, 77 | ), 78 | enabledBorder: OutlineInputBorder( 79 | borderRadius: BorderRadius.circular( 80 | 8, 81 | ), 82 | borderSide: borderSide, 83 | ), 84 | border: OutlineInputBorder( 85 | borderRadius: BorderRadius.circular( 86 | 8, 87 | ), 88 | borderSide: borderSide, 89 | ), 90 | contentPadding: const EdgeInsets.only( 91 | left: 20, 92 | bottom: 20, 93 | top: 20, 94 | // right: 25, 95 | ), 96 | ), 97 | onSaved: onSaved, 98 | ); 99 | } 100 | } 101 | -------------------------------------------------------------------------------- /packages/cs_ui/lib/src/widgets/loader_button.dart: -------------------------------------------------------------------------------- 1 | import 'package:cs_ui/cs_ui.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class LoaderButton extends StatelessWidget { 5 | const LoaderButton({ 6 | Key? key, 7 | this.text, 8 | this.onPressed, 9 | this.color = CsColors.primary, 10 | this.textColor = CsColors.white, 11 | this.textSize = 16.0, 12 | this.elevation = 0.0, 13 | this.radius = 12, 14 | this.padding = const EdgeInsets.all(15), 15 | this.border = const BorderSide(color: CsColors.primary), 16 | this.isLoading = false, 17 | }) : super(key: key); 18 | 19 | final String? text; 20 | final VoidCallback? onPressed; 21 | final Color color; 22 | final Color textColor; 23 | final double textSize; 24 | final double elevation; 25 | final BorderSide border; 26 | final double radius; 27 | final EdgeInsets padding; 28 | final bool isLoading; 29 | 30 | @override 31 | Widget build(BuildContext context) { 32 | return ConstrainedBox( 33 | constraints: 34 | BoxConstraints.tightFor(width: MediaQuery.of(context).size.width), 35 | child: ElevatedButton( 36 | onPressed: onPressed, 37 | style: ElevatedButton.styleFrom( 38 | primary: color, 39 | shape: RoundedRectangleBorder( 40 | borderRadius: BorderRadius.circular(radius), 41 | ), 42 | ), 43 | child: Padding( 44 | padding: padding, 45 | child: isLoading 46 | ? const Center( 47 | child: CircularProgressIndicator( 48 | backgroundColor: Colors.white, 49 | strokeWidth: 2, 50 | valueColor: AlwaysStoppedAnimation(CsColors.primary), 51 | )) 52 | : Text( 53 | text!, 54 | style: CsTextStyle.caption.copyWith( 55 | color: textColor, 56 | fontSize: textSize, 57 | fontWeight: CsFontWeight.medium, 58 | ), 59 | ), 60 | ), 61 | ), 62 | ); 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /packages/cs_ui/lib/src/widgets/otp_text_field.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:cs_ui/cs_ui.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:pin_code_fields/pin_code_fields.dart'; 6 | 7 | class OtpTextField extends StatelessWidget { 8 | const OtpTextField({ 9 | Key? key, 10 | this.length = 4, 11 | this.onCompleted, 12 | this.onChanged, 13 | this.controller, 14 | this.errorController, 15 | this.validator, 16 | }) : super(key: key); 17 | 18 | final ValueSetter? onCompleted; 19 | final FormFieldValidator? validator; 20 | final ValueSetter? onChanged; 21 | final TextEditingController? controller; 22 | final StreamController? errorController; 23 | final int length; 24 | 25 | @override 26 | Widget build(BuildContext context) { 27 | return PinCodeTextField( 28 | appContext: context, 29 | length: length, 30 | validator: validator, 31 | animationType: AnimationType.fade, 32 | backgroundColor: const Color(0xFF222222), 33 | pinTheme: PinTheme( 34 | shape: PinCodeFieldShape.box, 35 | borderRadius: BorderRadius.circular(10), 36 | fieldHeight: 60, 37 | fieldWidth: 64, 38 | activeFillColor: CsColors.white, 39 | inactiveFillColor: Colors.red, 40 | activeColor: CsColors.white, 41 | inactiveColor: CsColors.white, 42 | selectedColor: CsColors.white, 43 | ), 44 | cursorColor: Colors.black, 45 | textStyle: const TextStyle( 46 | color: CsColors.black, 47 | ), 48 | animationDuration: const Duration(milliseconds: 300), 49 | errorAnimationController: errorController, 50 | controller: controller, 51 | boxShadows: const [ 52 | BoxShadow( 53 | color: CsColors.white, 54 | ), 55 | ], 56 | keyboardType: TextInputType.number, 57 | onCompleted: onCompleted, 58 | onChanged: onChanged ?? (_) {}, 59 | beforeTextPaste: (text) { 60 | return false; 61 | }, 62 | ); 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /packages/cs_ui/lib/src/widgets/select_box.dart: -------------------------------------------------------------------------------- 1 | import 'package:cs_ui/cs_ui.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class SelectBox extends StatelessWidget { 5 | const SelectBox({ 6 | Key? key, 7 | @required this.items, 8 | this.validator, 9 | this.radius = 12.0, 10 | this.value, 11 | this.onChanged, 12 | this.icon, 13 | this.focusNode, 14 | this.borderSide = const BorderSide(color: Color(0xFFF5F5F5)), 15 | }) : super(key: key); 16 | 17 | final List>? items; 18 | final FormFieldValidator? validator; 19 | final double radius; 20 | final dynamic value; 21 | final ValueSetter? onChanged; 22 | final BorderSide borderSide; 23 | final Widget? icon; 24 | final FocusNode? focusNode; 25 | 26 | @override 27 | Widget build(BuildContext context) { 28 | return DropdownButtonFormField( 29 | value: value as T, 30 | items: items, 31 | isExpanded: true, 32 | focusNode: focusNode, 33 | validator: validator, 34 | decoration: InputDecoration( 35 | hintStyle: CsTextStyle.overline.copyWith( 36 | color: CsColors.primaryText.withOpacity(0.7), 37 | fontWeight: CsFontWeight.medium, 38 | ), 39 | filled: true, 40 | fillColor: const Color(0xFFF5F5F5), 41 | prefixIcon: icon, 42 | focusedBorder: OutlineInputBorder( 43 | borderRadius: BorderRadius.circular( 44 | radius, 45 | ), 46 | borderSide: borderSide, 47 | ), 48 | enabledBorder: OutlineInputBorder( 49 | borderRadius: BorderRadius.circular( 50 | radius, 51 | ), 52 | borderSide: borderSide, 53 | ), 54 | border: OutlineInputBorder( 55 | borderRadius: BorderRadius.circular( 56 | radius, 57 | ), 58 | borderSide: borderSide, 59 | ), 60 | contentPadding: const EdgeInsets.only( 61 | left: 10, 62 | bottom: 15, 63 | top: 15, 64 | right: 10, 65 | ), 66 | ), 67 | onChanged: onChanged, 68 | dropdownColor: CsColors.white, 69 | style: CsTextStyle.caption.copyWith( 70 | color: CsColors.black, 71 | ), 72 | iconEnabledColor: CsColors.black, 73 | icon: const Icon( 74 | Icons.keyboard_arrow_down, 75 | size: 25, 76 | color: CsColors.black, 77 | ), 78 | ); 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /packages/cs_ui/lib/src/widgets/solid_button.dart: -------------------------------------------------------------------------------- 1 | import 'package:cs_ui/cs_ui.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class SolidButton extends StatelessWidget { 5 | const SolidButton({ 6 | Key? key, 7 | this.text, 8 | this.onPressed, 9 | this.color = CsColors.primary, 10 | this.textColor = CsColors.black, 11 | this.textSize = 16.0, 12 | this.elevation = 0.0, 13 | this.radius = 50, 14 | this.padding = const EdgeInsets.all(20), 15 | this.border = const BorderSide(color: Colors.transparent), 16 | }) : super(key: key); 17 | 18 | final String? text; 19 | final VoidCallback? onPressed; 20 | final Color color; 21 | final Color textColor; 22 | final double textSize; 23 | final double elevation; 24 | final BorderSide border; 25 | final double radius; 26 | final EdgeInsets padding; 27 | 28 | @override 29 | Widget build(BuildContext context) { 30 | return ConstrainedBox( 31 | constraints: 32 | BoxConstraints.tightFor(width: MediaQuery.of(context).size.width), 33 | child: ElevatedButton( 34 | onPressed: onPressed, 35 | style: ElevatedButton.styleFrom( 36 | primary: color, 37 | shape: RoundedRectangleBorder( 38 | borderRadius: BorderRadius.circular(radius), 39 | side: border, 40 | ), 41 | ), 42 | child: Padding( 43 | padding: padding, 44 | child: Text( 45 | text!.toUpperCase(), 46 | style: CsTextStyle.button.copyWith( 47 | color: textColor, 48 | // fontSize: textSize, 49 | fontWeight: CsFontWeight.semiBold, 50 | ), 51 | ), 52 | ), 53 | ), 54 | ); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /packages/cs_ui/lib/src/widgets/solid_material_button.dart: -------------------------------------------------------------------------------- 1 | import 'package:cs_ui/cs_ui.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class SolidMaterialButton extends StatelessWidget { 5 | const SolidMaterialButton({ 6 | Key? key, 7 | this.text, 8 | this.onPressed, 9 | this.color = CsColors.primary, 10 | this.textColor = CsColors.white, 11 | this.textSize = 18.0, 12 | this.elevation = 0.0, 13 | this.border = const BorderSide(color: CsColors.primary), 14 | }) : super(key: key); 15 | 16 | final String? text; 17 | final VoidCallback? onPressed; 18 | final Color color; 19 | final Color textColor; 20 | final double textSize; 21 | final double elevation; 22 | final BorderSide border; 23 | 24 | @override 25 | Widget build(BuildContext context) { 26 | return MaterialButton( 27 | color: color, 28 | minWidth: double.infinity, 29 | onPressed: onPressed, 30 | elevation: elevation, 31 | disabledColor: color.withOpacity(0.6), 32 | shape: RoundedRectangleBorder( 33 | borderRadius: BorderRadius.circular( 34 | 12, 35 | ), 36 | side: onPressed == null 37 | ? const BorderSide(color: Colors.transparent) 38 | : border, 39 | ), 40 | child: Padding( 41 | padding: const EdgeInsets.all( 42 | 15, 43 | ), 44 | child: Text( 45 | text!, 46 | style: CsTextStyle.caption.copyWith( 47 | color: textColor, 48 | fontSize: textSize, 49 | ), 50 | ), 51 | ), 52 | ); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /packages/cs_ui/lib/src/widgets/utils.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:cs_ui/cs_ui.dart'; 4 | import 'package:flutter/cupertino.dart'; 5 | import 'package:flutter/material.dart'; 6 | 7 | class Utils { 8 | static void showErrorMessage(BuildContext context, {String? error}) async { 9 | ScaffoldMessenger.of(context).showSnackBar( 10 | SnackBar( 11 | backgroundColor: Colors.redAccent, 12 | content: Row( 13 | children: [ 14 | const Icon(Icons.error_outline, color: CsColors.white), 15 | const SizedBox( 16 | width: 7, 17 | ), 18 | Expanded( 19 | child: Text( 20 | error!, 21 | style: CsTextStyle.smallText.copyWith( 22 | fontSize: 16, 23 | color: CsColors.white, 24 | ), 25 | ), 26 | ) 27 | ], 28 | ), 29 | dismissDirection: DismissDirection.startToEnd, 30 | margin: const EdgeInsets.all(15), 31 | behavior: SnackBarBehavior.floating, 32 | duration: const Duration(milliseconds: 1000), 33 | shape: RoundedRectangleBorder( 34 | borderRadius: BorderRadius.circular(12), 35 | ), 36 | ), 37 | ); 38 | } 39 | 40 | static void showSuccessMessage(BuildContext context, 41 | {String? message}) async { 42 | ScaffoldMessenger.of(context).showSnackBar( 43 | SnackBar( 44 | backgroundColor: const Color(0xFF20BD2C), 45 | content: Row( 46 | children: [ 47 | const Icon( 48 | Icons.check_circle_outline, 49 | color: CsColors.white, 50 | ), 51 | const SizedBox( 52 | width: 7, 53 | ), 54 | Text( 55 | message!, 56 | style: CsTextStyle.smallText.copyWith( 57 | fontSize: 16, 58 | color: CsColors.white, 59 | ), 60 | ) 61 | ], 62 | ), 63 | dismissDirection: DismissDirection.startToEnd, 64 | behavior: SnackBarBehavior.floating, 65 | margin: const EdgeInsets.all(15), 66 | shape: RoundedRectangleBorder( 67 | borderRadius: BorderRadius.circular(12), 68 | ), 69 | duration: const Duration(milliseconds: 1000), 70 | ), 71 | ); 72 | } 73 | 74 | static Future showLoadingDialog(BuildContext context) { 75 | return showDialog( 76 | context: context, 77 | // for testing, for now this will be true, should be changed to false later 78 | barrierDismissible: true, 79 | builder: (BuildContext context) { 80 | return WillPopScope( 81 | // for testing, for now this will be true, should be changed to false later 82 | onWillPop: () async => true, 83 | child: SimpleDialog( 84 | //key: key ?? const Key('0'), 85 | elevation: 0, 86 | backgroundColor: Colors.transparent, 87 | children: [ 88 | if (Platform.isIOS) 89 | Center( 90 | child: Theme( 91 | data: ThemeData( 92 | cupertinoOverrideTheme: 93 | const CupertinoThemeData(brightness: Brightness.dark), 94 | ), 95 | child: const CupertinoActivityIndicator( 96 | radius: 18, 97 | ), 98 | ), 99 | ) 100 | else 101 | const Center( 102 | child: CircularProgressIndicator( 103 | backgroundColor: CsColors.primary, 104 | strokeWidth: 1.3, 105 | ), 106 | ), 107 | ], 108 | ), 109 | ); 110 | }, 111 | ); 112 | } 113 | } 114 | -------------------------------------------------------------------------------- /packages/cs_ui/lib/src/widgets/widget.dart: -------------------------------------------------------------------------------- 1 | export 'cs_flat_button.dart'; 2 | export 'custom_text_field.dart'; 3 | export 'input_box.dart'; 4 | export 'intl_phone_text_field.dart'; 5 | export 'loader_button.dart'; 6 | export 'otp_text_field.dart'; 7 | export 'phone_number_input.dart'; 8 | export 'select_box.dart'; 9 | export 'solid_button.dart'; 10 | export 'solid_material_button.dart'; 11 | export 'text_area.dart'; 12 | export 'utils.dart'; 13 | -------------------------------------------------------------------------------- /packages/cs_ui/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: cs_ui 2 | description: A Very Good Project created by Very Good CLI. 3 | version: 1.0.0+1 4 | publish_to: none 5 | 6 | environment: 7 | sdk: ">=2.13.0 <3.0.0" 8 | 9 | dependencies: 10 | flutter: 11 | sdk: flutter 12 | flutter_svg: ^0.23.0+1 13 | intl: ^0.17.0 14 | intl_phone_number_input: ^0.7.0+2 15 | pin_code_fields: ^7.3.0 16 | 17 | dev_dependencies: 18 | flutter_test: 19 | sdk: flutter 20 | very_good_analysis: ^2.3.0 -------------------------------------------------------------------------------- /packages/cs_ui/test/src/cs_ui_test.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: prefer_const_constructors 2 | import 'package:flutter_test/flutter_test.dart'; 3 | 4 | void main() { 5 | group('CsUi', () { 6 | test('can be instantiated', () { 7 | //expect(CsUi(), isNotNull); 8 | }); 9 | }); 10 | } 11 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: crypto_wallet 2 | description: A Very Good Project created by Very Good CLI. 3 | version: 1.0.0+1 4 | publish_to: none 5 | 6 | environment: 7 | sdk: ">=3.1.1 <4.0.0" 8 | 9 | dependencies: 10 | # aes_crypt: 11 | # git: 12 | # url: https://github.com/cscoderr/aes_crypt.git 13 | aes_crypt_null_safe: ^2.0.2 14 | bip39: ^1.0.6 15 | bloc: ^8.0.3 16 | cryptography: ^2.0.5 17 | cryptography_flutter: ^2.3.2 18 | cs_ui: 19 | path: packages/cs_ui 20 | dotted_border: ^2.0.0+1 21 | ed25519_hd_key: ^2.2.0 22 | encrypt: ^5.0.1 23 | equatable: ^2.0.3 24 | flutter: 25 | sdk: flutter 26 | flutter_bloc: ^8.0.1 27 | # flutter_localizations: 28 | # sdk: flutter 29 | flutter_dotenv: ^5.0.2 30 | flutter_secure_storage: ^5.0.2 31 | flutter_svg: ^0.23.0+1 32 | hex: ^0.2.0 33 | http: ^0.13.4 34 | intl: ^0.17.0 35 | modal_bottom_sheet: ^3.0.0-pre 36 | pin_code_fields: ^7.4.0 37 | web3dart: ^2.3.5 38 | 39 | dev_dependencies: 40 | bloc_test: ^9.0.3 41 | flutter_test: 42 | sdk: flutter 43 | mocktail: ^0.3.0 44 | very_good_analysis: ^2.4.0 45 | 46 | flutter: 47 | uses-material-design: true 48 | generate: true 49 | 50 | assets: 51 | - assets/images/ 52 | - assets/images/svg/ 53 | - assets/abi/ 54 | - assets/.env 55 | - assets/.env.dev 56 | -------------------------------------------------------------------------------- /screenshots/import_token.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/screenshots/import_token.png -------------------------------------------------------------------------------- /test/app/view/app_test.dart: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2022, Very Good Ventures 2 | // https://verygood.ventures 3 | // 4 | // Use of this source code is governed by an MIT-style 5 | // license that can be found in the LICENSE file or at 6 | // https://opensource.org/licenses/MIT. 7 | 8 | import 'package:crypto_wallet/app/app.dart'; 9 | import 'package:crypto_wallet/counter/counter.dart'; 10 | import 'package:flutter_test/flutter_test.dart'; 11 | 12 | void main() { 13 | group('App', () { 14 | testWidgets('renders CounterPage', (tester) async { 15 | await tester.pumpWidget(const App()); 16 | expect(find.byType(CounterPage), findsOneWidget); 17 | }); 18 | }); 19 | } 20 | -------------------------------------------------------------------------------- /test/counter/cubit/counter_cubit_test.dart: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2022, Very Good Ventures 2 | // https://verygood.ventures 3 | // 4 | // Use of this source code is governed by an MIT-style 5 | // license that can be found in the LICENSE file or at 6 | // https://opensource.org/licenses/MIT. 7 | 8 | import 'package:bloc_test/bloc_test.dart'; 9 | import 'package:crypto_wallet/counter/counter.dart'; 10 | import 'package:flutter_test/flutter_test.dart'; 11 | 12 | void main() { 13 | group('CounterCubit', () { 14 | test('initial state is 0', () { 15 | expect(CounterCubit().state, equals(0)); 16 | }); 17 | 18 | blocTest( 19 | 'emits [1] when increment is called', 20 | build: CounterCubit.new, 21 | act: (cubit) => cubit.increment(), 22 | expect: () => [equals(1)], 23 | ); 24 | 25 | blocTest( 26 | 'emits [-1] when decrement is called', 27 | build: CounterCubit.new, 28 | act: (cubit) => cubit.decrement(), 29 | expect: () => [equals(-1)], 30 | ); 31 | }); 32 | } 33 | -------------------------------------------------------------------------------- /test/counter/view/counter_page_test.dart: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2022, Very Good Ventures 2 | // https://verygood.ventures 3 | // 4 | // Use of this source code is governed by an MIT-style 5 | // license that can be found in the LICENSE file or at 6 | // https://opensource.org/licenses/MIT. 7 | 8 | import 'package:bloc_test/bloc_test.dart'; 9 | import 'package:crypto_wallet/counter/counter.dart'; 10 | import 'package:flutter/material.dart'; 11 | import 'package:flutter_bloc/flutter_bloc.dart'; 12 | import 'package:flutter_test/flutter_test.dart'; 13 | import 'package:mocktail/mocktail.dart'; 14 | 15 | import '../../helpers/helpers.dart'; 16 | 17 | class MockCounterCubit extends MockCubit implements CounterCubit {} 18 | 19 | void main() { 20 | group('CounterPage', () { 21 | testWidgets('renders CounterView', (tester) async { 22 | await tester.pumpApp(const CounterPage()); 23 | expect(find.byType(CounterView), findsOneWidget); 24 | }); 25 | }); 26 | 27 | group('CounterView', () { 28 | late CounterCubit counterCubit; 29 | 30 | setUp(() { 31 | counterCubit = MockCounterCubit(); 32 | }); 33 | 34 | testWidgets('renders current count', (tester) async { 35 | const state = 42; 36 | when(() => counterCubit.state).thenReturn(state); 37 | await tester.pumpApp( 38 | BlocProvider.value( 39 | value: counterCubit, 40 | child: const CounterView(), 41 | ), 42 | ); 43 | expect(find.text('$state'), findsOneWidget); 44 | }); 45 | 46 | testWidgets('calls increment when increment button is tapped', 47 | (tester) async { 48 | when(() => counterCubit.state).thenReturn(0); 49 | when(() => counterCubit.increment()).thenReturn(null); 50 | await tester.pumpApp( 51 | BlocProvider.value( 52 | value: counterCubit, 53 | child: const CounterView(), 54 | ), 55 | ); 56 | await tester.tap(find.byIcon(Icons.add)); 57 | verify(() => counterCubit.increment()).called(1); 58 | }); 59 | 60 | testWidgets('calls decrement when decrement button is tapped', 61 | (tester) async { 62 | when(() => counterCubit.state).thenReturn(0); 63 | when(() => counterCubit.decrement()).thenReturn(null); 64 | await tester.pumpApp( 65 | BlocProvider.value( 66 | value: counterCubit, 67 | child: const CounterView(), 68 | ), 69 | ); 70 | await tester.tap(find.byIcon(Icons.remove)); 71 | verify(() => counterCubit.decrement()).called(1); 72 | }); 73 | }); 74 | } 75 | -------------------------------------------------------------------------------- /test/helpers/helpers.dart: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2022, Very Good Ventures 2 | // https://verygood.ventures 3 | // 4 | // Use of this source code is governed by an MIT-style 5 | // license that can be found in the LICENSE file or at 6 | // https://opensource.org/licenses/MIT. 7 | 8 | export 'pump_app.dart'; 9 | -------------------------------------------------------------------------------- /test/helpers/pump_app.dart: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2022, Very Good Ventures 2 | // https://verygood.ventures 3 | // 4 | // Use of this source code is governed by an MIT-style 5 | // license that can be found in the LICENSE file or at 6 | // https://opensource.org/licenses/MIT. 7 | 8 | import 'package:crypto_wallet/l10n/l10n.dart'; 9 | import 'package:flutter/material.dart'; 10 | import 'package:flutter_localizations/flutter_localizations.dart'; 11 | import 'package:flutter_test/flutter_test.dart'; 12 | 13 | extension PumpApp on WidgetTester { 14 | Future pumpApp(Widget widget) { 15 | return pumpWidget( 16 | MaterialApp( 17 | localizationsDelegates: const [ 18 | AppLocalizations.delegate, 19 | GlobalMaterialLocalizations.delegate, 20 | ], 21 | supportedLocales: AppLocalizations.supportedLocales, 22 | home: widget, 23 | ), 24 | ); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /web/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/web/favicon.png -------------------------------------------------------------------------------- /web/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/web/icons/Icon-192.png -------------------------------------------------------------------------------- /web/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/web/icons/Icon-512.png -------------------------------------------------------------------------------- /web/icons/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/web/icons/favicon.png -------------------------------------------------------------------------------- /web/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Crypto Wallet", 3 | "short_name": "Crypto Wallet", 4 | "start_url": ".", 5 | "display": "standalone", 6 | "background_color": "#0175C2", 7 | "theme_color": "#0175C2", 8 | "description": "A Very Good Project created by Very Good CLI.", 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 | } 24 | -------------------------------------------------------------------------------- /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/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.14) 2 | project(crypto_wallet LANGUAGES CXX) 3 | 4 | set(BINARY_NAME "crypto_wallet") 5 | 6 | cmake_policy(SET CMP0063 NEW) 7 | 8 | set(CMAKE_INSTALL_RPATH "$ORIGIN/lib") 9 | 10 | # Configure build options. 11 | get_property(IS_MULTICONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) 12 | if(IS_MULTICONFIG) 13 | set(CMAKE_CONFIGURATION_TYPES "Debug;Profile;Release" 14 | CACHE STRING "" FORCE) 15 | else() 16 | if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) 17 | set(CMAKE_BUILD_TYPE "Debug" CACHE 18 | STRING "Flutter build mode" FORCE) 19 | set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS 20 | "Debug" "Profile" "Release") 21 | endif() 22 | endif() 23 | 24 | set(CMAKE_EXE_LINKER_FLAGS_PROFILE "${CMAKE_EXE_LINKER_FLAGS_RELEASE}") 25 | set(CMAKE_SHARED_LINKER_FLAGS_PROFILE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE}") 26 | set(CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_RELEASE}") 27 | set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_CXX_FLAGS_RELEASE}") 28 | 29 | # Use Unicode for all projects. 30 | add_definitions(-DUNICODE -D_UNICODE) 31 | 32 | # Compilation settings that should be applied to most targets. 33 | function(APPLY_STANDARD_SETTINGS TARGET) 34 | target_compile_features(${TARGET} PUBLIC cxx_std_17) 35 | target_compile_options(${TARGET} PRIVATE /W4 /WX /wd"4100") 36 | target_compile_options(${TARGET} PRIVATE /EHsc) 37 | target_compile_definitions(${TARGET} PRIVATE "_HAS_EXCEPTIONS=0") 38 | target_compile_definitions(${TARGET} PRIVATE "$<$:_DEBUG>") 39 | endfunction() 40 | 41 | set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") 42 | 43 | # Flutter library and tool build rules. 44 | add_subdirectory(${FLUTTER_MANAGED_DIR}) 45 | 46 | # Application build 47 | add_subdirectory("runner") 48 | 49 | # Generated plugin build rules, which manage building the plugins and adding 50 | # them to the application. 51 | include(flutter/generated_plugins.cmake) 52 | 53 | 54 | # === Installation === 55 | # Support files are copied into place next to the executable, so that it can 56 | # run in place. This is done instead of making a separate bundle (as on Linux) 57 | # so that building and running from within Visual Studio will work. 58 | set(BUILD_BUNDLE_DIR "$") 59 | # Make the "install" step default, as it's required to run. 60 | set(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD 1) 61 | if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) 62 | set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) 63 | endif() 64 | 65 | set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") 66 | set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}") 67 | 68 | install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}" 69 | COMPONENT Runtime) 70 | 71 | install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" 72 | COMPONENT Runtime) 73 | 74 | install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 75 | COMPONENT Runtime) 76 | 77 | if(PLUGIN_BUNDLED_LIBRARIES) 78 | install(FILES "${PLUGIN_BUNDLED_LIBRARIES}" 79 | DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 80 | COMPONENT Runtime) 81 | endif() 82 | 83 | # Fully re-copy the assets directory on each build to avoid having stale files 84 | # from a previous install. 85 | set(FLUTTER_ASSET_DIR_NAME "flutter_assets") 86 | install(CODE " 87 | file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") 88 | " COMPONENT Runtime) 89 | install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" 90 | DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) 91 | 92 | # Install the AOT library on non-Debug builds only. 93 | install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" 94 | CONFIGURATIONS Profile;Release 95 | COMPONENT Runtime) 96 | -------------------------------------------------------------------------------- /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 | FlutterSecureStorageWindowsPluginRegisterWithRegistrar( 13 | registry->GetRegistrarForPlugin("FlutterSecureStorageWindowsPlugin")); 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 | flutter_secure_storage_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 | add_executable(${BINARY_NAME} WIN32 5 | "flutter_window.cpp" 6 | "main.cpp" 7 | "utils.cpp" 8 | "win32_window.cpp" 9 | "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" 10 | "Runner.rc" 11 | "runner.exe.manifest" 12 | ) 13 | apply_standard_settings(${BINARY_NAME}) 14 | target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX") 15 | target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app) 16 | target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}") 17 | add_dependencies(${BINARY_NAME} flutter_assemble) 18 | -------------------------------------------------------------------------------- /windows/runner/Runner.rc: -------------------------------------------------------------------------------- 1 | // Microsoft Visual C++ generated resource script. 2 | // 3 | #pragma code_page(65001) 4 | #include "resource.h" 5 | 6 | #define APSTUDIO_READONLY_SYMBOLS 7 | ///////////////////////////////////////////////////////////////////////////// 8 | // 9 | // Generated from the TEXTINCLUDE 2 resource. 10 | // 11 | #include "winres.h" 12 | 13 | ///////////////////////////////////////////////////////////////////////////// 14 | #undef APSTUDIO_READONLY_SYMBOLS 15 | 16 | ///////////////////////////////////////////////////////////////////////////// 17 | // English (United States) resources 18 | 19 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) 20 | LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US 21 | 22 | #ifdef APSTUDIO_INVOKED 23 | ///////////////////////////////////////////////////////////////////////////// 24 | // 25 | // TEXTINCLUDE 26 | // 27 | 28 | 1 TEXTINCLUDE 29 | BEGIN 30 | "resource.h\0" 31 | END 32 | 33 | 2 TEXTINCLUDE 34 | BEGIN 35 | "#include ""winres.h""\r\n" 36 | "\0" 37 | END 38 | 39 | 3 TEXTINCLUDE 40 | BEGIN 41 | "\r\n" 42 | "\0" 43 | END 44 | 45 | #endif // APSTUDIO_INVOKED 46 | 47 | 48 | ///////////////////////////////////////////////////////////////////////////// 49 | // 50 | // Icon 51 | // 52 | 53 | // Icon with lowest ID value placed first to ensure application icon 54 | // remains consistent on all systems. 55 | IDI_APP_ICON ICON "resources\\app_icon.ico" 56 | 57 | 58 | ///////////////////////////////////////////////////////////////////////////// 59 | // 60 | // Version 61 | // 62 | 63 | #ifdef FLUTTER_BUILD_NUMBER 64 | #define VERSION_AS_NUMBER FLUTTER_BUILD_NUMBER 65 | #else 66 | #define VERSION_AS_NUMBER 1,0,0 67 | #endif 68 | 69 | #ifdef FLUTTER_BUILD_NAME 70 | #define VERSION_AS_STRING #FLUTTER_BUILD_NAME 71 | #else 72 | #define VERSION_AS_STRING "1.0.0" 73 | #endif 74 | 75 | VS_VERSION_INFO VERSIONINFO 76 | FILEVERSION VERSION_AS_NUMBER 77 | PRODUCTVERSION VERSION_AS_NUMBER 78 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK 79 | #ifdef _DEBUG 80 | FILEFLAGS VS_FF_DEBUG 81 | #else 82 | FILEFLAGS 0x0L 83 | #endif 84 | FILEOS VOS__WINDOWS32 85 | FILETYPE VFT_APP 86 | FILESUBTYPE 0x0L 87 | BEGIN 88 | BLOCK "StringFileInfo" 89 | BEGIN 90 | BLOCK "040904e4" 91 | BEGIN 92 | VALUE "CompanyName", "com.example.verygoodcore.crypto-wallet" "\0" 93 | VALUE "FileDescription", "crypto_wallet" "\0" 94 | VALUE "FileVersion", VERSION_AS_STRING "\0" 95 | VALUE "InternalName", "crypto_wallet" "\0" 96 | VALUE "LegalCopyright", "Copyright (C) 2022 com.example.verygoodcore.crypto-wallet. All rights reserved." "\0" 97 | VALUE "OriginalFilename", "crypto_wallet.exe" "\0" 98 | VALUE "ProductName", "Crypto Wallet" "\0" 99 | VALUE "ProductVersion", VERSION_AS_STRING "\0" 100 | END 101 | END 102 | BLOCK "VarFileInfo" 103 | BEGIN 104 | VALUE "Translation", 0x409, 1252 105 | END 106 | END 107 | 108 | #endif // English (United States) resources 109 | ///////////////////////////////////////////////////////////////////////////// 110 | 111 | 112 | 113 | #ifndef APSTUDIO_INVOKED 114 | ///////////////////////////////////////////////////////////////////////////// 115 | // 116 | // Generated from the TEXTINCLUDE 3 resource. 117 | // 118 | 119 | 120 | ///////////////////////////////////////////////////////////////////////////// 121 | #endif // not APSTUDIO_INVOKED 122 | -------------------------------------------------------------------------------- /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 | return true; 30 | } 31 | 32 | void FlutterWindow::OnDestroy() { 33 | if (flutter_controller_) { 34 | flutter_controller_ = nullptr; 35 | } 36 | 37 | Win32Window::OnDestroy(); 38 | } 39 | 40 | LRESULT 41 | FlutterWindow::MessageHandler(HWND hwnd, UINT const message, 42 | WPARAM const wparam, 43 | LPARAM const lparam) noexcept { 44 | // Give Flutter, including plugins, an opportunity to handle window messages. 45 | if (flutter_controller_) { 46 | std::optional result = 47 | flutter_controller_->HandleTopLevelWindowProc(hwnd, message, wparam, 48 | lparam); 49 | if (result) { 50 | return *result; 51 | } 52 | } 53 | 54 | switch (message) { 55 | case WM_FONTCHANGE: 56 | flutter_controller_->engine()->ReloadSystemFonts(); 57 | break; 58 | } 59 | 60 | return Win32Window::MessageHandler(hwnd, message, wparam, lparam); 61 | } 62 | -------------------------------------------------------------------------------- /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.CreateAndShow(L"Crypto Wallet", 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 | // 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/cscoderr/crypto_wallet_app/536a991093864b2a371c750dc656ba99a2ec3263/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 | if (target_length == 0) { 52 | return std::string(); 53 | } 54 | std::string utf8_string; 55 | utf8_string.resize(target_length); 56 | int converted_length = ::WideCharToMultiByte( 57 | CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, 58 | -1, utf8_string.data(), 59 | target_length, nullptr, nullptr); 60 | if (converted_length == 0) { 61 | return std::string(); 62 | } 63 | return utf8_string; 64 | } 65 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /windows/runner/win32_window.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_WIN32_WINDOW_H_ 2 | #define RUNNER_WIN32_WINDOW_H_ 3 | 4 | #include 5 | 6 | #include 7 | #include 8 | #include 9 | 10 | // A class abstraction for a high DPI-aware Win32 Window. Intended to be 11 | // inherited from by classes that wish to specialize with custom 12 | // rendering and input handling 13 | class Win32Window { 14 | public: 15 | struct Point { 16 | unsigned int x; 17 | unsigned int y; 18 | Point(unsigned int x, unsigned int y) : x(x), y(y) {} 19 | }; 20 | 21 | struct Size { 22 | unsigned int width; 23 | unsigned int height; 24 | Size(unsigned int width, unsigned int height) 25 | : width(width), height(height) {} 26 | }; 27 | 28 | Win32Window(); 29 | virtual ~Win32Window(); 30 | 31 | // Creates and shows a win32 window with |title| and position and size using 32 | // |origin| and |size|. New windows are created on the default monitor. Window 33 | // sizes are specified to the OS in physical pixels, hence to ensure a 34 | // consistent size to will treat the width height passed in to this function 35 | // as logical pixels and scale to appropriate for the default monitor. Returns 36 | // true if the window was created successfully. 37 | bool CreateAndShow(const std::wstring& title, 38 | const Point& origin, 39 | const Size& size); 40 | 41 | // Release OS resources associated with window. 42 | void Destroy(); 43 | 44 | // Inserts |content| into the window tree. 45 | void SetChildContent(HWND content); 46 | 47 | // Returns the backing Window handle to enable clients to set icon and other 48 | // window properties. Returns nullptr if the window has been destroyed. 49 | HWND GetHandle(); 50 | 51 | // If true, closing this window will quit the application. 52 | void SetQuitOnClose(bool quit_on_close); 53 | 54 | // Return a RECT representing the bounds of the current client area. 55 | RECT GetClientArea(); 56 | 57 | protected: 58 | // Processes and route salient window messages for mouse handling, 59 | // size change and DPI. Delegates handling of these to member overloads that 60 | // inheriting classes can handle. 61 | virtual LRESULT MessageHandler(HWND window, 62 | UINT const message, 63 | WPARAM const wparam, 64 | LPARAM const lparam) noexcept; 65 | 66 | // Called when CreateAndShow is called, allowing subclass window-related 67 | // setup. Subclasses should return false if setup fails. 68 | virtual bool OnCreate(); 69 | 70 | // Called when Destroy is called. 71 | virtual void OnDestroy(); 72 | 73 | private: 74 | friend class WindowClassRegistrar; 75 | 76 | // OS callback called by message pump. Handles the WM_NCCREATE message which 77 | // is passed when the non-client area is being created and enables automatic 78 | // non-client DPI scaling so that the non-client area automatically 79 | // responsponds to changes in DPI. All other messages are handled by 80 | // MessageHandler. 81 | static LRESULT CALLBACK WndProc(HWND const window, 82 | UINT const message, 83 | WPARAM const wparam, 84 | LPARAM const lparam) noexcept; 85 | 86 | // Retrieves a class instance pointer for |window| 87 | static Win32Window* GetThisFromHandle(HWND const window) noexcept; 88 | 89 | bool quit_on_close_ = false; 90 | 91 | // window handle for top level window. 92 | HWND window_handle_ = nullptr; 93 | 94 | // window handle for hosted content. 95 | HWND child_content_ = nullptr; 96 | }; 97 | 98 | #endif // RUNNER_WIN32_WINDOW_H_ 99 | --------------------------------------------------------------------------------