├── assets ├── icons │ └── .gitkeep ├── fonts │ ├── iconfont.ttf │ └── DatDot-Light.ttf ├── images │ ├── top_bar.png │ └── top_bar_dark.png └── translations │ └── app_zh.arb ├── linux ├── .gitignore ├── main.cc ├── flutter │ ├── generated_plugin_registrant.h │ └── generated_plugins.cmake └── my_application.h ├── lib ├── application │ ├── service │ │ └── apis │ │ │ ├── navs.dart │ │ │ └── apis.dart │ ├── store │ │ ├── app │ │ │ ├── webrtc.dart │ │ │ └── org.dart │ │ └── db.dart │ └── chain │ │ └── wetee │ │ ├── wetee_gen │ │ ├── types │ │ │ ├── sp_core │ │ │ │ ├── void.dart │ │ │ │ └── crypto │ │ │ │ │ └── account_id32.dart │ │ │ ├── sp_consensus_slots │ │ │ │ └── slot.dart │ │ │ ├── wetee_runtime │ │ │ │ ├── runtime.dart │ │ │ │ └── worker │ │ │ │ │ └── message_origin.dart │ │ │ ├── primitive_types │ │ │ │ └── h256.dart │ │ │ ├── sp_arithmetic │ │ │ │ ├── per_things │ │ │ │ │ └── perbill.dart │ │ │ │ ├── fixed_point │ │ │ │ │ └── fixed_u128.dart │ │ │ │ └── arithmetic_error.dart │ │ │ ├── pallet_contracts │ │ │ │ ├── api_version.dart │ │ │ │ ├── environment_type_1.dart │ │ │ │ ├── environment_type_2.dart │ │ │ │ ├── environment_type_3.dart │ │ │ │ ├── environment_type_4.dart │ │ │ │ ├── environment_type_5.dart │ │ │ │ ├── wasm │ │ │ │ │ └── determinism.dart │ │ │ │ ├── pallet │ │ │ │ │ └── hold_reason.dart │ │ │ │ └── schedule │ │ │ │ │ └── instruction_weights.dart │ │ │ ├── frame_support │ │ │ │ ├── pallet_id.dart │ │ │ │ ├── dispatch │ │ │ │ │ ├── pays.dart │ │ │ │ │ └── dispatch_class.dart │ │ │ │ └── traits │ │ │ │ │ └── tokens │ │ │ │ │ └── misc │ │ │ │ │ └── balance_status.dart │ │ │ ├── sp_consensus_grandpa │ │ │ │ └── app │ │ │ │ │ ├── public.dart │ │ │ │ │ └── signature.dart │ │ │ ├── pallet_balances │ │ │ │ └── types │ │ │ │ │ ├── extra_flags.dart │ │ │ │ │ ├── reasons.dart │ │ │ │ │ └── adjustment_direction.dart │ │ │ ├── sp_consensus_aura │ │ │ │ └── sr25519 │ │ │ │ │ └── app_sr25519 │ │ │ │ │ └── public.dart │ │ │ ├── sp_runtime │ │ │ │ ├── traits │ │ │ │ │ └── blake_two256.dart │ │ │ │ ├── generic │ │ │ │ │ └── unchecked_extrinsic │ │ │ │ │ │ └── unchecked_extrinsic.dart │ │ │ │ └── transactional_error.dart │ │ │ ├── frame_system │ │ │ │ ├── extensions │ │ │ │ │ ├── check_weight │ │ │ │ │ │ └── check_weight.dart │ │ │ │ │ ├── check_genesis │ │ │ │ │ │ └── check_genesis.dart │ │ │ │ │ ├── check_nonce │ │ │ │ │ │ └── check_nonce.dart │ │ │ │ │ ├── check_tx_version │ │ │ │ │ │ └── check_tx_version.dart │ │ │ │ │ ├── check_spec_version │ │ │ │ │ │ └── check_spec_version.dart │ │ │ │ │ ├── check_non_zero_sender │ │ │ │ │ │ └── check_non_zero_sender.dart │ │ │ │ │ └── check_mortality │ │ │ │ │ │ └── check_mortality.dart │ │ │ │ └── limits │ │ │ │ │ └── block_length.dart │ │ │ ├── pallet_transaction_payment │ │ │ │ ├── charge_transaction_payment.dart │ │ │ │ └── releases.dart │ │ │ ├── tuples.dart │ │ │ ├── tuples_1.dart │ │ │ ├── cow.dart │ │ │ ├── wetee_guild │ │ │ │ └── pallet │ │ │ │ │ └── error.dart │ │ │ ├── wetee_gov │ │ │ │ ├── opinion.dart │ │ │ │ └── prop_status.dart │ │ │ ├── pallet_sudo │ │ │ │ └── pallet │ │ │ │ │ └── error.dart │ │ │ ├── wetee_matrix │ │ │ │ └── status.dart │ │ │ ├── wetee_org │ │ │ │ └── status.dart │ │ │ ├── wetee_project │ │ │ │ ├── status.dart │ │ │ │ ├── review_opinion.dart │ │ │ │ └── task_status.dart │ │ │ ├── pallet_utility │ │ │ │ └── pallet │ │ │ │ │ └── error.dart │ │ │ ├── wetee_primitives │ │ │ │ └── types │ │ │ │ │ ├── t_e_e_version.dart │ │ │ │ │ └── work_type.dart │ │ │ ├── wetee_treasury │ │ │ │ └── pallet │ │ │ │ │ └── error.dart │ │ │ ├── wetee_tee_bridge │ │ │ │ └── t_e_e_call_type.dart │ │ │ ├── wetee_sudo │ │ │ │ └── pallet │ │ │ │ │ └── error.dart │ │ │ └── wetee_dsecret │ │ │ │ └── pallet │ │ │ │ └── error.dart │ │ └── pallets │ │ │ ├── we_t_e_e_treasury.dart │ │ │ ├── we_t_e_e_guild.dart │ │ │ └── randomness_collective_flip.dart │ │ ├── type.dart │ │ └── key_pair.dart ├── infra │ ├── pages │ │ ├── work.zip │ │ ├── opengov.zip │ │ ├── chat │ │ │ └── chat_mobile.dart │ │ ├── webrtc │ │ │ └── img_painter.dart │ │ ├── utils │ │ │ └── image_viewer │ │ │ │ └── image_viewer.dart │ │ └── setting │ │ │ └── location.dart │ └── components │ │ ├── setting │ │ ├── tiles │ │ │ ├── abstract_settings_tile.dart │ │ │ └── custom_settings_tile.dart │ │ ├── sections │ │ │ ├── abstract_settings_section.dart │ │ │ └── custom_settings_section.dart │ │ ├── settings_ui.dart │ │ └── utils │ │ │ └── platform_utils.dart │ │ ├── components.dart │ │ ├── move_window.dart │ │ ├── content │ │ ├── member.dart │ │ └── html.dart │ │ ├── dao │ │ ├── text.dart │ │ ├── member_card.dart │ │ ├── info_card.dart │ │ ├── payment_list_tile.dart │ │ └── priority_icon.dart │ │ └── name_with_emoji.dart ├── domain │ ├── models │ │ ├── models.dart │ │ ├── mentions_model.dart │ │ ├── user_message_model.dart │ │ ├── tag.dart │ │ ├── system.dart │ │ ├── block_header.dart │ │ ├── user.dart │ │ ├── app.dart │ │ ├── block_header.g.dart │ │ ├── system.g.dart │ │ ├── app.g.dart │ │ └── user.g.dart │ └── utils │ │ ├── time.dart │ │ ├── theme.dart │ │ ├── platform_infos.dart │ │ ├── matrix_sdk_extensions │ │ └── event_extension.dart │ │ └── webrtc │ │ └── voip.dart └── router.dart ├── docs ├── ui.png ├── tee.png ├── client.png ├── structure.png ├── icon-152x152.png ├── images │ ├── 20230322-223521.png │ ├── 20230322-224737.png │ ├── 20230322-225905.png │ ├── 20230322-230919.png │ ├── Screenshot from 2023-03-22 20-38-53.png │ ├── Screenshot from 2023-03-22 20-39-00.png │ ├── Screenshot from 2023-03-22 20-42-24.png │ ├── Screenshot from 2023-03-22 20-42-46.png │ ├── Screenshot from 2023-03-22 20-51-48.png │ ├── Screenshot from 2023-03-22 20-52-51.png │ ├── Screenshot from 2023-03-22 20-53-18.png │ ├── Screenshot from 2023-03-22 22-29-23.png │ ├── Screenshot from 2023-03-22 22-29-38.png │ ├── Screenshot from 2023-04-27 16-11-26.png │ ├── Screenshot from 2023-04-27 16-22-39.png │ ├── Screenshot from 2023-04-27 16-24-37.png │ ├── Screenshot from 2023-04-27 16-29-10.png │ └── Screenshot from 2023-04-27 16-32-15.png ├── local_test.md └── install_and_run.md ├── ios ├── Runner │ ├── Runner-Bridging-Header.h │ ├── Assets.xcassets │ │ ├── LaunchImage.imageset │ │ │ ├── LaunchImage.png │ │ │ ├── LaunchImage@2x.png │ │ │ ├── LaunchImage@3x.png │ │ │ ├── README.md │ │ │ └── Contents.json │ │ └── AppIcon.appiconset │ │ │ ├── Icon-App-20x20@1x.png │ │ │ ├── Icon-App-20x20@2x.png │ │ │ ├── Icon-App-20x20@3x.png │ │ │ ├── Icon-App-29x29@1x.png │ │ │ ├── Icon-App-29x29@2x.png │ │ │ ├── Icon-App-29x29@3x.png │ │ │ ├── Icon-App-40x40@1x.png │ │ │ ├── Icon-App-40x40@2x.png │ │ │ ├── Icon-App-40x40@3x.png │ │ │ ├── Icon-App-60x60@2x.png │ │ │ ├── Icon-App-60x60@3x.png │ │ │ ├── Icon-App-76x76@1x.png │ │ │ ├── Icon-App-76x76@2x.png │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ └── Icon-App-83.5x83.5@2x.png │ ├── AppDelegate.swift │ ├── Base.lproj │ │ └── Main.storyboard │ └── Info.plist ├── Flutter │ ├── Debug.xcconfig │ ├── Release.xcconfig │ └── AppFrameworkInfo.plist ├── Runner.xcodeproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ ├── WorkspaceSettings.xcsettings │ │ └── IDEWorkspaceChecks.plist ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── WorkspaceSettings.xcsettings │ │ └── IDEWorkspaceChecks.plist ├── RunnerTests │ └── RunnerTests.swift ├── .gitignore └── Podfile ├── web ├── favicon.png ├── icons │ ├── Icon-192.png │ ├── Icon-512.png │ ├── Icon-maskable-192.png │ └── Icon-maskable-512.png └── manifest.json ├── .fvm └── fvm_config.json ├── .vscode └── settings.json ├── packages.microsoft.gpg ├── android ├── gradle.properties ├── app │ └── src │ │ ├── main │ │ ├── res │ │ │ ├── mipmap-hdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── drawable │ │ │ │ └── launch_background.xml │ │ │ ├── drawable-v21 │ │ │ │ └── launch_background.xml │ │ │ ├── values │ │ │ │ └── styles.xml │ │ │ └── values-night │ │ │ │ └── styles.xml │ │ ├── jniLibs │ │ │ └── arm64-v8a │ │ │ │ └── librust_wraper.so │ │ ├── kotlin │ │ │ └── me │ │ │ │ └── asyou │ │ │ │ └── dtim │ │ │ │ └── MainActivity.kt │ │ ├── java │ │ │ └── io │ │ │ │ └── flutter │ │ │ │ └── app │ │ │ │ └── FlutterMultiDexApplication.java │ │ └── AndroidManifest.xml │ │ ├── debug │ │ └── AndroidManifest.xml │ │ └── profile │ │ └── AndroidManifest.xml ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties ├── .gitignore ├── settings.gradle └── build.gradle ├── macos ├── Runner │ ├── Configs │ │ ├── Debug.xcconfig │ │ ├── Release.xcconfig │ │ ├── Warnings.xcconfig │ │ └── AppInfo.xcconfig │ ├── Assets.xcassets │ │ └── AppIcon.appiconset │ │ │ ├── 128-mac.png │ │ │ ├── 16-mac.png │ │ │ ├── 256-mac.png │ │ │ ├── 32-mac.png │ │ │ ├── 512-mac.png │ │ │ ├── 64-mac.png │ │ │ ├── 1024-mac.png │ │ │ ├── app_icon_128.png │ │ │ ├── app_icon_16.png │ │ │ ├── app_icon_256.png │ │ │ ├── app_icon_32.png │ │ │ ├── app_icon_512.png │ │ │ ├── app_icon_64.png │ │ │ ├── app_icon_1024.png │ │ │ └── Contents.json │ ├── AppDelegate.swift │ ├── Release.entitlements │ ├── DebugProfile.entitlements │ ├── MainFlutterWindow.swift │ └── Info.plist ├── .gitignore ├── Flutter │ ├── Flutter-Debug.xcconfig │ └── Flutter-Release.xcconfig ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── Runner.xcodeproj │ └── project.xcworkspace │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── RunnerTests │ └── RunnerTests.swift └── Podfile ├── windows ├── runner │ ├── resources │ │ └── app_icon.ico │ ├── resource.h │ ├── utils.h │ ├── runner.exe.manifest │ ├── flutter_window.h │ └── main.cpp ├── .gitignore └── flutter │ ├── generated_plugin_registrant.h │ └── generated_plugins.cmake ├── l10n.yaml ├── iconfont.yaml ├── hacks ├── icon_build.sh ├── chain_gen.sh ├── base_build.sh ├── build_web.sh └── build_macos.sh ├── .github └── workflows │ ├── lib_build.yml │ ├── build.yaml │ └── release_windows.yaml ├── test ├── time_test.dart ├── platform_infos_test.dart ├── model_bar_test.dart ├── app_bar_test.dart ├── close_bar_test.dart ├── avatar_test.dart ├── name_with_emoji_test.dart ├── hover_list_item.dart ├── identicon_test.dart ├── functions_test.dart ├── popup_test.dart ├── widget_test.dart ├── user_avatar_test.dart └── loading_test.dart ├── .gitignore ├── .metadata ├── integration_test ├── extensions │ └── wait_for.dart └── base.dart └── analysis_options.yaml /assets/icons/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /linux/.gitignore: -------------------------------------------------------------------------------- 1 | flutter/ephemeral 2 | -------------------------------------------------------------------------------- /lib/application/service/apis/navs.dart: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /docs/ui.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wetee-dao/DTIM/HEAD/docs/ui.png -------------------------------------------------------------------------------- /docs/tee.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wetee-dao/DTIM/HEAD/docs/tee.png -------------------------------------------------------------------------------- /ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /docs/client.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wetee-dao/DTIM/HEAD/docs/client.png -------------------------------------------------------------------------------- /web/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wetee-dao/DTIM/HEAD/web/favicon.png -------------------------------------------------------------------------------- /.fvm/fvm_config.json: -------------------------------------------------------------------------------- 1 | { 2 | "flutterSdkVersion": "3.10.2", 3 | "flavors": {} 4 | } -------------------------------------------------------------------------------- /docs/structure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wetee-dao/DTIM/HEAD/docs/structure.png -------------------------------------------------------------------------------- /docs/icon-152x152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wetee-dao/DTIM/HEAD/docs/icon-152x152.png -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "editor.wordWrapColumn": 120, 3 | "dart.lineLength": 120 4 | } -------------------------------------------------------------------------------- /lib/infra/pages/work.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wetee-dao/DTIM/HEAD/lib/infra/pages/work.zip -------------------------------------------------------------------------------- /packages.microsoft.gpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wetee-dao/DTIM/HEAD/packages.microsoft.gpg -------------------------------------------------------------------------------- /web/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wetee-dao/DTIM/HEAD/web/icons/Icon-192.png -------------------------------------------------------------------------------- /web/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wetee-dao/DTIM/HEAD/web/icons/Icon-512.png -------------------------------------------------------------------------------- /assets/fonts/iconfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wetee-dao/DTIM/HEAD/assets/fonts/iconfont.ttf -------------------------------------------------------------------------------- /assets/images/top_bar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wetee-dao/DTIM/HEAD/assets/images/top_bar.png -------------------------------------------------------------------------------- /assets/fonts/DatDot-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wetee-dao/DTIM/HEAD/assets/fonts/DatDot-Light.ttf -------------------------------------------------------------------------------- /lib/infra/pages/opengov.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wetee-dao/DTIM/HEAD/lib/infra/pages/opengov.zip -------------------------------------------------------------------------------- /assets/images/top_bar_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wetee-dao/DTIM/HEAD/assets/images/top_bar_dark.png -------------------------------------------------------------------------------- /docs/images/20230322-223521.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wetee-dao/DTIM/HEAD/docs/images/20230322-223521.png -------------------------------------------------------------------------------- /docs/images/20230322-224737.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wetee-dao/DTIM/HEAD/docs/images/20230322-224737.png -------------------------------------------------------------------------------- /docs/images/20230322-225905.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wetee-dao/DTIM/HEAD/docs/images/20230322-225905.png -------------------------------------------------------------------------------- /docs/images/20230322-230919.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wetee-dao/DTIM/HEAD/docs/images/20230322-230919.png -------------------------------------------------------------------------------- /web/icons/Icon-maskable-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wetee-dao/DTIM/HEAD/web/icons/Icon-maskable-192.png -------------------------------------------------------------------------------- /web/icons/Icon-maskable-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wetee-dao/DTIM/HEAD/web/icons/Icon-maskable-512.png -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /macos/Runner/Configs/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Debug.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /macos/Runner/Configs/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Release.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /windows/runner/resources/app_icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wetee-dao/DTIM/HEAD/windows/runner/resources/app_icon.ico -------------------------------------------------------------------------------- /macos/.gitignore: -------------------------------------------------------------------------------- 1 | # Flutter-related 2 | **/Flutter/ephemeral/ 3 | **/Pods/ 4 | 5 | # Xcode-related 6 | **/dgph 7 | **/xcuserdata/ 8 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /docs/images/Screenshot from 2023-03-22 20-38-53.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wetee-dao/DTIM/HEAD/docs/images/Screenshot from 2023-03-22 20-38-53.png -------------------------------------------------------------------------------- /docs/images/Screenshot from 2023-03-22 20-39-00.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wetee-dao/DTIM/HEAD/docs/images/Screenshot from 2023-03-22 20-39-00.png -------------------------------------------------------------------------------- /docs/images/Screenshot from 2023-03-22 20-42-24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wetee-dao/DTIM/HEAD/docs/images/Screenshot from 2023-03-22 20-42-24.png -------------------------------------------------------------------------------- /docs/images/Screenshot from 2023-03-22 20-42-46.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wetee-dao/DTIM/HEAD/docs/images/Screenshot from 2023-03-22 20-42-46.png -------------------------------------------------------------------------------- /docs/images/Screenshot from 2023-03-22 20-51-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wetee-dao/DTIM/HEAD/docs/images/Screenshot from 2023-03-22 20-51-48.png -------------------------------------------------------------------------------- /docs/images/Screenshot from 2023-03-22 20-52-51.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wetee-dao/DTIM/HEAD/docs/images/Screenshot from 2023-03-22 20-52-51.png -------------------------------------------------------------------------------- /docs/images/Screenshot from 2023-03-22 20-53-18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wetee-dao/DTIM/HEAD/docs/images/Screenshot from 2023-03-22 20-53-18.png -------------------------------------------------------------------------------- /docs/images/Screenshot from 2023-03-22 22-29-23.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wetee-dao/DTIM/HEAD/docs/images/Screenshot from 2023-03-22 22-29-23.png -------------------------------------------------------------------------------- /docs/images/Screenshot from 2023-03-22 22-29-38.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wetee-dao/DTIM/HEAD/docs/images/Screenshot from 2023-03-22 22-29-38.png -------------------------------------------------------------------------------- /docs/images/Screenshot from 2023-04-27 16-11-26.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wetee-dao/DTIM/HEAD/docs/images/Screenshot from 2023-04-27 16-11-26.png -------------------------------------------------------------------------------- /docs/images/Screenshot from 2023-04-27 16-22-39.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wetee-dao/DTIM/HEAD/docs/images/Screenshot from 2023-04-27 16-22-39.png -------------------------------------------------------------------------------- /docs/images/Screenshot from 2023-04-27 16-24-37.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wetee-dao/DTIM/HEAD/docs/images/Screenshot from 2023-04-27 16-24-37.png -------------------------------------------------------------------------------- /docs/images/Screenshot from 2023-04-27 16-29-10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wetee-dao/DTIM/HEAD/docs/images/Screenshot from 2023-04-27 16-29-10.png -------------------------------------------------------------------------------- /docs/images/Screenshot from 2023-04-27 16-32-15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wetee-dao/DTIM/HEAD/docs/images/Screenshot from 2023-04-27 16-32-15.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wetee-dao/DTIM/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wetee-dao/DTIM/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wetee-dao/DTIM/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wetee-dao/DTIM/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /lib/application/service/apis/apis.dart: -------------------------------------------------------------------------------- 1 | export 'account_api.dart'; 2 | export 'system_api.dart'; 3 | export 'account_org_api.dart'; 4 | export 'navs.dart'; 5 | -------------------------------------------------------------------------------- /android/app/src/main/jniLibs/arm64-v8a/librust_wraper.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wetee-dao/DTIM/HEAD/android/app/src/main/jniLibs/arm64-v8a/librust_wraper.so -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wetee-dao/DTIM/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/128-mac.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wetee-dao/DTIM/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/128-mac.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/16-mac.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wetee-dao/DTIM/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/16-mac.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/256-mac.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wetee-dao/DTIM/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/256-mac.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/32-mac.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wetee-dao/DTIM/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/32-mac.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/512-mac.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wetee-dao/DTIM/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/512-mac.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/64-mac.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wetee-dao/DTIM/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/64-mac.png -------------------------------------------------------------------------------- /l10n.yaml: -------------------------------------------------------------------------------- 1 | arb-dir: assets/l10n 2 | template-arb-file: app_en.arb 3 | output-localization-file: l10n.dart 4 | output-class: L10n 5 | preferred-supported-locales: ["en"] 6 | -------------------------------------------------------------------------------- /macos/Flutter/Flutter-Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "ephemeral/Flutter-Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /macos/Flutter/Flutter-Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "ephemeral/Flutter-Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/1024-mac.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wetee-dao/DTIM/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/1024-mac.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wetee-dao/DTIM/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wetee-dao/DTIM/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wetee-dao/DTIM/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wetee-dao/DTIM/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wetee-dao/DTIM/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wetee-dao/DTIM/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wetee-dao/DTIM/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wetee-dao/DTIM/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wetee-dao/DTIM/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /lib/domain/models/models.dart: -------------------------------------------------------------------------------- 1 | export 'account.dart'; 2 | export 'org.dart'; 3 | export 'user.dart'; 4 | export 'system.dart'; 5 | export 'tag.dart'; 6 | export 'block_header.dart'; -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wetee-dao/DTIM/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wetee-dao/DTIM/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wetee-dao/DTIM/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wetee-dao/DTIM/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wetee-dao/DTIM/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wetee-dao/DTIM/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wetee-dao/DTIM/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wetee-dao/DTIM/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wetee-dao/DTIM/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wetee-dao/DTIM/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wetee-dao/DTIM/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wetee-dao/DTIM/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wetee-dao/DTIM/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wetee-dao/DTIM/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wetee-dao/DTIM/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wetee-dao/DTIM/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /android/app/src/main/kotlin/me/asyou/dtim/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package me.asyou.dtim 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /linux/main.cc: -------------------------------------------------------------------------------- 1 | #include "my_application.h" 2 | 3 | int main(int argc, char** argv) { 4 | g_autoptr(MyApplication) app = my_application_new(); 5 | return g_application_run(G_APPLICATION(app), argc, argv); 6 | } 7 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /iconfont.yaml: -------------------------------------------------------------------------------- 1 | # iconfont.yaml 2 | - icons: 3 | - url: //at.alicdn.com/t/c/font_3991708_qg1gfj5ykg.css 4 | icon_name: iconfont 5 | icon_class: AppIcons 6 | font_assets_path: assets/fonts/ 7 | icon_class_path: lib/infra/components/ 8 | -------------------------------------------------------------------------------- /lib/infra/components/setting/tiles/abstract_settings_tile.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | abstract class AbstractSettingsTile extends StatelessWidget { 4 | const AbstractSettingsTile({Key? key}) : super(key: key); 5 | } 6 | -------------------------------------------------------------------------------- /lib/domain/models/mentions_model.dart: -------------------------------------------------------------------------------- 1 | import 'user.dart'; 2 | 3 | class MentionModel { 4 | User user; 5 | String? emoji; 6 | String message; 7 | 8 | MentionModel({required this.user, this.emoji, required this.message}); 9 | } 10 | -------------------------------------------------------------------------------- /lib/infra/components/setting/sections/abstract_settings_section.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | abstract class AbstractSettingsSection extends StatelessWidget { 4 | const AbstractSettingsSection({Key? key}) : super(key: key); 5 | } 6 | -------------------------------------------------------------------------------- /lib/domain/utils/time.dart: -------------------------------------------------------------------------------- 1 | import 'package:date_format/date_format.dart'; 2 | 3 | String getTime(DateTime t) { 4 | return formatDate(t, [HH, ':', nn]); 5 | } 6 | 7 | String getDay(DateTime t) { 8 | return formatDate(t, [yyyy, '-', mm, "-", dd]); 9 | } 10 | -------------------------------------------------------------------------------- /macos/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | 4 | @NSApplicationMain 5 | class AppDelegate: FlutterAppDelegate { 6 | override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { 7 | return true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /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.4-all.zip 7 | -------------------------------------------------------------------------------- /macos/Runner/Release.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /lib/domain/models/user_message_model.dart: -------------------------------------------------------------------------------- 1 | class UserMessageModel { 2 | String? message; 3 | String? imgSrc; 4 | String timeAgo; 5 | String? addUser; 6 | 7 | UserMessageModel({ 8 | this.message, 9 | this.imgSrc, 10 | required this.timeAgo, 11 | this.addUser, 12 | }); 13 | } 14 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /macos/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 | -------------------------------------------------------------------------------- /lib/domain/models/tag.dart: -------------------------------------------------------------------------------- 1 | final tags = [Tag("DAPP", 1), Tag("TEE", 2), Tag("Pallet", 3)]; 2 | 3 | class Tag { 4 | final int value; 5 | final String label; 6 | 7 | Tag(this.label, this.value); 8 | } 9 | 10 | Tag findTag(int value) { 11 | return tags.firstWhere((element) => element.value == value); 12 | } 13 | -------------------------------------------------------------------------------- /macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /lib/infra/components/components.dart: -------------------------------------------------------------------------------- 1 | export 'app_bar.dart'; 2 | export 'move_window.dart'; 3 | export 'direct_chat.dart'; 4 | export 'avatar.dart'; 5 | export 'org_card.dart'; 6 | export 'model_bar.dart'; 7 | export 'loading_dialog.dart'; 8 | export 'iconfont.dart'; 9 | export 'me_pop.dart'; 10 | export 'search_bar.dart'; 11 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /ios/RunnerTests/RunnerTests.swift: -------------------------------------------------------------------------------- 1 | import Flutter 2 | import UIKit 3 | import XCTest 4 | 5 | class RunnerTests: XCTestCase { 6 | 7 | func testExample() { 8 | // If you add code to the Runner application, consider adding tests here. 9 | // See https://developer.apple.com/documentation/xctest for more information about using XCTest. 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /macos/RunnerTests/RunnerTests.swift: -------------------------------------------------------------------------------- 1 | import FlutterMacOS 2 | import Cocoa 3 | import XCTest 4 | 5 | class RunnerTests: XCTestCase { 6 | 7 | func testExample() { 8 | // If you add code to the Runner application, consider adding tests here. 9 | // See https://developer.apple.com/documentation/xctest for more information about using XCTest. 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /hacks/icon_build.sh: -------------------------------------------------------------------------------- 1 | # get shell path 2 | SOURCE="$0" 3 | while [ -h "$SOURCE" ]; do 4 | DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" 5 | SOURCE="$(readlink "$SOURCE")" 6 | [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" 7 | done 8 | DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" 9 | cd "$DIR/../" 10 | 11 | flutter packages pub run iconfont_convert -c iconfont.yaml -------------------------------------------------------------------------------- /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. -------------------------------------------------------------------------------- /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 | shared/rust_wraper.dll -------------------------------------------------------------------------------- /linux/flutter/generated_plugin_registrant.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #ifndef GENERATED_PLUGIN_REGISTRANT_ 8 | #define GENERATED_PLUGIN_REGISTRANT_ 9 | 10 | #include 11 | 12 | // Registers Flutter plugins. 13 | void fl_register_plugins(FlPluginRegistry* registry); 14 | 15 | #endif // GENERATED_PLUGIN_REGISTRANT_ 16 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /.github/workflows/lib_build.yml: -------------------------------------------------------------------------------- 1 | # This workflow uses actions that are not certified by GitHub. 2 | # They are provided by a third-party and are governed by 3 | # separate terms of service, privacy policy, and support 4 | # documentation. 5 | 6 | name: lib_build 7 | 8 | on: 9 | push: 10 | branches: [ "release" ] 11 | # paths: 12 | # - 'rust_wraper' 13 | pull_request: 14 | branches: [ "main" ] -------------------------------------------------------------------------------- /macos/Runner/DebugProfile.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.cs.allow-jit 8 | 9 | com.apple.security.network.server 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /hacks/chain_gen.sh: -------------------------------------------------------------------------------- 1 | # get shell path 2 | SOURCE="$0" 3 | while [ -h "$SOURCE" ]; do 4 | DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" 5 | SOURCE="$(readlink "$SOURCE")" 6 | [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" 7 | done 8 | DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" 9 | CRATE="$DIR/../rust_wraper" 10 | 11 | echo "RUST项目根目录 => $CRATE" 12 | cd "$DIR/../" 13 | 14 | 15 | flutter pub run polkadart_cli:generate -v -------------------------------------------------------------------------------- /lib/infra/components/setting/tiles/custom_settings_tile.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'abstract_settings_tile.dart'; 3 | 4 | class CustomSettingsTile extends AbstractSettingsTile { 5 | const CustomSettingsTile({ 6 | required this.child, 7 | Key? key, 8 | }) : super(key: key); 9 | 10 | final Widget child; 11 | 12 | @override 13 | Widget build(BuildContext context) { 14 | return child; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /lib/infra/components/setting/sections/custom_settings_section.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'abstract_settings_section.dart'; 3 | 4 | class CustomSettingsSection extends AbstractSettingsSection { 5 | const CustomSettingsSection({ 6 | required this.child, 7 | Key? key, 8 | }) : super(key: key); 9 | 10 | final Widget child; 11 | 12 | @override 13 | Widget build(BuildContext context) { 14 | return child; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /linux/my_application.h: -------------------------------------------------------------------------------- 1 | #ifndef FLUTTER_MY_APPLICATION_H_ 2 | #define FLUTTER_MY_APPLICATION_H_ 3 | 4 | #include 5 | 6 | G_DECLARE_FINAL_TYPE(MyApplication, my_application, MY, APPLICATION, 7 | GtkApplication) 8 | 9 | /** 10 | * my_application_new: 11 | * 12 | * Creates a new Flutter-based application. 13 | * 14 | * Returns: a new #MyApplication. 15 | */ 16 | MyApplication* my_application_new(); 17 | 18 | #endif // FLUTTER_MY_APPLICATION_H_ 19 | -------------------------------------------------------------------------------- /macos/Runner/MainFlutterWindow.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | 4 | class MainFlutterWindow: NSWindow { 5 | override func awakeFromNib() { 6 | let flutterViewController = FlutterViewController() 7 | let windowFrame = self.frame 8 | self.contentViewController = flutterViewController 9 | self.setFrame(windowFrame, display: true) 10 | 11 | RegisterGeneratedPlugins(registry: flutterViewController) 12 | 13 | super.awakeFromNib() 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /test/time_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_test/flutter_test.dart'; 2 | 3 | import 'package:dtim/domain/utils/time.dart'; 4 | 5 | void main() { 6 | test("test getTime", () { 7 | expect(getTime(DateTime(2021, 1, 1, 1, 1)), "01:01"); 8 | expect(getTime(DateTime(2021, 1, 1, 12, 12)), "12:12"); 9 | expect(getTime(DateTime(2021, 1, 1, 23, 59)), "23:59"); 10 | }); 11 | 12 | test("test getDay", () { 13 | expect(getDay(DateTime(2021, 1, 1, 1, 1)), "2021-01-01"); 14 | }); 15 | } 16 | -------------------------------------------------------------------------------- /lib/domain/models/system.dart: -------------------------------------------------------------------------------- 1 | 2 | import 'package:hive/hive.dart'; 3 | 4 | part 'system.g.dart'; 5 | 6 | @HiveType(typeId: 6) 7 | class System { 8 | // 宽度 9 | @HiveField(1) 10 | late double width; 11 | 12 | // 高度 13 | @HiveField(2) 14 | late double height; 15 | 16 | // 主题 17 | @HiveField(3) 18 | late String theme; 19 | 20 | // 登录账号 21 | @HiveField(4) 22 | String? loginAccount = ''; 23 | 24 | System({ required this.width, required this.height, required this.theme}); 25 | } 26 | -------------------------------------------------------------------------------- /hacks/base_build.sh: -------------------------------------------------------------------------------- 1 | # get shell path 2 | SOURCE="$0" 3 | while [ -h "$SOURCE" ]; do 4 | DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" 5 | SOURCE="$(readlink "$SOURCE")" 6 | [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" 7 | done 8 | DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" 9 | 10 | flutter pub run build_runner build --delete-conflicting-outputs 11 | 12 | # rm ./lib/components/appicon.dart 13 | # iconfont_builder --from ./assets/fonts --to ./lib/components/appicon.dart --class Appicon -------------------------------------------------------------------------------- /lib/domain/models/block_header.dart: -------------------------------------------------------------------------------- 1 | import 'package:json_annotation/json_annotation.dart'; 2 | part 'block_header.g.dart'; 3 | 4 | @JsonSerializable() 5 | class BlockHeader { 6 | int? blockNumber; 7 | final String parentHash; 8 | final String number; 9 | BlockHeader( 10 | this.parentHash, 11 | this.number, 12 | ); 13 | 14 | factory BlockHeader.fromJson(Map json) => _$BlockHeaderFromJson(json); 15 | 16 | Map toJson() => _$BlockHeaderToJson(this); 17 | } 18 | -------------------------------------------------------------------------------- /windows/runner/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by Runner.rc 4 | // 5 | #define IDI_APP_ICON 101 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 102 12 | #define _APS_NEXT_COMMAND_VALUE 40001 13 | #define _APS_NEXT_CONTROL_VALUE 1001 14 | #define _APS_NEXT_SYMED_VALUE 101 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /docs/local_test.md: -------------------------------------------------------------------------------- 1 | ### Initialize the local test environment 2 | 3 | - Step1 run chain in docker 4 | ``` 5 | $ docker run -d -p 3994:9944 wetee/dao-entrance-node:dev.2023-04-25-21_41 6 | ``` 7 | 8 | - Step2 init DAO DATA 9 | ``` 10 | $ flutter run hacks/init_dao.dart 11 | 12 | $ sh hack/init_linux.sh 13 | ``` 14 | 15 | - Step3 run e2e Test 16 | > During this process, the script will send enough TOKENs for testing to the new account. 17 | ``` 18 | flutter test integration_test/dao_test.dart 19 | ``` -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /lib/infra/components/setting/settings_ui.dart: -------------------------------------------------------------------------------- 1 | library settings_ui; 2 | 3 | export 'list/settings_list.dart'; 4 | export 'sections/custom_settings_section.dart'; 5 | export 'sections/settings_section.dart'; 6 | export 'sections/abstract_settings_section.dart'; 7 | export 'tiles/custom_settings_tile.dart'; 8 | export 'tiles/abstract_settings_tile.dart'; 9 | // export 'tiles/settings_tile.dart'; 10 | export 'utils/platform_utils.dart'; 11 | export 'tiles/theme_tile.dart'; 12 | export 'tiles/slelect_tile.dart'; 13 | export 'tiles/switch_tile.dart'; 14 | -------------------------------------------------------------------------------- /lib/router.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | export 'package:dtim/infra/router/pop_router.dart'; 4 | 5 | // 是否是测试环境 6 | bool runInTest = false; 7 | 8 | // NavigatorKey 9 | GlobalKey? rootNavigatorKey; 10 | 11 | // 设置全局的NavigatorState 12 | setGlobalKey(GlobalKey key) { 13 | rootNavigatorKey = key; 14 | } 15 | 16 | // 全局的BuildContext 17 | BuildContext globalCtx() { 18 | return rootNavigatorKey!.currentContext!; 19 | } 20 | 21 | // 全局的NavigatorState 22 | NavigatorState globalState() { 23 | return rootNavigatorKey!.currentState!; 24 | } 25 | -------------------------------------------------------------------------------- /lib/application/store/app/webrtc.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_bloc/flutter_bloc.dart'; 2 | import 'package:freezed_annotation/freezed_annotation.dart'; 3 | 4 | part 'webrtc.freezed.dart'; 5 | 6 | @freezed 7 | class WebRTCState with _$WebRTCState { 8 | const factory WebRTCState({ 9 | @Default(0) int lastSyncTime, 10 | }) = _WebRTCState; 11 | } 12 | 13 | 14 | class WebRTCCubit extends Cubit { 15 | WebRTCCubit({state = const WebRTCState()}) : super(state); 16 | 17 | update(){ 18 | emit(state.copyWith(lastSyncTime: DateTime.now().millisecondsSinceEpoch)); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /lib/domain/utils/theme.dart: -------------------------------------------------------------------------------- 1 | import 'package:adaptive_theme/adaptive_theme.dart'; 2 | import 'package:dtim/application/store/theme.dart'; 3 | import 'package:dtim/router.dart'; 4 | 5 | loadThemeFromOrg(org) async { 6 | // 设置全局设置 7 | if (org.theme != null && org.theme!.isNotEmpty) { 8 | print("loadThemeFromOrg ${org.theme}"); 9 | final t = await setTheme(org.theme!); 10 | AdaptiveTheme.of(globalCtx()).setTheme( 11 | light: t, 12 | ); 13 | } else { 14 | final t = getDefaultTheme(); 15 | AdaptiveTheme.of(globalCtx()).setTheme( 16 | light: t, 17 | ); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /lib/domain/models/user.dart: -------------------------------------------------------------------------------- 1 | import 'package:hive/hive.dart'; 2 | 3 | import 'account.dart'; 4 | 5 | part 'user.g.dart'; 6 | 7 | @HiveType(typeId: 7) 8 | class User { 9 | // 用户地址 10 | @HiveField(1) 11 | late String name; 12 | 13 | // 用户地址 14 | @HiveField(2) 15 | late String address; 16 | 17 | // 团队授权网址,数据须常从区块链获取 18 | @HiveField(3) 19 | late String domain; 20 | 21 | // 用户状态 -1=》 未加好友 1=》好友 2=》特别关注 3=》删除 4=》加入黑名单 22 | @HiveField(4) 23 | late int status; 24 | 25 | // 头像 26 | @HiveField(5) 27 | String? avatar; 28 | 29 | // 所属用户 30 | @HiveField(6) 31 | late final Account account; 32 | } 33 | -------------------------------------------------------------------------------- /test/platform_infos_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/foundation.dart'; 2 | import 'package:flutter_test/flutter_test.dart'; 3 | 4 | import 'package:dtim/domain/utils/platform_infos.dart'; 5 | 6 | void main() { 7 | test("test PlatformInfos", () { 8 | expect(PlatformInfos.isAndroid, PlatformInfos.isAndroid); 9 | expect(PlatformInfos.isIOS, PlatformInfos.isIOS); 10 | expect(PlatformInfos.isWeb, kIsWeb); 11 | expect(PlatformInfos.isMacOS, PlatformInfos.isMacOS); 12 | expect(PlatformInfos.isWindows, PlatformInfos.isWindows); 13 | expect(PlatformInfos.isLinux, PlatformInfos.isLinux); 14 | }); 15 | } 16 | -------------------------------------------------------------------------------- /test/model_bar_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:dtim/application/store/theme.dart'; 2 | import 'package:dtim/domain/utils/screen/screen.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:flutter_test/flutter_test.dart'; 5 | 6 | import 'package:dtim/infra/components/model_bar.dart'; 7 | 8 | void main() { 9 | testWidgets("test ModelBar", (WidgetTester tester) async { 10 | initScreen(1200); 11 | 12 | await tester.pumpWidget(MaterialApp(theme: getDefaultTheme(), home: Scaffold(appBar: ModelBar(title: "Test")))); 13 | await tester.pumpAndSettle(); 14 | expect(find.text("Test"), findsOneWidget); 15 | }); 16 | } 17 | -------------------------------------------------------------------------------- /test/app_bar_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:dtim/application/store/theme.dart'; 2 | import 'package:dtim/domain/utils/screen/screen.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:flutter_test/flutter_test.dart'; 5 | 6 | import 'package:dtim/infra/components/app_bar.dart'; 7 | 8 | void main() { 9 | testWidgets("test LocalAppBar", (WidgetTester tester) async { 10 | initScreen(1200); 11 | 12 | await tester.pumpWidget(MaterialApp(theme: getDefaultTheme(), home: Scaffold(appBar: LocalAppBar(title: "Test")))); 13 | await tester.pumpAndSettle(); 14 | expect(find.text("Test"), findsOneWidget); 15 | }); 16 | } 17 | -------------------------------------------------------------------------------- /macos/Runner/Configs/Warnings.xcconfig: -------------------------------------------------------------------------------- 1 | WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings 2 | GCC_WARN_UNDECLARED_SELECTOR = YES 3 | CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES 4 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE 5 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES 6 | CLANG_WARN_PRAGMA_PACK = YES 7 | CLANG_WARN_STRICT_PROTOTYPES = YES 8 | CLANG_WARN_COMMA = YES 9 | GCC_WARN_STRICT_SELECTOR_MATCH = YES 10 | CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES 11 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES 12 | GCC_WARN_SHADOW = YES 13 | CLANG_WARN_UNREACHABLE_CODE = YES 14 | -------------------------------------------------------------------------------- /macos/Runner/Configs/AppInfo.xcconfig: -------------------------------------------------------------------------------- 1 | // Application-level settings for the Runner target. 2 | // 3 | // This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the 4 | // future. If not, the values below would default to using the project name when this becomes a 5 | // 'flutter create' template. 6 | 7 | // The application's name. By default this is also the title of the Flutter window. 8 | PRODUCT_NAME = dtim 9 | 10 | // The application's bundle identifier 11 | PRODUCT_BUNDLE_IDENTIFIER = me.asyou.dtim 12 | 13 | // The copyright displayed in application information 14 | PRODUCT_COPYRIGHT = Copyright © 2024 me.asyou. All rights reserved. 15 | -------------------------------------------------------------------------------- /lib/application/store/app/org.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_bloc/flutter_bloc.dart'; 2 | import 'package:freezed_annotation/freezed_annotation.dart'; 3 | 4 | part 'org.freezed.dart'; 5 | 6 | @freezed 7 | class OrgState with _$OrgState { 8 | const factory OrgState({ 9 | @Default("") String channelId, 10 | @Default(0) int lastSyncTime, 11 | }) = _OrgState; 12 | } 13 | 14 | class OrgCubit extends Cubit { 15 | OrgCubit({state = const OrgState()}) : super(state); 16 | 17 | // 设置当前账户 18 | setChannelId(String id) { 19 | emit(state.copyWith(channelId: id)); 20 | } 21 | 22 | update() { 23 | emit(state.copyWith(lastSyncTime: DateTime.now().millisecondsSinceEpoch)); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /lib/application/chain/wetee/wetee_gen/types/sp_core/void.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: no_leading_underscores_for_library_prefixes 2 | import 'package:polkadart/scale_codec.dart' as _i1; 3 | 4 | typedef Void = dynamic; 5 | 6 | class VoidCodec with _i1.Codec { 7 | const VoidCodec(); 8 | 9 | @override 10 | Void decode(_i1.Input input) { 11 | return _i1.NullCodec.codec.decode(input); 12 | } 13 | 14 | @override 15 | void encodeTo( 16 | Void value, 17 | _i1.Output output, 18 | ) { 19 | _i1.NullCodec.codec.encodeTo( 20 | value, 21 | output, 22 | ); 23 | } 24 | 25 | @override 26 | int sizeHint(Void value) { 27 | return _i1.NullCodec.codec.sizeHint(value); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /lib/domain/models/app.dart: -------------------------------------------------------------------------------- 1 | import 'package:hive/hive.dart'; 2 | 3 | part 'app.g.dart'; 4 | 5 | @HiveType(typeId: 5) 6 | class App { 7 | // 应用hash 8 | @HiveField(2) 9 | String hash = ""; 10 | 11 | // 应用类型 12 | // 0 => web3 13 | // 1 => web2 14 | // 2 => tee 15 | @HiveField(3) 16 | int type = 0; 17 | 18 | // 应用地址 19 | @HiveField(4) 20 | String? url; 21 | 22 | // 应用名 23 | @HiveField(5) 24 | String? name; 25 | 26 | // 应用 27 | @HiveField(6) 28 | String? desc; 29 | 30 | // 应用图标 31 | @HiveField(8) 32 | String? icon; 33 | 34 | App({ 35 | required this.hash, 36 | required this.type, 37 | this.url, 38 | this.name, 39 | this.desc, 40 | this.icon, 41 | }); 42 | } -------------------------------------------------------------------------------- /test/close_bar_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:dtim/application/store/theme.dart'; 2 | import 'package:dtim/domain/utils/screen/screen.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:flutter_test/flutter_test.dart'; 5 | 6 | import 'package:dtim/infra/components/close_bar.dart'; 7 | 8 | void main() { 9 | testWidgets("test CloseBar", (WidgetTester tester) async { 10 | initScreen(1200); 11 | await tester.pumpWidget( 12 | MaterialApp( 13 | theme: getDefaultTheme(), 14 | home: const CloseBar( 15 | child: Text("Test"), 16 | ), 17 | ), 18 | ); 19 | await tester.pumpAndSettle(); 20 | expect(find.text("Test"), findsOneWidget); 21 | }); 22 | } 23 | -------------------------------------------------------------------------------- /ios/.gitignore: -------------------------------------------------------------------------------- 1 | **/dgph 2 | *.mode1v3 3 | *.mode2v3 4 | *.moved-aside 5 | *.pbxuser 6 | *.perspectivev3 7 | **/*sync/ 8 | .sconsign.dblite 9 | .tags* 10 | **/.vagrant/ 11 | **/DerivedData/ 12 | Icon? 13 | **/Pods/ 14 | **/.symlinks/ 15 | profile 16 | xcuserdata 17 | **/.generated/ 18 | Flutter/App.framework 19 | Flutter/Flutter.framework 20 | Flutter/Flutter.podspec 21 | Flutter/Generated.xcconfig 22 | Flutter/ephemeral/ 23 | Flutter/app.flx 24 | Flutter/app.zip 25 | Flutter/flutter_assets/ 26 | Flutter/flutter_export_environment.sh 27 | ServiceDefinitions.json 28 | Runner/GeneratedPluginRegistrant.* 29 | 30 | # Exceptions to above rules. 31 | !default.mode1v3 32 | !default.mode2v3 33 | !default.pbxuser 34 | !default.perspectivev3 35 | -------------------------------------------------------------------------------- /lib/application/chain/wetee/wetee_gen/pallets/we_t_e_e_treasury.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: no_leading_underscores_for_library_prefixes 2 | import '../types/sp_core/crypto/account_id32.dart' as _i2; 3 | import '../types/wetee_runtime/runtime_call.dart' as _i1; 4 | import '../types/wetee_treasury/pallet/call.dart' as _i3; 5 | 6 | class Txs { 7 | const Txs(); 8 | 9 | _i1.RuntimeCall spend({ 10 | required BigInt daoId, 11 | required _i2.AccountId32 beneficiary, 12 | required BigInt amount, 13 | }) { 14 | final _call = _i3.Call.values.spend( 15 | daoId: daoId, 16 | beneficiary: beneficiary, 17 | amount: amount, 18 | ); 19 | return _i1.RuntimeCall.values.weTEETreasury(_call); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /lib/application/chain/wetee/wetee_gen/types/sp_consensus_slots/slot.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: no_leading_underscores_for_library_prefixes 2 | import 'package:polkadart/scale_codec.dart' as _i1; 3 | 4 | typedef Slot = BigInt; 5 | 6 | class SlotCodec with _i1.Codec { 7 | const SlotCodec(); 8 | 9 | @override 10 | Slot decode(_i1.Input input) { 11 | return _i1.U64Codec.codec.decode(input); 12 | } 13 | 14 | @override 15 | void encodeTo( 16 | Slot value, 17 | _i1.Output output, 18 | ) { 19 | _i1.U64Codec.codec.encodeTo( 20 | value, 21 | output, 22 | ); 23 | } 24 | 25 | @override 26 | int sizeHint(Slot value) { 27 | return _i1.U64Codec.codec.sizeHint(value); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.6.10' 3 | repositories { 4 | google() 5 | mavenCentral() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:7.1.2' 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 | task clean(type: Delete) { 30 | delete rootProject.buildDir 31 | } 32 | -------------------------------------------------------------------------------- /lib/infra/pages/chat/chat_mobile.dart: -------------------------------------------------------------------------------- 1 | import 'package:auto_route/auto_route.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | import 'chat_view.dart'; 5 | 6 | @RoutePage(name: "orgMobileRoute") 7 | class OrgMobilePage extends StatefulWidget { 8 | const OrgMobilePage({Key? key}) : super(key: key); 9 | 10 | @override 11 | State createState() => _OrgMobilePageState(); 12 | } 13 | 14 | class _OrgMobilePageState extends State { 15 | @override 16 | void dispose() { 17 | super.dispose(); 18 | } 19 | 20 | @override 21 | Widget build(BuildContext context) { 22 | double q = MediaQuery.of(context).size.width; 23 | return OrgViewPage(key: const Key("OrgViewPage"), width: q); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /lib/application/chain/wetee/wetee_gen/types/wetee_runtime/runtime.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: no_leading_underscores_for_library_prefixes 2 | import 'package:polkadart/scale_codec.dart' as _i1; 3 | 4 | typedef Runtime = dynamic; 5 | 6 | class RuntimeCodec with _i1.Codec { 7 | const RuntimeCodec(); 8 | 9 | @override 10 | Runtime decode(_i1.Input input) { 11 | return _i1.NullCodec.codec.decode(input); 12 | } 13 | 14 | @override 15 | void encodeTo( 16 | Runtime value, 17 | _i1.Output output, 18 | ) { 19 | _i1.NullCodec.codec.encodeTo( 20 | value, 21 | output, 22 | ); 23 | } 24 | 25 | @override 26 | int sizeHint(Runtime value) { 27 | return _i1.NullCodec.codec.sizeHint(value); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /lib/application/chain/wetee/wetee_gen/types/primitive_types/h256.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: no_leading_underscores_for_library_prefixes 2 | import 'package:polkadart/scale_codec.dart' as _i1; 3 | 4 | typedef H256 = List; 5 | 6 | class H256Codec with _i1.Codec { 7 | const H256Codec(); 8 | 9 | @override 10 | H256 decode(_i1.Input input) { 11 | return const _i1.U8ArrayCodec(32).decode(input); 12 | } 13 | 14 | @override 15 | void encodeTo( 16 | H256 value, 17 | _i1.Output output, 18 | ) { 19 | const _i1.U8ArrayCodec(32).encodeTo( 20 | value, 21 | output, 22 | ); 23 | } 24 | 25 | @override 26 | int sizeHint(H256 value) { 27 | return const _i1.U8ArrayCodec(32).sizeHint(value); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /lib/application/chain/wetee/wetee_gen/types/sp_arithmetic/per_things/perbill.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: no_leading_underscores_for_library_prefixes 2 | import 'package:polkadart/scale_codec.dart' as _i1; 3 | 4 | typedef Perbill = int; 5 | 6 | class PerbillCodec with _i1.Codec { 7 | const PerbillCodec(); 8 | 9 | @override 10 | Perbill decode(_i1.Input input) { 11 | return _i1.U32Codec.codec.decode(input); 12 | } 13 | 14 | @override 15 | void encodeTo( 16 | Perbill value, 17 | _i1.Output output, 18 | ) { 19 | _i1.U32Codec.codec.encodeTo( 20 | value, 21 | output, 22 | ); 23 | } 24 | 25 | @override 26 | int sizeHint(Perbill value) { 27 | return _i1.U32Codec.codec.sizeHint(value); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /test/avatar_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:dtim/application/store/theme.dart'; 2 | import 'package:dtim/domain/utils/screen/screen.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:flutter_test/flutter_test.dart'; 5 | 6 | import 'package:dtim/infra/components/avatar.dart'; 7 | 8 | void main() { 9 | testWidgets("test Avatar", (WidgetTester tester) async { 10 | initScreen(1200); 11 | await tester.pumpWidget( 12 | MaterialApp( 13 | theme: getDefaultTheme(), 14 | home: const Avatar( 15 | id: "id", 16 | name: "test", 17 | size: Avatar.defaultSize * 3, 18 | fontSize: 36, 19 | ), 20 | ), 21 | ); 22 | 23 | await tester.pumpAndSettle(); 24 | }); 25 | } 26 | -------------------------------------------------------------------------------- /lib/infra/components/move_window.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:window_manager/window_manager.dart'; 3 | 4 | import 'package:dtim/domain/utils/screen/screen.dart'; 5 | 6 | Widget moveWindow(Widget wigdet) { 7 | if (!isPc()) { 8 | return wigdet; 9 | } 10 | return GestureDetector( 11 | behavior: HitTestBehavior.translucent, 12 | onPanStart: (details) { 13 | windowManager.startDragging(); 14 | }, 15 | // onDoubleTap: () async { 16 | // bool isMaximized = await windowManager.isMaximized(); 17 | // if (!isMaximized) { 18 | // windowManager.maximize(); 19 | // } else { 20 | // windowManager.unmaximize(); 21 | // } 22 | // }, 23 | child: wigdet, 24 | ); 25 | } 26 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/application/chain/wetee/wetee_gen/types/pallet_contracts/api_version.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: no_leading_underscores_for_library_prefixes 2 | import 'package:polkadart/scale_codec.dart' as _i1; 3 | 4 | typedef ApiVersion = int; 5 | 6 | class ApiVersionCodec with _i1.Codec { 7 | const ApiVersionCodec(); 8 | 9 | @override 10 | ApiVersion decode(_i1.Input input) { 11 | return _i1.U16Codec.codec.decode(input); 12 | } 13 | 14 | @override 15 | void encodeTo( 16 | ApiVersion value, 17 | _i1.Output output, 18 | ) { 19 | _i1.U16Codec.codec.encodeTo( 20 | value, 21 | output, 22 | ); 23 | } 24 | 25 | @override 26 | int sizeHint(ApiVersion value) { 27 | return _i1.U16Codec.codec.sizeHint(value); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /lib/application/chain/wetee/wetee_gen/types/frame_support/pallet_id.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: no_leading_underscores_for_library_prefixes 2 | import 'package:polkadart/scale_codec.dart' as _i1; 3 | 4 | typedef PalletId = List; 5 | 6 | class PalletIdCodec with _i1.Codec { 7 | const PalletIdCodec(); 8 | 9 | @override 10 | PalletId decode(_i1.Input input) { 11 | return const _i1.U8ArrayCodec(8).decode(input); 12 | } 13 | 14 | @override 15 | void encodeTo( 16 | PalletId value, 17 | _i1.Output output, 18 | ) { 19 | const _i1.U8ArrayCodec(8).encodeTo( 20 | value, 21 | output, 22 | ); 23 | } 24 | 25 | @override 26 | int sizeHint(PalletId value) { 27 | return const _i1.U8ArrayCodec(8).sizeHint(value); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /lib/application/chain/wetee/wetee_gen/types/sp_arithmetic/fixed_point/fixed_u128.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: no_leading_underscores_for_library_prefixes 2 | import 'package:polkadart/scale_codec.dart' as _i1; 3 | 4 | typedef FixedU128 = BigInt; 5 | 6 | class FixedU128Codec with _i1.Codec { 7 | const FixedU128Codec(); 8 | 9 | @override 10 | FixedU128 decode(_i1.Input input) { 11 | return _i1.U128Codec.codec.decode(input); 12 | } 13 | 14 | @override 15 | void encodeTo( 16 | FixedU128 value, 17 | _i1.Output output, 18 | ) { 19 | _i1.U128Codec.codec.encodeTo( 20 | value, 21 | output, 22 | ); 23 | } 24 | 25 | @override 26 | int sizeHint(FixedU128 value) { 27 | return _i1.U128Codec.codec.sizeHint(value); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /lib/application/chain/wetee/wetee_gen/types/sp_consensus_grandpa/app/public.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: no_leading_underscores_for_library_prefixes 2 | import 'package:polkadart/scale_codec.dart' as _i1; 3 | 4 | typedef Public = List; 5 | 6 | class PublicCodec with _i1.Codec { 7 | const PublicCodec(); 8 | 9 | @override 10 | Public decode(_i1.Input input) { 11 | return const _i1.U8ArrayCodec(32).decode(input); 12 | } 13 | 14 | @override 15 | void encodeTo( 16 | Public value, 17 | _i1.Output output, 18 | ) { 19 | const _i1.U8ArrayCodec(32).encodeTo( 20 | value, 21 | output, 22 | ); 23 | } 24 | 25 | @override 26 | int sizeHint(Public value) { 27 | return const _i1.U8ArrayCodec(32).sizeHint(value); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /lib/application/chain/wetee/wetee_gen/types/pallet_balances/types/extra_flags.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: no_leading_underscores_for_library_prefixes 2 | import 'package:polkadart/scale_codec.dart' as _i1; 3 | 4 | typedef ExtraFlags = BigInt; 5 | 6 | class ExtraFlagsCodec with _i1.Codec { 7 | const ExtraFlagsCodec(); 8 | 9 | @override 10 | ExtraFlags decode(_i1.Input input) { 11 | return _i1.U128Codec.codec.decode(input); 12 | } 13 | 14 | @override 15 | void encodeTo( 16 | ExtraFlags value, 17 | _i1.Output output, 18 | ) { 19 | _i1.U128Codec.codec.encodeTo( 20 | value, 21 | output, 22 | ); 23 | } 24 | 25 | @override 26 | int sizeHint(ExtraFlags value) { 27 | return _i1.U128Codec.codec.sizeHint(value); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /lib/domain/models/block_header.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'block_header.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | BlockHeader _$BlockHeaderFromJson(Map json) => BlockHeader( 10 | json['parentHash'] as String, 11 | json['number'] as String, 12 | )..blockNumber = (json['blockNumber'] as num?)?.toInt(); 13 | 14 | Map _$BlockHeaderToJson(BlockHeader instance) => 15 | { 16 | 'blockNumber': instance.blockNumber, 17 | 'parentHash': instance.parentHash, 18 | 'number': instance.number, 19 | }; 20 | -------------------------------------------------------------------------------- /lib/application/chain/wetee/wetee_gen/types/sp_consensus_aura/sr25519/app_sr25519/public.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: no_leading_underscores_for_library_prefixes 2 | import 'package:polkadart/scale_codec.dart' as _i1; 3 | 4 | typedef Public = List; 5 | 6 | class PublicCodec with _i1.Codec { 7 | const PublicCodec(); 8 | 9 | @override 10 | Public decode(_i1.Input input) { 11 | return const _i1.U8ArrayCodec(32).decode(input); 12 | } 13 | 14 | @override 15 | void encodeTo( 16 | Public value, 17 | _i1.Output output, 18 | ) { 19 | const _i1.U8ArrayCodec(32).encodeTo( 20 | value, 21 | output, 22 | ); 23 | } 24 | 25 | @override 26 | int sizeHint(Public value) { 27 | return const _i1.U8ArrayCodec(32).sizeHint(value); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /lib/application/chain/wetee/wetee_gen/types/sp_runtime/traits/blake_two256.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: no_leading_underscores_for_library_prefixes 2 | import 'package:polkadart/scale_codec.dart' as _i1; 3 | 4 | typedef BlakeTwo256 = dynamic; 5 | 6 | class BlakeTwo256Codec with _i1.Codec { 7 | const BlakeTwo256Codec(); 8 | 9 | @override 10 | BlakeTwo256 decode(_i1.Input input) { 11 | return _i1.NullCodec.codec.decode(input); 12 | } 13 | 14 | @override 15 | void encodeTo( 16 | BlakeTwo256 value, 17 | _i1.Output output, 18 | ) { 19 | _i1.NullCodec.codec.encodeTo( 20 | value, 21 | output, 22 | ); 23 | } 24 | 25 | @override 26 | int sizeHint(BlakeTwo256 value) { 27 | return _i1.NullCodec.codec.sizeHint(value); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /test/name_with_emoji_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:dtim/router.dart'; 2 | import 'package:dtim/application/store/theme.dart'; 3 | import 'package:dtim/domain/utils/screen/screen.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:flutter_test/flutter_test.dart'; 6 | 7 | import 'package:dtim/infra/components/name_with_emoji.dart'; 8 | 9 | void main() { 10 | testWidgets("test name_with_emoji.dart", (WidgetTester tester) async { 11 | initScreen(1200); 12 | 13 | await tester.pumpWidget( 14 | MaterialApp( 15 | theme: getDefaultTheme(), 16 | navigatorKey: rootNavigatorKey, 17 | home: Scaffold( 18 | body: WidgetUserNameEmoji("Test", null), 19 | ), 20 | ), 21 | ); 22 | await tester.pumpAndSettle(); 23 | }); 24 | } 25 | -------------------------------------------------------------------------------- /lib/application/chain/wetee/wetee_gen/types/sp_consensus_grandpa/app/signature.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: no_leading_underscores_for_library_prefixes 2 | import 'package:polkadart/scale_codec.dart' as _i1; 3 | 4 | typedef Signature = List; 5 | 6 | class SignatureCodec with _i1.Codec { 7 | const SignatureCodec(); 8 | 9 | @override 10 | Signature decode(_i1.Input input) { 11 | return const _i1.U8ArrayCodec(64).decode(input); 12 | } 13 | 14 | @override 15 | void encodeTo( 16 | Signature value, 17 | _i1.Output output, 18 | ) { 19 | const _i1.U8ArrayCodec(64).encodeTo( 20 | value, 21 | output, 22 | ); 23 | } 24 | 25 | @override 26 | int sizeHint(Signature value) { 27 | return const _i1.U8ArrayCodec(64).sizeHint(value); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /lib/domain/utils/platform_infos.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | import 'package:flutter/foundation.dart'; 3 | 4 | abstract class PlatformInfos { 5 | static bool get isWeb => kIsWeb; 6 | static bool get isLinux => !kIsWeb && Platform.isLinux; 7 | static bool get isWindows => !kIsWeb && Platform.isWindows; 8 | static bool get isMacOS => !kIsWeb && Platform.isMacOS; 9 | static bool get isIOS => !kIsWeb && Platform.isIOS; 10 | static bool get isAndroid => !kIsWeb && Platform.isAndroid; 11 | 12 | static bool get isCupertinoStyle => isIOS || isMacOS; 13 | static bool get isMobile => isAndroid || isIOS; 14 | static bool get isDesktop => isLinux || isWindows || isMacOS; 15 | static bool get usesTouchscreen => !isMobile; 16 | static bool get platformCanRecord => (isMobile || isMacOS); 17 | } 18 | -------------------------------------------------------------------------------- /test/hover_list_item.dart: -------------------------------------------------------------------------------- 1 | import 'package:dtim/application/store/theme.dart'; 2 | import 'package:dtim/domain/utils/screen/screen.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:flutter_test/flutter_test.dart'; 5 | 6 | import 'package:dtim/infra/components/hover_list_item.dart'; 7 | 8 | void main() { 9 | testWidgets("test Avatar", (WidgetTester tester) async { 10 | initScreen(1200); 11 | await tester.pumpWidget( 12 | MaterialApp( 13 | theme: getDefaultTheme(), 14 | home: HoverListItem( 15 | onPressed: () {}, 16 | subkey: 'test', 17 | child: const Text("test"), 18 | ), 19 | ), 20 | ); 21 | 22 | await tester.pumpAndSettle(); 23 | expect(find.text("test"), findsOneWidget); 24 | }); 25 | } 26 | -------------------------------------------------------------------------------- /lib/application/chain/wetee/wetee_gen/types/frame_system/extensions/check_weight/check_weight.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: no_leading_underscores_for_library_prefixes 2 | import 'package:polkadart/scale_codec.dart' as _i1; 3 | 4 | typedef CheckWeight = dynamic; 5 | 6 | class CheckWeightCodec with _i1.Codec { 7 | const CheckWeightCodec(); 8 | 9 | @override 10 | CheckWeight decode(_i1.Input input) { 11 | return _i1.NullCodec.codec.decode(input); 12 | } 13 | 14 | @override 15 | void encodeTo( 16 | CheckWeight value, 17 | _i1.Output output, 18 | ) { 19 | _i1.NullCodec.codec.encodeTo( 20 | value, 21 | output, 22 | ); 23 | } 24 | 25 | @override 26 | int sizeHint(CheckWeight value) { 27 | return _i1.NullCodec.codec.sizeHint(value); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /lib/application/chain/wetee/wetee_gen/types/sp_core/crypto/account_id32.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: no_leading_underscores_for_library_prefixes 2 | import 'package:polkadart/scale_codec.dart' as _i1; 3 | 4 | typedef AccountId32 = List; 5 | 6 | class AccountId32Codec with _i1.Codec { 7 | const AccountId32Codec(); 8 | 9 | @override 10 | AccountId32 decode(_i1.Input input) { 11 | return const _i1.U8ArrayCodec(32).decode(input); 12 | } 13 | 14 | @override 15 | void encodeTo( 16 | AccountId32 value, 17 | _i1.Output output, 18 | ) { 19 | const _i1.U8ArrayCodec(32).encodeTo( 20 | value, 21 | output, 22 | ); 23 | } 24 | 25 | @override 26 | int sizeHint(AccountId32 value) { 27 | return const _i1.U8ArrayCodec(32).sizeHint(value); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /lib/application/chain/wetee/wetee_gen/types/frame_system/extensions/check_genesis/check_genesis.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: no_leading_underscores_for_library_prefixes 2 | import 'package:polkadart/scale_codec.dart' as _i1; 3 | 4 | typedef CheckGenesis = dynamic; 5 | 6 | class CheckGenesisCodec with _i1.Codec { 7 | const CheckGenesisCodec(); 8 | 9 | @override 10 | CheckGenesis decode(_i1.Input input) { 11 | return _i1.NullCodec.codec.decode(input); 12 | } 13 | 14 | @override 15 | void encodeTo( 16 | CheckGenesis value, 17 | _i1.Output output, 18 | ) { 19 | _i1.NullCodec.codec.encodeTo( 20 | value, 21 | output, 22 | ); 23 | } 24 | 25 | @override 26 | int sizeHint(CheckGenesis value) { 27 | return _i1.NullCodec.codec.sizeHint(value); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /lib/application/chain/wetee/wetee_gen/types/pallet_contracts/environment_type_1.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: no_leading_underscores_for_library_prefixes 2 | import 'package:polkadart/scale_codec.dart' as _i1; 3 | 4 | typedef EnvironmentType = dynamic; 5 | 6 | class EnvironmentTypeCodec with _i1.Codec { 7 | const EnvironmentTypeCodec(); 8 | 9 | @override 10 | EnvironmentType decode(_i1.Input input) { 11 | return _i1.NullCodec.codec.decode(input); 12 | } 13 | 14 | @override 15 | void encodeTo( 16 | EnvironmentType value, 17 | _i1.Output output, 18 | ) { 19 | _i1.NullCodec.codec.encodeTo( 20 | value, 21 | output, 22 | ); 23 | } 24 | 25 | @override 26 | int sizeHint(EnvironmentType value) { 27 | return _i1.NullCodec.codec.sizeHint(value); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /lib/application/chain/wetee/wetee_gen/types/pallet_contracts/environment_type_2.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: no_leading_underscores_for_library_prefixes 2 | import 'package:polkadart/scale_codec.dart' as _i1; 3 | 4 | typedef EnvironmentType = dynamic; 5 | 6 | class EnvironmentTypeCodec with _i1.Codec { 7 | const EnvironmentTypeCodec(); 8 | 9 | @override 10 | EnvironmentType decode(_i1.Input input) { 11 | return _i1.NullCodec.codec.decode(input); 12 | } 13 | 14 | @override 15 | void encodeTo( 16 | EnvironmentType value, 17 | _i1.Output output, 18 | ) { 19 | _i1.NullCodec.codec.encodeTo( 20 | value, 21 | output, 22 | ); 23 | } 24 | 25 | @override 26 | int sizeHint(EnvironmentType value) { 27 | return _i1.NullCodec.codec.sizeHint(value); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /lib/application/chain/wetee/wetee_gen/types/pallet_contracts/environment_type_3.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: no_leading_underscores_for_library_prefixes 2 | import 'package:polkadart/scale_codec.dart' as _i1; 3 | 4 | typedef EnvironmentType = dynamic; 5 | 6 | class EnvironmentTypeCodec with _i1.Codec { 7 | const EnvironmentTypeCodec(); 8 | 9 | @override 10 | EnvironmentType decode(_i1.Input input) { 11 | return _i1.NullCodec.codec.decode(input); 12 | } 13 | 14 | @override 15 | void encodeTo( 16 | EnvironmentType value, 17 | _i1.Output output, 18 | ) { 19 | _i1.NullCodec.codec.encodeTo( 20 | value, 21 | output, 22 | ); 23 | } 24 | 25 | @override 26 | int sizeHint(EnvironmentType value) { 27 | return _i1.NullCodec.codec.sizeHint(value); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /lib/application/chain/wetee/wetee_gen/types/pallet_contracts/environment_type_4.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: no_leading_underscores_for_library_prefixes 2 | import 'package:polkadart/scale_codec.dart' as _i1; 3 | 4 | typedef EnvironmentType = dynamic; 5 | 6 | class EnvironmentTypeCodec with _i1.Codec { 7 | const EnvironmentTypeCodec(); 8 | 9 | @override 10 | EnvironmentType decode(_i1.Input input) { 11 | return _i1.NullCodec.codec.decode(input); 12 | } 13 | 14 | @override 15 | void encodeTo( 16 | EnvironmentType value, 17 | _i1.Output output, 18 | ) { 19 | _i1.NullCodec.codec.encodeTo( 20 | value, 21 | output, 22 | ); 23 | } 24 | 25 | @override 26 | int sizeHint(EnvironmentType value) { 27 | return _i1.NullCodec.codec.sizeHint(value); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /lib/application/chain/wetee/wetee_gen/types/pallet_contracts/environment_type_5.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: no_leading_underscores_for_library_prefixes 2 | import 'package:polkadart/scale_codec.dart' as _i1; 3 | 4 | typedef EnvironmentType = dynamic; 5 | 6 | class EnvironmentTypeCodec with _i1.Codec { 7 | const EnvironmentTypeCodec(); 8 | 9 | @override 10 | EnvironmentType decode(_i1.Input input) { 11 | return _i1.NullCodec.codec.decode(input); 12 | } 13 | 14 | @override 15 | void encodeTo( 16 | EnvironmentType value, 17 | _i1.Output output, 18 | ) { 19 | _i1.NullCodec.codec.encodeTo( 20 | value, 21 | output, 22 | ); 23 | } 24 | 25 | @override 26 | int sizeHint(EnvironmentType value) { 27 | return _i1.NullCodec.codec.sizeHint(value); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /lib/application/chain/wetee/wetee_gen/types/frame_system/extensions/check_nonce/check_nonce.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: no_leading_underscores_for_library_prefixes 2 | import 'package:polkadart/scale_codec.dart' as _i1; 3 | 4 | typedef CheckNonce = BigInt; 5 | 6 | class CheckNonceCodec with _i1.Codec { 7 | const CheckNonceCodec(); 8 | 9 | @override 10 | CheckNonce decode(_i1.Input input) { 11 | return _i1.CompactBigIntCodec.codec.decode(input); 12 | } 13 | 14 | @override 15 | void encodeTo( 16 | CheckNonce value, 17 | _i1.Output output, 18 | ) { 19 | _i1.CompactBigIntCodec.codec.encodeTo( 20 | value, 21 | output, 22 | ); 23 | } 24 | 25 | @override 26 | int sizeHint(CheckNonce value) { 27 | return _i1.CompactBigIntCodec.codec.sizeHint(value); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /lib/application/chain/wetee/wetee_gen/types/frame_system/extensions/check_tx_version/check_tx_version.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: no_leading_underscores_for_library_prefixes 2 | import 'package:polkadart/scale_codec.dart' as _i1; 3 | 4 | typedef CheckTxVersion = dynamic; 5 | 6 | class CheckTxVersionCodec with _i1.Codec { 7 | const CheckTxVersionCodec(); 8 | 9 | @override 10 | CheckTxVersion decode(_i1.Input input) { 11 | return _i1.NullCodec.codec.decode(input); 12 | } 13 | 14 | @override 15 | void encodeTo( 16 | CheckTxVersion value, 17 | _i1.Output output, 18 | ) { 19 | _i1.NullCodec.codec.encodeTo( 20 | value, 21 | output, 22 | ); 23 | } 24 | 25 | @override 26 | int sizeHint(CheckTxVersion value) { 27 | return _i1.NullCodec.codec.sizeHint(value); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /android/app/src/main/java/io/flutter/app/FlutterMultiDexApplication.java: -------------------------------------------------------------------------------- 1 | // Generated file. 2 | // 3 | // If you wish to remove Flutter's multidex support, delete this entire file. 4 | // 5 | // Modifications to this file should be done in a copy under a different name 6 | // as this file may be regenerated. 7 | 8 | package io.flutter.app; 9 | 10 | import android.app.Application; 11 | import android.content.Context; 12 | import androidx.annotation.CallSuper; 13 | import androidx.multidex.MultiDex; 14 | 15 | /** 16 | * Extension of {@link android.app.Application}, adding multidex support. 17 | */ 18 | public class FlutterMultiDexApplication extends Application { 19 | @Override 20 | @CallSuper 21 | protected void attachBaseContext(Context base) { 22 | super.attachBaseContext(base); 23 | MultiDex.install(this); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /lib/application/chain/wetee/wetee_gen/types/frame_system/extensions/check_spec_version/check_spec_version.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: no_leading_underscores_for_library_prefixes 2 | import 'package:polkadart/scale_codec.dart' as _i1; 3 | 4 | typedef CheckSpecVersion = dynamic; 5 | 6 | class CheckSpecVersionCodec with _i1.Codec { 7 | const CheckSpecVersionCodec(); 8 | 9 | @override 10 | CheckSpecVersion decode(_i1.Input input) { 11 | return _i1.NullCodec.codec.decode(input); 12 | } 13 | 14 | @override 15 | void encodeTo( 16 | CheckSpecVersion value, 17 | _i1.Output output, 18 | ) { 19 | _i1.NullCodec.codec.encodeTo( 20 | value, 21 | output, 22 | ); 23 | } 24 | 25 | @override 26 | int sizeHint(CheckSpecVersion value) { 27 | return _i1.NullCodec.codec.sizeHint(value); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /lib/application/chain/wetee/wetee_gen/types/frame_system/extensions/check_non_zero_sender/check_non_zero_sender.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: no_leading_underscores_for_library_prefixes 2 | import 'package:polkadart/scale_codec.dart' as _i1; 3 | 4 | typedef CheckNonZeroSender = dynamic; 5 | 6 | class CheckNonZeroSenderCodec with _i1.Codec { 7 | const CheckNonZeroSenderCodec(); 8 | 9 | @override 10 | CheckNonZeroSender decode(_i1.Input input) { 11 | return _i1.NullCodec.codec.decode(input); 12 | } 13 | 14 | @override 15 | void encodeTo( 16 | CheckNonZeroSender value, 17 | _i1.Output output, 18 | ) { 19 | _i1.NullCodec.codec.encodeTo( 20 | value, 21 | output, 22 | ); 23 | } 24 | 25 | @override 26 | int sizeHint(CheckNonZeroSender value) { 27 | return _i1.NullCodec.codec.sizeHint(value); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /lib/application/chain/wetee/wetee_gen/types/frame_system/extensions/check_mortality/check_mortality.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: no_leading_underscores_for_library_prefixes 2 | import 'package:polkadart/scale_codec.dart' as _i2; 3 | 4 | import '../../../sp_runtime/generic/era/era.dart' as _i1; 5 | 6 | typedef CheckMortality = _i1.Era; 7 | 8 | class CheckMortalityCodec with _i2.Codec { 9 | const CheckMortalityCodec(); 10 | 11 | @override 12 | CheckMortality decode(_i2.Input input) { 13 | return _i1.Era.codec.decode(input); 14 | } 15 | 16 | @override 17 | void encodeTo( 18 | CheckMortality value, 19 | _i2.Output output, 20 | ) { 21 | _i1.Era.codec.encodeTo( 22 | value, 23 | output, 24 | ); 25 | } 26 | 27 | @override 28 | int sizeHint(CheckMortality value) { 29 | return _i1.Era.codec.sizeHint(value); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /lib/application/chain/wetee/wetee_gen/types/sp_runtime/generic/unchecked_extrinsic/unchecked_extrinsic.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: no_leading_underscores_for_library_prefixes 2 | import 'package:polkadart/scale_codec.dart' as _i1; 3 | 4 | typedef UncheckedExtrinsic = List; 5 | 6 | class UncheckedExtrinsicCodec with _i1.Codec { 7 | const UncheckedExtrinsicCodec(); 8 | 9 | @override 10 | UncheckedExtrinsic decode(_i1.Input input) { 11 | return _i1.U8SequenceCodec.codec.decode(input); 12 | } 13 | 14 | @override 15 | void encodeTo( 16 | UncheckedExtrinsic value, 17 | _i1.Output output, 18 | ) { 19 | _i1.U8SequenceCodec.codec.encodeTo( 20 | value, 21 | output, 22 | ); 23 | } 24 | 25 | @override 26 | int sizeHint(UncheckedExtrinsic value) { 27 | return _i1.U8SequenceCodec.codec.sizeHint(value); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /lib/application/chain/wetee/type.dart: -------------------------------------------------------------------------------- 1 | import 'package:dtim/application/chain/wetee/wetee_gen/types/wetee_gov/member_data.dart'; 2 | import 'package:dtim/application/chain/wetee/wetee_gen/types/wetee_org/quarter_task.dart'; 3 | 4 | /// vote yes or no 5 | /// 投票 6 | class WithGovPs { 7 | final int runType; 8 | final int amount; 9 | final MemberData member; 10 | final int periodIndex; 11 | final BigInt daoId; 12 | 13 | const WithGovPs({ 14 | required this.runType, 15 | required this.amount, 16 | required this.member, 17 | required this.periodIndex, 18 | required this.daoId, 19 | }); 20 | } 21 | 22 | /// roadmap 季度 23 | class Quarter { 24 | final int year; 25 | final int quarter; 26 | final List tasks; 27 | 28 | const Quarter({ 29 | required this.year, 30 | required this.quarter, 31 | required this.tasks, 32 | }); 33 | } 34 | -------------------------------------------------------------------------------- /ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 9.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/application/chain/wetee/wetee_gen/types/pallet_transaction_payment/charge_transaction_payment.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: no_leading_underscores_for_library_prefixes 2 | import 'package:polkadart/scale_codec.dart' as _i1; 3 | 4 | typedef ChargeTransactionPayment = BigInt; 5 | 6 | class ChargeTransactionPaymentCodec with _i1.Codec { 7 | const ChargeTransactionPaymentCodec(); 8 | 9 | @override 10 | ChargeTransactionPayment decode(_i1.Input input) { 11 | return _i1.CompactBigIntCodec.codec.decode(input); 12 | } 13 | 14 | @override 15 | void encodeTo( 16 | ChargeTransactionPayment value, 17 | _i1.Output output, 18 | ) { 19 | _i1.CompactBigIntCodec.codec.encodeTo( 20 | value, 21 | output, 22 | ); 23 | } 24 | 25 | @override 26 | int sizeHint(ChargeTransactionPayment value) { 27 | return _i1.CompactBigIntCodec.codec.sizeHint(value); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /test/identicon_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:dtim/router.dart'; 2 | import 'package:dtim/application/store/theme.dart'; 3 | import 'package:dtim/domain/utils/screen/screen.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:flutter_test/flutter_test.dart'; 6 | 7 | import 'package:dtim/domain/utils/identicon.dart'; 8 | 9 | void main() { 10 | testWidgets("test user_avatar.dart", (WidgetTester tester) async { 11 | initScreen(1200); 12 | const imgbg = Colors.red; 13 | final img = Identicon(fg: [imgbg.red, imgbg.green, imgbg.blue]).generate("test", scale: 1); 14 | await tester.pumpWidget( 15 | MaterialApp( 16 | theme: getDefaultTheme(), 17 | navigatorKey: rootNavigatorKey, 18 | home: Image.memory( 19 | img, 20 | width: 80, 21 | height: 80, 22 | fit: BoxFit.contain, 23 | ), 24 | ), 25 | ); 26 | await tester.pumpAndSettle(); 27 | }); 28 | } 29 | -------------------------------------------------------------------------------- /hacks/build_web.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 来源于网络,用于获取当前shell文件的路径 4 | SOURCE="$0" 5 | while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink 6 | DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" 7 | SOURCE="$(readlink "$SOURCE")" 8 | [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located 9 | done 10 | DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" 11 | 12 | cd "$DIR/../" 13 | 14 | rm -r web/js 15 | mkdir -p web/js 16 | cd web/js/ && curl -L 'https://gitlab.com/famedly/company/frontend/libraries/olm/-/jobs/artifacts/master/download?job=build:js' > olm.zip && cd ../../ 17 | cd web/js/ && unzip olm.zip && cd ../../ 18 | cd web/js/ && rm olm.zip && cd ../../ 19 | cd web/js/ && mv javascript olm && cd ../../ 20 | 21 | flutter build web --release 22 | 23 | ossutil64 -c ./hacks/.config -f --recursive cp build/web/ oss://wetee-dtim 24 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/infra/components/content/member.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:matrix/matrix.dart'; 3 | 4 | import 'utils.dart'; 5 | 6 | class RoomMemberContent extends StatelessWidget { 7 | final Event event; 8 | final Color textColor; 9 | 10 | const RoomMemberContent(this.event, this.textColor, {Key? key}) : super(key: key); 11 | 12 | @override 13 | Widget build(BuildContext context) { 14 | if (event.prevContent != null) { 15 | return const RoomEvent( 16 | text: "修改了用户信息", 17 | ); 18 | } 19 | if (event.content['membership'] == 'invite') { 20 | return RoomEvent( 21 | text: "邀请用户 ${event.content['displayname']} 加入${event.room.isDirectChat ? "私聊" : "频道"}", 22 | ); 23 | } else if (event.content['membership'] == 'join') { 24 | return RoomEvent( 25 | text: "加入了${event.room.isDirectChat ? "私聊" : "频道"}", 26 | ); 27 | } 28 | return Text(event.toJson().toString()); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /assets/translations/app_zh.arb: -------------------------------------------------------------------------------- 1 | { 2 | "signUp": "注册兼容 polkadot-js 账户", 3 | "tooManyUsers": "已注册用户太多", 4 | "generate": "生成加密账户", 5 | "welcome": "欢迎使用「我门」web3协作软件,将你的办公搬进元宇宙!", 6 | "importAccount": "导入区块链账户", 7 | "selectOrg": "请选择组织", 8 | "selectOrgOk": "组织选中成功", 9 | "singup1": "第一步:生成助记词", 10 | "singup2": "第二步:完成创建", 11 | "singup3": "第二步:完成导入", 12 | "mnemonicCopied": "助记词复制成功", 13 | "copyClipboard": "复制到剪贴板", 14 | "mnemonicNote": "请写下你的钱包助记词,放在安全的地方。这个助记词可以用来恢复你的钱包。小心保管,以免失去你的资产。", 15 | "accountName": "账户昵称", 16 | "accountPasswd": "账户密码", 17 | "accountPasswd2": "再次输入密码", 18 | "accountCreated": "账户创建成功,稍后您需要选择您的组织连接web3网络", 19 | "createAccount": "创建本地账户", 20 | "accountNameRule": "请输入中文、英文、数字、下划线组成昵称", 21 | "accountNameNotNull": "昵称不能为空", 22 | "accountPasswdRule": "密码不能为纯数字或字母,不少于6位", 23 | "accountPasswdNoeq": "两次输入密码不一致", 24 | "inputMnemonic": "输入账户助记词", 25 | "channel": "频道", 26 | "direct_chat": "私信", 27 | "chatDetal": "关于", 28 | "chatMemeber": "成员", 29 | "chatE2e": "加密" 30 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | migrate_working_dir/ 12 | 13 | # IntelliJ related 14 | *.iml 15 | *.ipr 16 | *.iws 17 | .idea/ 18 | 19 | # The .vscode folder contains launch configuration and tasks you configure in 20 | # VS Code which you may wish to be included in version control, so this line 21 | # is commented out by default. 22 | #.vscode/ 23 | 24 | # Flutter/Dart/Pub related 25 | **/doc/api/ 26 | **/ios/Flutter/.last_build_id 27 | .dart_tool/ 28 | .flutter-plugins 29 | .flutter-plugins-dependencies 30 | .packages 31 | .pub-cache/ 32 | .pub/ 33 | /build/ 34 | 35 | # Web related 36 | 37 | # Symbolication related 38 | app.*.symbols 39 | 40 | # Obfuscation related 41 | app.*.map.json 42 | 43 | # Android Studio will place build artifacts here 44 | /android/app/debug 45 | /android/app/profile 46 | /android/app/release 47 | 48 | **/target/ 49 | **/build/ 50 | 51 | libolm.3.dylib 52 | libcrypto.1.1.dylib 53 | /.fvm/flutter_sdk/ 54 | web/js -------------------------------------------------------------------------------- /web/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "dtim", 3 | "short_name": "dtim", 4 | "start_url": ".", 5 | "display": "standalone", 6 | "background_color": "#0175C2", 7 | "theme_color": "#0175C2", 8 | "description": "A new Flutter project.", 9 | "orientation": "portrait-primary", 10 | "prefer_related_applications": false, 11 | "icons": [ 12 | { 13 | "src": "icons/Icon-192.png", 14 | "sizes": "192x192", 15 | "type": "image/png" 16 | }, 17 | { 18 | "src": "icons/Icon-512.png", 19 | "sizes": "512x512", 20 | "type": "image/png" 21 | }, 22 | { 23 | "src": "icons/Icon-maskable-192.png", 24 | "sizes": "192x192", 25 | "type": "image/png", 26 | "purpose": "maskable" 27 | }, 28 | { 29 | "src": "icons/Icon-maskable-512.png", 30 | "sizes": "512x512", 31 | "type": "image/png", 32 | "purpose": "maskable" 33 | } 34 | ] 35 | } 36 | -------------------------------------------------------------------------------- /hacks/build_macos.sh: -------------------------------------------------------------------------------- 1 | # get shell path 2 | SOURCE="$0" 3 | while [ -h "$SOURCE" ]; do 4 | DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" 5 | SOURCE="$(readlink "$SOURCE")" 6 | [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" 7 | done 8 | DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" 9 | 10 | rm -rf build/macos/Build/Products/Release/DTIM.app 11 | 12 | ### Make release build ### 13 | flutter build macos --release 14 | 15 | # cp "$HOMEBREW_CELLAR/libolm/3.2.15/lib/libolm.3.2.15.dylib" build/macos/Build/Products/Release/DTIM.app/Contents/Frameworks/ 16 | # mv build/macos/Build/Products/Release/DTIM.app/Contents/Frameworks/libolm.3.2.15.dylib build/macos/Build/Products/Release/DTIM.app/Contents/Frameworks/libolm.3.dylib 17 | 18 | # echo "Build build/macos/Build/Products/Release/DTIM.app" 19 | cd build/macos/Build/Products/Release/ 20 | zip -r macos.zip DTIM.app 21 | cd "$DIR/../" 22 | mv build/macos/Build/Products/Release/macos.zip macos.zip 23 | ossutil64 -c ./hacks/.config -f --recursive cp macos.zip oss://wetee-dtim/download/macos.zip 24 | rm -rf macos.zip -------------------------------------------------------------------------------- /test/functions_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_test/flutter_test.dart'; 2 | 3 | import 'package:dtim/domain/utils/functions.dart'; 4 | 5 | void main() { 6 | test("test getUserShortId", () { 7 | expect(getUserShortId("0x1234567890:org1"), "0x1234567890"); 8 | expect(getUserShortId("0x1234567890:org2"), "0x1234567890"); 9 | expect(getUserShortId("0x1234567890:org3"), "0x1234567890"); 10 | }); 11 | 12 | test("test getUserOrg", () { 13 | expect(getUserOrg("0x1234567890:org1"), "org1"); 14 | expect(getUserOrg("0x1234567890:org2"), "org2"); 15 | expect(getUserOrg("0x1234567890:org3"), "org3"); 16 | }); 17 | 18 | test("test getUserShortName", () { 19 | expect(getUserShortName("0x1234567890123456789012345678901234567890:org1"), "0x123456789...01234567890"); 20 | }); 21 | 22 | test("test fisrtUpperCase", () { 23 | expect(fisrtUpperCase("abc"), "Abc"); 24 | expect(fisrtUpperCase("Abc"), "Abc"); 25 | expect(fisrtUpperCase("ABC"), "ABC"); 26 | }); 27 | } 28 | 29 | fisrtUpperCase(String s) { 30 | return s.fisrtUpperCase(); 31 | } 32 | -------------------------------------------------------------------------------- /.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: "54e66469a933b60ddf175f858f82eaeb97e48c8d" 8 | channel: "stable" 9 | 10 | project_type: app 11 | 12 | # Tracks metadata for the flutter migrate command 13 | migration: 14 | platforms: 15 | - platform: root 16 | create_revision: 54e66469a933b60ddf175f858f82eaeb97e48c8d 17 | base_revision: 54e66469a933b60ddf175f858f82eaeb97e48c8d 18 | - platform: macos 19 | create_revision: 54e66469a933b60ddf175f858f82eaeb97e48c8d 20 | base_revision: 54e66469a933b60ddf175f858f82eaeb97e48c8d 21 | 22 | # User provided section 23 | 24 | # List of Local paths (relative to this file) that should be 25 | # ignored by the migrate tool. 26 | # 27 | # Files that are not part of the templates will be ignored by default. 28 | unmanaged_files: 29 | - 'lib/main.dart' 30 | - 'ios/Runner.xcodeproj/project.pbxproj' 31 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /lib/application/store/db.dart: -------------------------------------------------------------------------------- 1 | import 'package:dtim/domain/models/models.dart'; 2 | import 'package:hive_flutter/hive_flutter.dart'; 3 | 4 | initDB() async { 5 | Hive.registerAdapter(SystemAdapter()); 6 | Hive.registerAdapter(AccountAdapter()); 7 | Hive.registerAdapter(AccountOrgAdapter()); 8 | Hive.registerAdapter(OrgAdapter()); 9 | Hive.registerAdapter(OrgAppAdapter()); 10 | 11 | // if (DB != null) { 12 | // return DB!; 13 | // } 14 | 15 | await Hive.initFlutter(); 16 | 17 | // if (PlatformInfos.isWeb) { 18 | // DB = await BoxCollection.open( 19 | // 'LocalStore', 20 | // {'Account', 'AccountOrg', 'System'}, 21 | // ); 22 | // return DB!; 23 | // } 24 | 25 | // final dir = await getApplicationSupportDirectory(); 26 | // printInfo("LocalStore ==> ${dir.path}/localstore"); 27 | 28 | // // DB = await openStore(directory: "${dir.path}/daoent"); 29 | // DB = await BoxCollection.open( 30 | // 'LocalStore', 31 | // {'Account', 'AccountOrg', 'System'}, 32 | // path: "${dir.path}/localstore", 33 | // ); 34 | // return DB!; 35 | } 36 | -------------------------------------------------------------------------------- /android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /lib/infra/components/content/html.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:matrix/matrix.dart'; 4 | 5 | class HtmlMessage extends StatelessWidget { 6 | final String html; 7 | final int? maxLines; 8 | final Room room; 9 | final TextStyle? defaultTextStyle; 10 | final TextStyle? linkStyle; 11 | final double? emoteSize; 12 | 13 | const HtmlMessage({ 14 | Key? key, 15 | required this.html, 16 | this.maxLines, 17 | required this.room, 18 | this.defaultTextStyle, 19 | this.linkStyle, 20 | this.emoteSize, 21 | }) : super(key: key); 22 | 23 | @override 24 | Widget build(BuildContext context) { 25 | // final renderHtml = html.replaceAll( 26 | // RegExp( 27 | // '.*', 28 | // caseSensitive: false, 29 | // multiLine: false, 30 | // dotAll: true, 31 | // ), 32 | // '', 33 | // ); 34 | 35 | // final im = context.read(); 36 | // final client = im.currentState!.client; 37 | 38 | // final themeData = Theme.of(context); 39 | return const Text("HTML"); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /lib/infra/pages/webrtc/img_painter.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'dart:math' as math; 3 | 4 | class ImgPainter extends CustomPainter { 5 | ImgPainter( 6 | this._animation, { 7 | required this.color, 8 | }) : super(repaint: _animation); 9 | final Color color; 10 | final Animation _animation; 11 | void circle(Canvas canvas, Rect rect, double value) { 12 | final double opacity = (1.0 - (value / 4.0)).clamp(0.0, 1.0); 13 | final Color _color = color.withOpacity(opacity); 14 | final double size = rect.width / 2; 15 | final double area = size * size; 16 | final double radius = math.sqrt(area * value / 4); 17 | final Paint paint = Paint()..color = _color; 18 | canvas.drawCircle(rect.center, radius, paint); 19 | } 20 | 21 | @override 22 | void paint(Canvas canvas, Size size) { 23 | final Rect rect = Rect.fromLTRB(0.0, 0.0, size.width, size.height); 24 | for (int wave = 3; wave >= 0; wave--) { 25 | circle(canvas, rect, wave + _animation.value); 26 | } 27 | } 28 | 29 | @override 30 | bool shouldRepaint(ImgPainter oldDelegate) => true; 31 | } 32 | -------------------------------------------------------------------------------- /lib/infra/components/dao/text.dart: -------------------------------------------------------------------------------- 1 | import 'package:dtim/domain/utils/screen/screen.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | import 'package:dtim/application/store/theme.dart'; 5 | 6 | class PrimaryText extends StatelessWidget { 7 | final double? size; 8 | final FontWeight fontWeight; 9 | final String text; 10 | final double height; 11 | final Color? color; 12 | final TextAlign? textAlign; 13 | 14 | const PrimaryText({ 15 | Key? key, 16 | required this.text, 17 | this.fontWeight = FontWeight.w400, 18 | this.size, 19 | this.height = 1.4, 20 | this.color, 21 | this.textAlign, 22 | }) : super(key: key); 23 | 24 | @override 25 | Widget build(BuildContext context) { 26 | final constTheme = Theme.of(context).extension()!; 27 | return Text( 28 | text, 29 | style: TextStyle( 30 | color: color ?? constTheme.centerChannelColor, 31 | height: height, 32 | fontFamily: 'Poppins', 33 | fontSize: size ?? 18.w, 34 | fontWeight: fontWeight, 35 | ), 36 | textAlign: textAlign ?? TextAlign.left, 37 | ); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /linux/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | audioplayers_linux 7 | desktop_lifecycle 8 | dynamic_color 9 | emoji_picker_flutter 10 | file_selector_linux 11 | flutter_secure_storage_linux 12 | flutter_webrtc 13 | record_linux 14 | screen_retriever_linux 15 | tray_manager 16 | url_launcher_linux 17 | window_manager 18 | ) 19 | 20 | list(APPEND FLUTTER_FFI_PLUGIN_LIST 21 | ) 22 | 23 | set(PLUGIN_BUNDLED_LIBRARIES) 24 | 25 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 26 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin}) 27 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 28 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 29 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 30 | endforeach(plugin) 31 | 32 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) 33 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin}) 34 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) 35 | endforeach(ffi_plugin) 36 | -------------------------------------------------------------------------------- /windows/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | audioplayers_windows 7 | desktop_lifecycle 8 | dynamic_color 9 | emoji_picker_flutter 10 | file_selector_windows 11 | flutter_secure_storage_windows 12 | flutter_webrtc 13 | record_windows 14 | screen_retriever_windows 15 | tray_manager 16 | url_launcher_windows 17 | window_manager 18 | ) 19 | 20 | list(APPEND FLUTTER_FFI_PLUGIN_LIST 21 | ) 22 | 23 | set(PLUGIN_BUNDLED_LIBRARIES) 24 | 25 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 26 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin}) 27 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 28 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 29 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 30 | endforeach(plugin) 31 | 32 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) 33 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin}) 34 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) 35 | endforeach(ffi_plugin) 36 | -------------------------------------------------------------------------------- /lib/application/chain/wetee/wetee_gen/types/tuples.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: no_leading_underscores_for_library_prefixes 2 | import 'package:polkadart/scale_codec.dart' as _i1; 3 | 4 | class Tuple2 { 5 | const Tuple2( 6 | this.value0, 7 | this.value1, 8 | ); 9 | 10 | final T0 value0; 11 | 12 | final T1 value1; 13 | } 14 | 15 | class Tuple2Codec with _i1.Codec> { 16 | const Tuple2Codec( 17 | this.codec0, 18 | this.codec1, 19 | ); 20 | 21 | final _i1.Codec codec0; 22 | 23 | final _i1.Codec codec1; 24 | 25 | @override 26 | void encodeTo( 27 | Tuple2 tuple, 28 | _i1.Output output, 29 | ) { 30 | codec0.encodeTo(tuple.value0, output); 31 | codec1.encodeTo(tuple.value1, output); 32 | } 33 | 34 | @override 35 | Tuple2 decode(_i1.Input input) { 36 | return Tuple2( 37 | codec0.decode(input), 38 | codec1.decode(input), 39 | ); 40 | } 41 | 42 | @override 43 | int sizeHint(Tuple2 tuple) { 44 | int size = 0; 45 | size += codec0.sizeHint(tuple.value0); 46 | size += codec1.sizeHint(tuple.value1); 47 | return size; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /lib/application/chain/wetee/wetee_gen/types/tuples_1.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: no_leading_underscores_for_library_prefixes 2 | import 'package:polkadart/scale_codec.dart' as _i1; 3 | 4 | class Tuple2 { 5 | const Tuple2( 6 | this.value0, 7 | this.value1, 8 | ); 9 | 10 | final T0 value0; 11 | 12 | final T1 value1; 13 | } 14 | 15 | class Tuple2Codec with _i1.Codec> { 16 | const Tuple2Codec( 17 | this.codec0, 18 | this.codec1, 19 | ); 20 | 21 | final _i1.Codec codec0; 22 | 23 | final _i1.Codec codec1; 24 | 25 | @override 26 | void encodeTo( 27 | Tuple2 tuple, 28 | _i1.Output output, 29 | ) { 30 | codec0.encodeTo(tuple.value0, output); 31 | codec1.encodeTo(tuple.value1, output); 32 | } 33 | 34 | @override 35 | Tuple2 decode(_i1.Input input) { 36 | return Tuple2( 37 | codec0.decode(input), 38 | codec1.decode(input), 39 | ); 40 | } 41 | 42 | @override 43 | int sizeHint(Tuple2 tuple) { 44 | int size = 0; 45 | size += codec0.sizeHint(tuple.value0); 46 | size += codec1.sizeHint(tuple.value1); 47 | return size; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /test/popup_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:dtim/infra/components/popup.dart'; 2 | import 'package:dtim/router.dart'; 3 | import 'package:dtim/application/store/theme.dart'; 4 | import 'package:dtim/domain/utils/screen/screen.dart'; 5 | import 'package:flutter/material.dart'; 6 | import 'package:flutter_test/flutter_test.dart'; 7 | 8 | void main() { 9 | testWidgets("test user_avatar.dart", (WidgetTester tester) async { 10 | initScreen(1200); 11 | await tester.pumpWidget( 12 | MaterialApp( 13 | theme: getDefaultTheme(), 14 | navigatorKey: rootNavigatorKey, 15 | home: Scaffold( 16 | body: BasePopupMenu( 17 | verticalMargin: -1.w, 18 | horizontalMargin: 5.w, 19 | showArrow: false, 20 | pressType: PressType.singleClick, 21 | position: PreferredPosition.bottomLeft, 22 | child: Container( 23 | width: 100.w, 24 | height: 100.w, 25 | color: Colors.red, 26 | ), 27 | menuBuilder: () => Container(), 28 | ), 29 | ), 30 | ), 31 | ); 32 | await tester.pumpAndSettle(); 33 | }); 34 | } 35 | -------------------------------------------------------------------------------- /test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter widget test. 2 | // 3 | // To perform an interaction with a widget in your test, use the WidgetTester 4 | // utility in the flutter_test package. For example, you can send tap and scroll 5 | // gestures. You can also use WidgetTester to find child widgets in the widget 6 | // tree, read text, and verify that the values of widget properties are correct. 7 | 8 | import 'package:flutter/material.dart'; 9 | import 'package:flutter_test/flutter_test.dart'; 10 | 11 | import 'package:dtim/main.dart'; 12 | 13 | void main() { 14 | testWidgets('Counter increments smoke test', (WidgetTester tester) async { 15 | // Build our app and trigger a frame. 16 | await tester.pumpWidget(const App()); 17 | 18 | // Verify that our counter starts at 0. 19 | expect(find.text('0'), findsOneWidget); 20 | expect(find.text('1'), findsNothing); 21 | 22 | // Tap the '+' icon and trigger a frame. 23 | await tester.tap(find.byIcon(Icons.add)); 24 | await tester.pump(); 25 | 26 | // Verify that our counter has incremented. 27 | expect(find.text('0'), findsNothing); 28 | expect(find.text('1'), findsOneWidget); 29 | }); 30 | } 31 | -------------------------------------------------------------------------------- /lib/application/chain/wetee/wetee_gen/pallets/we_t_e_e_guild.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: no_leading_underscores_for_library_prefixes 2 | import '../types/sp_core/crypto/account_id32.dart' as _i2; 3 | import '../types/wetee_guild/pallet/call.dart' as _i3; 4 | import '../types/wetee_runtime/runtime_call.dart' as _i1; 5 | 6 | class Txs { 7 | const Txs(); 8 | 9 | _i1.RuntimeCall guildJoin({ 10 | required BigInt daoId, 11 | required BigInt guildId, 12 | required _i2.AccountId32 who, 13 | }) { 14 | final _call = _i3.Call.values.guildJoin( 15 | daoId: daoId, 16 | guildId: guildId, 17 | who: who, 18 | ); 19 | return _i1.RuntimeCall.values.weTEEGuild(_call); 20 | } 21 | 22 | /// 创建公会 23 | _i1.RuntimeCall createGuild({ 24 | required BigInt daoId, 25 | required List name, 26 | required List desc, 27 | required List metaData, 28 | required _i2.AccountId32 creator, 29 | }) { 30 | final _call = _i3.Call.values.createGuild( 31 | daoId: daoId, 32 | name: name, 33 | desc: desc, 34 | metaData: metaData, 35 | creator: creator, 36 | ); 37 | return _i1.RuntimeCall.values.weTEEGuild(_call); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /macos/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(FLUTTER_BUILD_NAME) 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSMinimumSystemVersion 24 | $(MACOSX_DEPLOYMENT_TARGET) 25 | NSHumanReadableCopyright 26 | $(PRODUCT_COPYRIGHT) 27 | NSMainNibFile 28 | MainMenu 29 | NSPrincipalClass 30 | NSApplication 31 | 32 | 33 | -------------------------------------------------------------------------------- /.github/workflows/build.yaml: -------------------------------------------------------------------------------- 1 | name: Builds 2 | on: workflow_dispatch 3 | 4 | # Declare default permissions as read only. 5 | permissions: read-all 6 | 7 | jobs: 8 | build: 9 | name: Build ${{ matrix.target }} 10 | runs-on: windows-latest 11 | strategy: 12 | fail-fast: false 13 | matrix: 14 | # target: ["apk --debug", "appbundle --debug", "ios --no-codesign", macos, web] 15 | target: [web, windows] 16 | steps: 17 | - name: Set up JDK 11 18 | uses: actions/setup-java@5ffc13f4174014e2d4d4572b3d74c3fa61aeb2c2 # v3.11.0 19 | with: 20 | java-version: 11 21 | distribution: temurin 22 | # Set up Flutter. 23 | - name: Clone Flutter repository with 3.7.7 24 | uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa # v2.10.0 25 | with: 26 | flutter-version: '3.7.7' 27 | channel: 'stable' 28 | - run: flutter doctor -v 29 | # Checkout WeTee code and get packages. 30 | - name: Checkout WeTee code 31 | uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 32 | - run: flutter pub get 33 | - run: flutter build ${{ matrix.target }} 34 | -------------------------------------------------------------------------------- /lib/application/chain/wetee/wetee_gen/types/cow.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: no_leading_underscores_for_library_prefixes 2 | import 'package:polkadart/scale_codec.dart' as _i2; 3 | 4 | import 'tuples.dart' as _i1; 5 | 6 | typedef Cow = List<_i1.Tuple2, int>>; 7 | 8 | class CowCodec with _i2.Codec { 9 | const CowCodec(); 10 | 11 | @override 12 | Cow decode(_i2.Input input) { 13 | return const _i2.SequenceCodec<_i1.Tuple2, int>>( 14 | _i1.Tuple2Codec, int>( 15 | _i2.U8ArrayCodec(8), 16 | _i2.U32Codec.codec, 17 | )).decode(input); 18 | } 19 | 20 | @override 21 | void encodeTo( 22 | Cow value, 23 | _i2.Output output, 24 | ) { 25 | const _i2.SequenceCodec<_i1.Tuple2, int>>( 26 | _i1.Tuple2Codec, int>( 27 | _i2.U8ArrayCodec(8), 28 | _i2.U32Codec.codec, 29 | )).encodeTo( 30 | value, 31 | output, 32 | ); 33 | } 34 | 35 | @override 36 | int sizeHint(Cow value) { 37 | return const _i2.SequenceCodec<_i1.Tuple2, int>>( 38 | _i1.Tuple2Codec, int>( 39 | _i2.U8ArrayCodec(8), 40 | _i2.U32Codec.codec, 41 | )).sizeHint(value); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /.github/workflows/release_windows.yaml: -------------------------------------------------------------------------------- 1 | name: Windows CI 2 | 3 | on: workflow_dispatch 4 | 5 | # Declare default permissions as read only. 6 | permissions: read-all 7 | 8 | jobs: 9 | build: 10 | runs-on: windows-latest 11 | steps: 12 | - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 # v3.5.2 13 | - uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa # v2.10.0 14 | # Build the app for Windows. 15 | - run: flutter build windows --release 16 | 17 | - name: Import GPG key 18 | run: | 19 | echo gpg --import --no-tty --batch --yes packages.microsoft.gpg 20 | 21 | - name: Sign Windows artifact 22 | run: | 23 | gpg --detach-sign "*.zip" 24 | working-directory: ./build/windows/runner/Release 25 | 26 | - name: Upload Windows artifact 27 | uses: actions/upload-artifact@v2 28 | with: 29 | name: Windows 30 | path: ./build/windows/runner/Release 31 | 32 | - name: Upload Windows signature 33 | uses: actions/upload-artifact@v2 34 | with: 35 | name: Windows_signature 36 | path: ./build/windows/runner/Release/*.zip.sig -------------------------------------------------------------------------------- /lib/application/chain/wetee/wetee_gen/types/frame_support/dispatch/pays.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: no_leading_underscores_for_library_prefixes 2 | import 'dart:typed_data' as _i2; 3 | 4 | import 'package:polkadart/scale_codec.dart' as _i1; 5 | 6 | enum Pays { 7 | yes('Yes', 0), 8 | no('No', 1); 9 | 10 | const Pays( 11 | this.variantName, 12 | this.codecIndex, 13 | ); 14 | 15 | factory Pays.decode(_i1.Input input) { 16 | return codec.decode(input); 17 | } 18 | 19 | final String variantName; 20 | 21 | final int codecIndex; 22 | 23 | static const $PaysCodec codec = $PaysCodec(); 24 | 25 | String toJson() => variantName; 26 | _i2.Uint8List encode() { 27 | return codec.encode(this); 28 | } 29 | } 30 | 31 | class $PaysCodec with _i1.Codec { 32 | const $PaysCodec(); 33 | 34 | @override 35 | Pays decode(_i1.Input input) { 36 | final index = _i1.U8Codec.codec.decode(input); 37 | switch (index) { 38 | case 0: 39 | return Pays.yes; 40 | case 1: 41 | return Pays.no; 42 | default: 43 | throw Exception('Pays: Invalid variant index: "$index"'); 44 | } 45 | } 46 | 47 | @override 48 | void encodeTo( 49 | Pays value, 50 | _i1.Output output, 51 | ) { 52 | _i1.U8Codec.codec.encodeTo( 53 | value.codecIndex, 54 | output, 55 | ); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /lib/application/chain/wetee/wetee_gen/types/wetee_guild/pallet/error.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: no_leading_underscores_for_library_prefixes 2 | import 'dart:typed_data' as _i2; 3 | 4 | import 'package:polkadart/scale_codec.dart' as _i1; 5 | 6 | /// The `Error` enum of this pallet. 7 | enum Error { 8 | badDaoOrigin('BadDaoOrigin', 0); 9 | 10 | const Error( 11 | this.variantName, 12 | this.codecIndex, 13 | ); 14 | 15 | factory Error.decode(_i1.Input input) { 16 | return codec.decode(input); 17 | } 18 | 19 | final String variantName; 20 | 21 | final int codecIndex; 22 | 23 | static const $ErrorCodec codec = $ErrorCodec(); 24 | 25 | String toJson() => variantName; 26 | _i2.Uint8List encode() { 27 | return codec.encode(this); 28 | } 29 | } 30 | 31 | class $ErrorCodec with _i1.Codec { 32 | const $ErrorCodec(); 33 | 34 | @override 35 | Error decode(_i1.Input input) { 36 | final index = _i1.U8Codec.codec.decode(input); 37 | switch (index) { 38 | case 0: 39 | return Error.badDaoOrigin; 40 | default: 41 | throw Exception('Error: Invalid variant index: "$index"'); 42 | } 43 | } 44 | 45 | @override 46 | void encodeTo( 47 | Error value, 48 | _i1.Output output, 49 | ) { 50 | _i1.U8Codec.codec.encodeTo( 51 | value.codecIndex, 52 | output, 53 | ); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /lib/application/chain/wetee/wetee_gen/types/wetee_gov/opinion.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: no_leading_underscores_for_library_prefixes 2 | import 'dart:typed_data' as _i2; 3 | 4 | import 'package:polkadart/scale_codec.dart' as _i1; 5 | 6 | enum Opinion { 7 | yes('YES', 0), 8 | no('NO', 1); 9 | 10 | const Opinion( 11 | this.variantName, 12 | this.codecIndex, 13 | ); 14 | 15 | factory Opinion.decode(_i1.Input input) { 16 | return codec.decode(input); 17 | } 18 | 19 | final String variantName; 20 | 21 | final int codecIndex; 22 | 23 | static const $OpinionCodec codec = $OpinionCodec(); 24 | 25 | String toJson() => variantName; 26 | _i2.Uint8List encode() { 27 | return codec.encode(this); 28 | } 29 | } 30 | 31 | class $OpinionCodec with _i1.Codec { 32 | const $OpinionCodec(); 33 | 34 | @override 35 | Opinion decode(_i1.Input input) { 36 | final index = _i1.U8Codec.codec.decode(input); 37 | switch (index) { 38 | case 0: 39 | return Opinion.yes; 40 | case 1: 41 | return Opinion.no; 42 | default: 43 | throw Exception('Opinion: Invalid variant index: "$index"'); 44 | } 45 | } 46 | 47 | @override 48 | void encodeTo( 49 | Opinion value, 50 | _i1.Output output, 51 | ) { 52 | _i1.U8Codec.codec.encodeTo( 53 | value.codecIndex, 54 | output, 55 | ); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /lib/application/chain/wetee/wetee_gen/types/pallet_sudo/pallet/error.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: no_leading_underscores_for_library_prefixes 2 | import 'dart:typed_data' as _i2; 3 | 4 | import 'package:polkadart/scale_codec.dart' as _i1; 5 | 6 | /// Error for the Sudo pallet. 7 | enum Error { 8 | /// Sender must be the Sudo account. 9 | requireSudo('RequireSudo', 0); 10 | 11 | const Error( 12 | this.variantName, 13 | this.codecIndex, 14 | ); 15 | 16 | factory Error.decode(_i1.Input input) { 17 | return codec.decode(input); 18 | } 19 | 20 | final String variantName; 21 | 22 | final int codecIndex; 23 | 24 | static const $ErrorCodec codec = $ErrorCodec(); 25 | 26 | String toJson() => variantName; 27 | _i2.Uint8List encode() { 28 | return codec.encode(this); 29 | } 30 | } 31 | 32 | class $ErrorCodec with _i1.Codec { 33 | const $ErrorCodec(); 34 | 35 | @override 36 | Error decode(_i1.Input input) { 37 | final index = _i1.U8Codec.codec.decode(input); 38 | switch (index) { 39 | case 0: 40 | return Error.requireSudo; 41 | default: 42 | throw Exception('Error: Invalid variant index: "$index"'); 43 | } 44 | } 45 | 46 | @override 47 | void encodeTo( 48 | Error value, 49 | _i1.Output output, 50 | ) { 51 | _i1.U8Codec.codec.encodeTo( 52 | value.codecIndex, 53 | output, 54 | ); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /lib/application/chain/wetee/wetee_gen/types/wetee_matrix/status.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: no_leading_underscores_for_library_prefixes 2 | import 'dart:typed_data' as _i2; 3 | 4 | import 'package:polkadart/scale_codec.dart' as _i1; 5 | 6 | enum Status { 7 | active('Active', 0), 8 | inActive('InActive', 1); 9 | 10 | const Status( 11 | this.variantName, 12 | this.codecIndex, 13 | ); 14 | 15 | factory Status.decode(_i1.Input input) { 16 | return codec.decode(input); 17 | } 18 | 19 | final String variantName; 20 | 21 | final int codecIndex; 22 | 23 | static const $StatusCodec codec = $StatusCodec(); 24 | 25 | String toJson() => variantName; 26 | _i2.Uint8List encode() { 27 | return codec.encode(this); 28 | } 29 | } 30 | 31 | class $StatusCodec with _i1.Codec { 32 | const $StatusCodec(); 33 | 34 | @override 35 | Status decode(_i1.Input input) { 36 | final index = _i1.U8Codec.codec.decode(input); 37 | switch (index) { 38 | case 0: 39 | return Status.active; 40 | case 1: 41 | return Status.inActive; 42 | default: 43 | throw Exception('Status: Invalid variant index: "$index"'); 44 | } 45 | } 46 | 47 | @override 48 | void encodeTo( 49 | Status value, 50 | _i1.Output output, 51 | ) { 52 | _i1.U8Codec.codec.encodeTo( 53 | value.codecIndex, 54 | output, 55 | ); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /lib/application/chain/wetee/wetee_gen/types/wetee_org/status.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: no_leading_underscores_for_library_prefixes 2 | import 'dart:typed_data' as _i2; 3 | 4 | import 'package:polkadart/scale_codec.dart' as _i1; 5 | 6 | enum Status { 7 | active('Active', 0), 8 | inActive('InActive', 1); 9 | 10 | const Status( 11 | this.variantName, 12 | this.codecIndex, 13 | ); 14 | 15 | factory Status.decode(_i1.Input input) { 16 | return codec.decode(input); 17 | } 18 | 19 | final String variantName; 20 | 21 | final int codecIndex; 22 | 23 | static const $StatusCodec codec = $StatusCodec(); 24 | 25 | String toJson() => variantName; 26 | _i2.Uint8List encode() { 27 | return codec.encode(this); 28 | } 29 | } 30 | 31 | class $StatusCodec with _i1.Codec { 32 | const $StatusCodec(); 33 | 34 | @override 35 | Status decode(_i1.Input input) { 36 | final index = _i1.U8Codec.codec.decode(input); 37 | switch (index) { 38 | case 0: 39 | return Status.active; 40 | case 1: 41 | return Status.inActive; 42 | default: 43 | throw Exception('Status: Invalid variant index: "$index"'); 44 | } 45 | } 46 | 47 | @override 48 | void encodeTo( 49 | Status value, 50 | _i1.Output output, 51 | ) { 52 | _i1.U8Codec.codec.encodeTo( 53 | value.codecIndex, 54 | output, 55 | ); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /lib/application/chain/wetee/wetee_gen/types/wetee_project/status.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: no_leading_underscores_for_library_prefixes 2 | import 'dart:typed_data' as _i2; 3 | 4 | import 'package:polkadart/scale_codec.dart' as _i1; 5 | 6 | enum Status { 7 | active('Active', 0), 8 | inActive('InActive', 1); 9 | 10 | const Status( 11 | this.variantName, 12 | this.codecIndex, 13 | ); 14 | 15 | factory Status.decode(_i1.Input input) { 16 | return codec.decode(input); 17 | } 18 | 19 | final String variantName; 20 | 21 | final int codecIndex; 22 | 23 | static const $StatusCodec codec = $StatusCodec(); 24 | 25 | String toJson() => variantName; 26 | _i2.Uint8List encode() { 27 | return codec.encode(this); 28 | } 29 | } 30 | 31 | class $StatusCodec with _i1.Codec { 32 | const $StatusCodec(); 33 | 34 | @override 35 | Status decode(_i1.Input input) { 36 | final index = _i1.U8Codec.codec.decode(input); 37 | switch (index) { 38 | case 0: 39 | return Status.active; 40 | case 1: 41 | return Status.inActive; 42 | default: 43 | throw Exception('Status: Invalid variant index: "$index"'); 44 | } 45 | } 46 | 47 | @override 48 | void encodeTo( 49 | Status value, 50 | _i1.Output output, 51 | ) { 52 | _i1.U8Codec.codec.encodeTo( 53 | value.codecIndex, 54 | output, 55 | ); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /test/user_avatar_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:dtim/router.dart'; 2 | import 'package:dtim/application/store/theme.dart'; 3 | import 'package:dtim/domain/utils/screen/screen.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:flutter_test/flutter_test.dart'; 6 | 7 | import 'package:dtim/infra/components/avatar.dart'; 8 | 9 | void main() { 10 | testWidgets("test user_avatar.dart", (WidgetTester tester) async { 11 | initScreen(1200); 12 | 13 | await tester.pumpWidget( 14 | MaterialApp( 15 | theme: getDefaultTheme(), 16 | navigatorKey: rootNavigatorKey, 17 | home: const Scaffold( 18 | body: BaseAvatar( 19 | "https://www.asyou.me/static/temp/images/icon-152x152.png", 20 | true, 21 | 40, 22 | ), 23 | ), 24 | ), 25 | ); 26 | await tester.pumpAndSettle(); 27 | }); 28 | 29 | testWidgets("test user_avatar.dart", (WidgetTester tester) async { 30 | initScreen(1200); 31 | await tester.pumpWidget( 32 | MaterialApp( 33 | theme: getDefaultTheme(), 34 | navigatorKey: rootNavigatorKey, 35 | home: const Scaffold( 36 | body: BaseAvatarWithPop( 37 | "1", 38 | "name", 39 | true, 40 | 40, 41 | ), 42 | ), 43 | ), 44 | ); 45 | await tester.pumpAndSettle(); 46 | }); 47 | } 48 | -------------------------------------------------------------------------------- /lib/application/chain/wetee/wetee_gen/types/pallet_utility/pallet/error.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: no_leading_underscores_for_library_prefixes 2 | import 'dart:typed_data' as _i2; 3 | 4 | import 'package:polkadart/scale_codec.dart' as _i1; 5 | 6 | /// The `Error` enum of this pallet. 7 | enum Error { 8 | /// Too many calls batched. 9 | tooManyCalls('TooManyCalls', 0); 10 | 11 | const Error( 12 | this.variantName, 13 | this.codecIndex, 14 | ); 15 | 16 | factory Error.decode(_i1.Input input) { 17 | return codec.decode(input); 18 | } 19 | 20 | final String variantName; 21 | 22 | final int codecIndex; 23 | 24 | static const $ErrorCodec codec = $ErrorCodec(); 25 | 26 | String toJson() => variantName; 27 | _i2.Uint8List encode() { 28 | return codec.encode(this); 29 | } 30 | } 31 | 32 | class $ErrorCodec with _i1.Codec { 33 | const $ErrorCodec(); 34 | 35 | @override 36 | Error decode(_i1.Input input) { 37 | final index = _i1.U8Codec.codec.decode(input); 38 | switch (index) { 39 | case 0: 40 | return Error.tooManyCalls; 41 | default: 42 | throw Exception('Error: Invalid variant index: "$index"'); 43 | } 44 | } 45 | 46 | @override 47 | void encodeTo( 48 | Error value, 49 | _i1.Output output, 50 | ) { 51 | _i1.U8Codec.codec.encodeTo( 52 | value.codecIndex, 53 | output, 54 | ); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /lib/application/chain/wetee/wetee_gen/types/wetee_runtime/worker/message_origin.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: no_leading_underscores_for_library_prefixes 2 | import 'dart:typed_data' as _i2; 3 | 4 | import 'package:polkadart/scale_codec.dart' as _i1; 5 | 6 | enum MessageOrigin { 7 | work('Work', 0); 8 | 9 | const MessageOrigin( 10 | this.variantName, 11 | this.codecIndex, 12 | ); 13 | 14 | factory MessageOrigin.decode(_i1.Input input) { 15 | return codec.decode(input); 16 | } 17 | 18 | final String variantName; 19 | 20 | final int codecIndex; 21 | 22 | static const $MessageOriginCodec codec = $MessageOriginCodec(); 23 | 24 | String toJson() => variantName; 25 | _i2.Uint8List encode() { 26 | return codec.encode(this); 27 | } 28 | } 29 | 30 | class $MessageOriginCodec with _i1.Codec { 31 | const $MessageOriginCodec(); 32 | 33 | @override 34 | MessageOrigin decode(_i1.Input input) { 35 | final index = _i1.U8Codec.codec.decode(input); 36 | switch (index) { 37 | case 0: 38 | return MessageOrigin.work; 39 | default: 40 | throw Exception('MessageOrigin: Invalid variant index: "$index"'); 41 | } 42 | } 43 | 44 | @override 45 | void encodeTo( 46 | MessageOrigin value, 47 | _i1.Output output, 48 | ) { 49 | _i1.U8Codec.codec.encodeTo( 50 | value.codecIndex, 51 | output, 52 | ); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /lib/application/chain/wetee/wetee_gen/types/pallet_transaction_payment/releases.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: no_leading_underscores_for_library_prefixes 2 | import 'dart:typed_data' as _i2; 3 | 4 | import 'package:polkadart/scale_codec.dart' as _i1; 5 | 6 | enum Releases { 7 | v1Ancient('V1Ancient', 0), 8 | v2('V2', 1); 9 | 10 | const Releases( 11 | this.variantName, 12 | this.codecIndex, 13 | ); 14 | 15 | factory Releases.decode(_i1.Input input) { 16 | return codec.decode(input); 17 | } 18 | 19 | final String variantName; 20 | 21 | final int codecIndex; 22 | 23 | static const $ReleasesCodec codec = $ReleasesCodec(); 24 | 25 | String toJson() => variantName; 26 | _i2.Uint8List encode() { 27 | return codec.encode(this); 28 | } 29 | } 30 | 31 | class $ReleasesCodec with _i1.Codec { 32 | const $ReleasesCodec(); 33 | 34 | @override 35 | Releases decode(_i1.Input input) { 36 | final index = _i1.U8Codec.codec.decode(input); 37 | switch (index) { 38 | case 0: 39 | return Releases.v1Ancient; 40 | case 1: 41 | return Releases.v2; 42 | default: 43 | throw Exception('Releases: Invalid variant index: "$index"'); 44 | } 45 | } 46 | 47 | @override 48 | void encodeTo( 49 | Releases value, 50 | _i1.Output output, 51 | ) { 52 | _i1.U8Codec.codec.encodeTo( 53 | value.codecIndex, 54 | output, 55 | ); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /lib/infra/components/setting/utils/platform_utils.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/foundation.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | enum DevicePlatform { 5 | /// Android: 6 | android, 7 | 8 | /// Fuchsia: 9 | fuchsia, 10 | 11 | /// iOS: 12 | iOS, 13 | 14 | /// Linux: 15 | linux, 16 | 17 | /// macOS: 18 | macOS, 19 | 20 | /// Windows: 21 | windows, 22 | 23 | /// Web 24 | web, 25 | 26 | /// Use this to specify you want to use the default device platform 27 | device, 28 | } 29 | 30 | class PlatformUtils { 31 | static DevicePlatform detectPlatform(BuildContext context) { 32 | if (kIsWeb) return DevicePlatform.web; 33 | 34 | final platform = Theme.of(context).platform; 35 | 36 | switch (platform) { 37 | case TargetPlatform.android: 38 | return DevicePlatform.android; 39 | case TargetPlatform.fuchsia: 40 | return DevicePlatform.fuchsia; 41 | case TargetPlatform.iOS: 42 | return DevicePlatform.iOS; 43 | case TargetPlatform.linux: 44 | return DevicePlatform.linux; 45 | case TargetPlatform.macOS: 46 | return DevicePlatform.macOS; 47 | case TargetPlatform.windows: 48 | return DevicePlatform.windows; 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /lib/application/chain/wetee/wetee_gen/types/wetee_primitives/types/t_e_e_version.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: no_leading_underscores_for_library_prefixes 2 | import 'dart:typed_data' as _i2; 3 | 4 | import 'package:polkadart/scale_codec.dart' as _i1; 5 | 6 | enum TEEVersion { 7 | sgx('SGX', 0), 8 | cvm('CVM', 1); 9 | 10 | const TEEVersion( 11 | this.variantName, 12 | this.codecIndex, 13 | ); 14 | 15 | factory TEEVersion.decode(_i1.Input input) { 16 | return codec.decode(input); 17 | } 18 | 19 | final String variantName; 20 | 21 | final int codecIndex; 22 | 23 | static const $TEEVersionCodec codec = $TEEVersionCodec(); 24 | 25 | String toJson() => variantName; 26 | _i2.Uint8List encode() { 27 | return codec.encode(this); 28 | } 29 | } 30 | 31 | class $TEEVersionCodec with _i1.Codec { 32 | const $TEEVersionCodec(); 33 | 34 | @override 35 | TEEVersion decode(_i1.Input input) { 36 | final index = _i1.U8Codec.codec.decode(input); 37 | switch (index) { 38 | case 0: 39 | return TEEVersion.sgx; 40 | case 1: 41 | return TEEVersion.cvm; 42 | default: 43 | throw Exception('TEEVersion: Invalid variant index: "$index"'); 44 | } 45 | } 46 | 47 | @override 48 | void encodeTo( 49 | TEEVersion value, 50 | _i1.Output output, 51 | ) { 52 | _i1.U8Codec.codec.encodeTo( 53 | value.codecIndex, 54 | output, 55 | ); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /lib/infra/components/dao/member_card.dart: -------------------------------------------------------------------------------- 1 | import 'package:dtim/domain/utils/screen/screen.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | import 'package:dtim/application/store/theme.dart'; 5 | import '../avatar.dart'; 6 | import 'text.dart'; 7 | 8 | class MemberCard extends StatelessWidget { 9 | final String? label; 10 | const MemberCard({super.key, required this.label}); 11 | 12 | @override 13 | Widget build(BuildContext context) { 14 | final constTheme = Theme.of(context).extension()!; 15 | return Container( 16 | width: 250.w, 17 | constraints: BoxConstraints(minWidth: isPc() ? 140.w : 100.w, maxWidth: double.maxFinite), 18 | padding: EdgeInsets.all(10.w), 19 | decoration: BoxDecoration( 20 | borderRadius: BorderRadius.circular(6.w), 21 | color: constTheme.centerChannelColor.withOpacity(0.05), 22 | ), 23 | child: Row( 24 | crossAxisAlignment: CrossAxisAlignment.start, 25 | children: [ 26 | BaseAvatar( 27 | label ?? "", 28 | true, 29 | 50.w, 30 | color: constTheme.centerChannelColor, 31 | ), 32 | SizedBox( 33 | width: 10.w, 34 | ), 35 | Expanded( 36 | child: PrimaryText( 37 | text: label!, 38 | size: 12.w, 39 | ), 40 | ), 41 | ], 42 | ), 43 | ); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /windows/runner/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include "flutter_window.h" 6 | #include "utils.h" 7 | 8 | int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev, 9 | _In_ wchar_t *command_line, _In_ int show_command) { 10 | // Attach to console when present (e.g., 'flutter run') or create a 11 | // new console when running with a debugger. 12 | if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) { 13 | CreateAndAttachConsole(); 14 | } 15 | 16 | // Initialize COM, so that it is available for use in the library and/or 17 | // plugins. 18 | ::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED); 19 | 20 | flutter::DartProject project(L"data"); 21 | 22 | std::vector command_line_arguments = 23 | GetCommandLineArguments(); 24 | 25 | project.set_dart_entrypoint_arguments(std::move(command_line_arguments)); 26 | 27 | FlutterWindow window(project); 28 | Win32Window::Point origin(10, 10); 29 | Win32Window::Size size(1280, 720); 30 | if (!window.Create(L"dtim", 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 | -------------------------------------------------------------------------------- /lib/application/chain/wetee/wetee_gen/types/pallet_balances/types/reasons.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: no_leading_underscores_for_library_prefixes 2 | import 'dart:typed_data' as _i2; 3 | 4 | import 'package:polkadart/scale_codec.dart' as _i1; 5 | 6 | enum Reasons { 7 | fee('Fee', 0), 8 | misc('Misc', 1), 9 | all('All', 2); 10 | 11 | const Reasons( 12 | this.variantName, 13 | this.codecIndex, 14 | ); 15 | 16 | factory Reasons.decode(_i1.Input input) { 17 | return codec.decode(input); 18 | } 19 | 20 | final String variantName; 21 | 22 | final int codecIndex; 23 | 24 | static const $ReasonsCodec codec = $ReasonsCodec(); 25 | 26 | String toJson() => variantName; 27 | _i2.Uint8List encode() { 28 | return codec.encode(this); 29 | } 30 | } 31 | 32 | class $ReasonsCodec with _i1.Codec { 33 | const $ReasonsCodec(); 34 | 35 | @override 36 | Reasons decode(_i1.Input input) { 37 | final index = _i1.U8Codec.codec.decode(input); 38 | switch (index) { 39 | case 0: 40 | return Reasons.fee; 41 | case 1: 42 | return Reasons.misc; 43 | case 2: 44 | return Reasons.all; 45 | default: 46 | throw Exception('Reasons: Invalid variant index: "$index"'); 47 | } 48 | } 49 | 50 | @override 51 | void encodeTo( 52 | Reasons value, 53 | _i1.Output output, 54 | ) { 55 | _i1.U8Codec.codec.encodeTo( 56 | value.codecIndex, 57 | output, 58 | ); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /lib/application/chain/wetee/wetee_gen/types/wetee_project/review_opinion.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: no_leading_underscores_for_library_prefixes 2 | import 'dart:typed_data' as _i2; 3 | 4 | import 'package:polkadart/scale_codec.dart' as _i1; 5 | 6 | enum ReviewOpinion { 7 | yes('YES', 0), 8 | no('NO', 1); 9 | 10 | const ReviewOpinion( 11 | this.variantName, 12 | this.codecIndex, 13 | ); 14 | 15 | factory ReviewOpinion.decode(_i1.Input input) { 16 | return codec.decode(input); 17 | } 18 | 19 | final String variantName; 20 | 21 | final int codecIndex; 22 | 23 | static const $ReviewOpinionCodec codec = $ReviewOpinionCodec(); 24 | 25 | String toJson() => variantName; 26 | _i2.Uint8List encode() { 27 | return codec.encode(this); 28 | } 29 | } 30 | 31 | class $ReviewOpinionCodec with _i1.Codec { 32 | const $ReviewOpinionCodec(); 33 | 34 | @override 35 | ReviewOpinion decode(_i1.Input input) { 36 | final index = _i1.U8Codec.codec.decode(input); 37 | switch (index) { 38 | case 0: 39 | return ReviewOpinion.yes; 40 | case 1: 41 | return ReviewOpinion.no; 42 | default: 43 | throw Exception('ReviewOpinion: Invalid variant index: "$index"'); 44 | } 45 | } 46 | 47 | @override 48 | void encodeTo( 49 | ReviewOpinion value, 50 | _i1.Output output, 51 | ) { 52 | _i1.U8Codec.codec.encodeTo( 53 | value.codecIndex, 54 | output, 55 | ); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /lib/domain/models/system.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'system.dart'; 4 | 5 | // ************************************************************************** 6 | // TypeAdapterGenerator 7 | // ************************************************************************** 8 | 9 | class SystemAdapter extends TypeAdapter { 10 | @override 11 | final int typeId = 6; 12 | 13 | @override 14 | System read(BinaryReader reader) { 15 | final numOfFields = reader.readByte(); 16 | final fields = { 17 | for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(), 18 | }; 19 | return System( 20 | width: fields[1] as double, 21 | height: fields[2] as double, 22 | theme: fields[3] as String, 23 | )..loginAccount = fields[4] as String?; 24 | } 25 | 26 | @override 27 | void write(BinaryWriter writer, System obj) { 28 | writer 29 | ..writeByte(4) 30 | ..writeByte(1) 31 | ..write(obj.width) 32 | ..writeByte(2) 33 | ..write(obj.height) 34 | ..writeByte(3) 35 | ..write(obj.theme) 36 | ..writeByte(4) 37 | ..write(obj.loginAccount); 38 | } 39 | 40 | @override 41 | int get hashCode => typeId.hashCode; 42 | 43 | @override 44 | bool operator ==(Object other) => 45 | identical(this, other) || 46 | other is SystemAdapter && 47 | runtimeType == other.runtimeType && 48 | typeId == other.typeId; 49 | } 50 | -------------------------------------------------------------------------------- /lib/application/chain/wetee/wetee_gen/types/pallet_contracts/wasm/determinism.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: no_leading_underscores_for_library_prefixes 2 | import 'dart:typed_data' as _i2; 3 | 4 | import 'package:polkadart/scale_codec.dart' as _i1; 5 | 6 | enum Determinism { 7 | enforced('Enforced', 0), 8 | relaxed('Relaxed', 1); 9 | 10 | const Determinism( 11 | this.variantName, 12 | this.codecIndex, 13 | ); 14 | 15 | factory Determinism.decode(_i1.Input input) { 16 | return codec.decode(input); 17 | } 18 | 19 | final String variantName; 20 | 21 | final int codecIndex; 22 | 23 | static const $DeterminismCodec codec = $DeterminismCodec(); 24 | 25 | String toJson() => variantName; 26 | _i2.Uint8List encode() { 27 | return codec.encode(this); 28 | } 29 | } 30 | 31 | class $DeterminismCodec with _i1.Codec { 32 | const $DeterminismCodec(); 33 | 34 | @override 35 | Determinism decode(_i1.Input input) { 36 | final index = _i1.U8Codec.codec.decode(input); 37 | switch (index) { 38 | case 0: 39 | return Determinism.enforced; 40 | case 1: 41 | return Determinism.relaxed; 42 | default: 43 | throw Exception('Determinism: Invalid variant index: "$index"'); 44 | } 45 | } 46 | 47 | @override 48 | void encodeTo( 49 | Determinism value, 50 | _i1.Output output, 51 | ) { 52 | _i1.U8Codec.codec.encodeTo( 53 | value.codecIndex, 54 | output, 55 | ); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /lib/application/chain/wetee/wetee_gen/types/wetee_primitives/types/work_type.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: no_leading_underscores_for_library_prefixes 2 | import 'dart:typed_data' as _i2; 3 | 4 | import 'package:polkadart/scale_codec.dart' as _i1; 5 | 6 | enum WorkType { 7 | app('APP', 0), 8 | task('TASK', 1), 9 | gpu('GPU', 2); 10 | 11 | const WorkType( 12 | this.variantName, 13 | this.codecIndex, 14 | ); 15 | 16 | factory WorkType.decode(_i1.Input input) { 17 | return codec.decode(input); 18 | } 19 | 20 | final String variantName; 21 | 22 | final int codecIndex; 23 | 24 | static const $WorkTypeCodec codec = $WorkTypeCodec(); 25 | 26 | String toJson() => variantName; 27 | _i2.Uint8List encode() { 28 | return codec.encode(this); 29 | } 30 | } 31 | 32 | class $WorkTypeCodec with _i1.Codec { 33 | const $WorkTypeCodec(); 34 | 35 | @override 36 | WorkType decode(_i1.Input input) { 37 | final index = _i1.U8Codec.codec.decode(input); 38 | switch (index) { 39 | case 0: 40 | return WorkType.app; 41 | case 1: 42 | return WorkType.task; 43 | case 2: 44 | return WorkType.gpu; 45 | default: 46 | throw Exception('WorkType: Invalid variant index: "$index"'); 47 | } 48 | } 49 | 50 | @override 51 | void encodeTo( 52 | WorkType value, 53 | _i1.Output output, 54 | ) { 55 | _i1.U8Codec.codec.encodeTo( 56 | value.codecIndex, 57 | output, 58 | ); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /lib/application/chain/wetee/key_pair.dart: -------------------------------------------------------------------------------- 1 | import 'package:convert/convert.dart'; 2 | import 'package:dtim/domain/models/account.dart'; 3 | import 'package:polkadart_keyring/polkadart_keyring.dart'; 4 | import 'package:sr25519/sr25519.dart' show Bip39; 5 | 6 | // 助记词转换为账户 7 | Future getSeedPhrase({ 8 | required String seedStr, 9 | required String name, 10 | required String password, 11 | }) async { 12 | final keyPair = await KeyPair.sr25519.fromMnemonic(seedStr, password); 13 | final address = keyPair.address; 14 | 15 | return ChainAccountData( 16 | hex.encode(keyPair.publicKey.bytes), 17 | seedStr, 18 | ChainDataEncoding( 19 | [""], 20 | 'mnemonic', 21 | 'sr25519', 22 | ), 23 | { 24 | 'ss58Address': address, 25 | 'name': name, 26 | }, 27 | ); 28 | } 29 | 30 | // 助记词转换为账户 31 | Future getFromUri({ 32 | required String uri, 33 | required String name, 34 | required String password, 35 | }) async { 36 | final keyPair = await KeyPair.sr25519.fromUri(uri, password); 37 | final address = keyPair.address; 38 | 39 | return ChainAccountData( 40 | hex.encode(keyPair.publicKey.bytes), 41 | uri, 42 | ChainDataEncoding( 43 | [""], 44 | 'uri', 45 | 'sr25519', 46 | ), 47 | { 48 | 'ss58Address': address, 49 | 'name': name, 50 | }, 51 | ); 52 | } 53 | 54 | 55 | // 生成助记词 56 | List seedGenerate() { 57 | return Bip39.generateMnemonic().words; 58 | } 59 | -------------------------------------------------------------------------------- /lib/application/chain/wetee/wetee_gen/types/frame_support/traits/tokens/misc/balance_status.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: no_leading_underscores_for_library_prefixes 2 | import 'dart:typed_data' as _i2; 3 | 4 | import 'package:polkadart/scale_codec.dart' as _i1; 5 | 6 | enum BalanceStatus { 7 | free('Free', 0), 8 | reserved('Reserved', 1); 9 | 10 | const BalanceStatus( 11 | this.variantName, 12 | this.codecIndex, 13 | ); 14 | 15 | factory BalanceStatus.decode(_i1.Input input) { 16 | return codec.decode(input); 17 | } 18 | 19 | final String variantName; 20 | 21 | final int codecIndex; 22 | 23 | static const $BalanceStatusCodec codec = $BalanceStatusCodec(); 24 | 25 | String toJson() => variantName; 26 | _i2.Uint8List encode() { 27 | return codec.encode(this); 28 | } 29 | } 30 | 31 | class $BalanceStatusCodec with _i1.Codec { 32 | const $BalanceStatusCodec(); 33 | 34 | @override 35 | BalanceStatus decode(_i1.Input input) { 36 | final index = _i1.U8Codec.codec.decode(input); 37 | switch (index) { 38 | case 0: 39 | return BalanceStatus.free; 40 | case 1: 41 | return BalanceStatus.reserved; 42 | default: 43 | throw Exception('BalanceStatus: Invalid variant index: "$index"'); 44 | } 45 | } 46 | 47 | @override 48 | void encodeTo( 49 | BalanceStatus value, 50 | _i1.Output output, 51 | ) { 52 | _i1.U8Codec.codec.encodeTo( 53 | value.codecIndex, 54 | output, 55 | ); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /lib/application/chain/wetee/wetee_gen/types/wetee_treasury/pallet/error.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: no_leading_underscores_for_library_prefixes 2 | import 'dart:typed_data' as _i2; 3 | 4 | import 'package:polkadart/scale_codec.dart' as _i1; 5 | 6 | /// The `Error` enum of this pallet. 7 | enum Error { 8 | /// DAO id mismatch 9 | maxBalanceExceeded('MaxBalanceExceeded', 0), 10 | badDaoOrigin('BadDaoOrigin', 1); 11 | 12 | const Error( 13 | this.variantName, 14 | this.codecIndex, 15 | ); 16 | 17 | factory Error.decode(_i1.Input input) { 18 | return codec.decode(input); 19 | } 20 | 21 | final String variantName; 22 | 23 | final int codecIndex; 24 | 25 | static const $ErrorCodec codec = $ErrorCodec(); 26 | 27 | String toJson() => variantName; 28 | _i2.Uint8List encode() { 29 | return codec.encode(this); 30 | } 31 | } 32 | 33 | class $ErrorCodec with _i1.Codec { 34 | const $ErrorCodec(); 35 | 36 | @override 37 | Error decode(_i1.Input input) { 38 | final index = _i1.U8Codec.codec.decode(input); 39 | switch (index) { 40 | case 0: 41 | return Error.maxBalanceExceeded; 42 | case 1: 43 | return Error.badDaoOrigin; 44 | default: 45 | throw Exception('Error: Invalid variant index: "$index"'); 46 | } 47 | } 48 | 49 | @override 50 | void encodeTo( 51 | Error value, 52 | _i1.Output output, 53 | ) { 54 | _i1.U8Codec.codec.encodeTo( 55 | value.codecIndex, 56 | output, 57 | ); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/domain/utils/matrix_sdk_extensions/event_extension.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/foundation.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | import 'package:matrix/matrix.dart'; 5 | 6 | import 'package:dtim/infra/components/components.dart'; 7 | import 'matrix_file_extension.dart'; 8 | import '../string.dart'; 9 | 10 | extension LocalizedBody on Event { 11 | Future> _getFile(BuildContext context) => waitFutureLoading( 12 | context: context, 13 | future: downloadAndDecryptAttachment, 14 | ); 15 | 16 | void saveFile(BuildContext context) async { 17 | final matrixFile = await _getFile(context); 18 | 19 | matrixFile.result?.save(context); 20 | } 21 | 22 | void shareFile(BuildContext context) async { 23 | final matrixFile = await _getFile(context); 24 | 25 | matrixFile.result?.share(context); 26 | } 27 | 28 | bool get isAttachmentSmallEnough => infoMap['size'] is int && infoMap['size'] < room.client.database!.maxFileSize; 29 | 30 | bool get isThumbnailSmallEnough => 31 | thumbnailInfoMap['size'] is int && thumbnailInfoMap['size'] < room.client.database!.maxFileSize; 32 | 33 | bool get showThumbnail => 34 | [MessageTypes.Image, MessageTypes.Sticker, MessageTypes.Video].contains(messageType) && 35 | (kIsWeb || isAttachmentSmallEnough || isThumbnailSmallEnough || (content['url'] is String)); 36 | 37 | String? get sizeString => content.tryGetMap('info')?.tryGet('size')?.sizeString; 38 | } 39 | -------------------------------------------------------------------------------- /integration_test/extensions/wait_for.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_test/flutter_test.dart'; 2 | 3 | /// Workaround for https://github.com/flutter/flutter/issues/88765 4 | extension WaitForExtension on WidgetTester { 5 | Future waitFor( 6 | Finder finder, { 7 | Duration timeout = const Duration(seconds: 20), 8 | bool skipPumpAndSettle = false, 9 | }) async { 10 | final end = DateTime.now().add(timeout); 11 | 12 | do { 13 | if (DateTime.now().isAfter(end)) { 14 | throw Exception('Timed out waiting for $finder'); 15 | } 16 | 17 | if (!skipPumpAndSettle) { 18 | await pumpAndSettle(); 19 | } 20 | await Future.delayed(const Duration(milliseconds: 100)); 21 | } while (finder.evaluate().isEmpty); 22 | } 23 | } 24 | 25 | extension MaybeUppercaseFinder on CommonFinders { 26 | /// On Android some button labels are in uppercase while on iOS they 27 | /// are not. This method tries both. 28 | Finder maybeUppercaseText( 29 | String text, { 30 | bool findRichText = false, 31 | bool skipOffstage = true, 32 | }) { 33 | try { 34 | final finder = find.text( 35 | text.toUpperCase(), 36 | findRichText: findRichText, 37 | skipOffstage: skipOffstage, 38 | ); 39 | expect(finder, findsOneWidget); 40 | return finder; 41 | } catch (_) { 42 | return find.text( 43 | text, 44 | findRichText: findRichText, 45 | skipOffstage: skipOffstage, 46 | ); 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /lib/application/chain/wetee/wetee_gen/pallets/randomness_collective_flip.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: no_leading_underscores_for_library_prefixes 2 | import 'dart:async' as _i4; 3 | import 'dart:typed_data' as _i5; 4 | 5 | import 'package:polkadart/polkadart.dart' as _i1; 6 | import 'package:polkadart/scale_codec.dart' as _i3; 7 | 8 | import '../types/primitive_types/h256.dart' as _i2; 9 | 10 | class Queries { 11 | const Queries(this.__api); 12 | 13 | final _i1.StateApi __api; 14 | 15 | final _i1.StorageValue> _randomMaterial = 16 | const _i1.StorageValue>( 17 | prefix: 'RandomnessCollectiveFlip', 18 | storage: 'RandomMaterial', 19 | valueCodec: _i3.SequenceCodec<_i2.H256>(_i2.H256Codec()), 20 | ); 21 | 22 | /// Series of block headers from the last 81 blocks that acts as random seed material. This 23 | /// is arranged as a ring buffer with `block_number % 81` being the index into the `Vec` of 24 | /// the oldest hash. 25 | _i4.Future> randomMaterial({_i1.BlockHash? at}) async { 26 | final hashedKey = _randomMaterial.hashedKey(); 27 | final bytes = await __api.getStorage( 28 | hashedKey, 29 | at: at, 30 | ); 31 | if (bytes != null) { 32 | return _randomMaterial.decodeValue(bytes); 33 | } 34 | return []; /* Default */ 35 | } 36 | 37 | /// Returns the storage key for `randomMaterial`. 38 | _i5.Uint8List randomMaterialKey() { 39 | final hashedKey = _randomMaterial.hashedKey(); 40 | return hashedKey; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /lib/application/chain/wetee/wetee_gen/types/wetee_tee_bridge/t_e_e_call_type.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: no_leading_underscores_for_library_prefixes 2 | import 'dart:typed_data' as _i2; 3 | 4 | import 'package:polkadart/scale_codec.dart' as _i1; 5 | 6 | enum TEECallType { 7 | ink('Ink', 0), 8 | evm('Evm', 1), 9 | pallet('Pallet', 2); 10 | 11 | const TEECallType( 12 | this.variantName, 13 | this.codecIndex, 14 | ); 15 | 16 | factory TEECallType.decode(_i1.Input input) { 17 | return codec.decode(input); 18 | } 19 | 20 | final String variantName; 21 | 22 | final int codecIndex; 23 | 24 | static const $TEECallTypeCodec codec = $TEECallTypeCodec(); 25 | 26 | String toJson() => variantName; 27 | _i2.Uint8List encode() { 28 | return codec.encode(this); 29 | } 30 | } 31 | 32 | class $TEECallTypeCodec with _i1.Codec { 33 | const $TEECallTypeCodec(); 34 | 35 | @override 36 | TEECallType decode(_i1.Input input) { 37 | final index = _i1.U8Codec.codec.decode(input); 38 | switch (index) { 39 | case 0: 40 | return TEECallType.ink; 41 | case 1: 42 | return TEECallType.evm; 43 | case 2: 44 | return TEECallType.pallet; 45 | default: 46 | throw Exception('TEECallType: Invalid variant index: "$index"'); 47 | } 48 | } 49 | 50 | @override 51 | void encodeTo( 52 | TEECallType value, 53 | _i1.Output output, 54 | ) { 55 | _i1.U8Codec.codec.encodeTo( 56 | value.codecIndex, 57 | output, 58 | ); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /lib/infra/components/name_with_emoji.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_emoji/flutter_emoji.dart'; 3 | 4 | import 'package:dtim/application/store/theme.dart'; 5 | import 'package:dtim/domain/utils/screen/screen.dart'; 6 | 7 | // ignore: must_be_immutable 8 | class WidgetUserNameEmoji extends StatelessWidget { 9 | final String name; 10 | String? emoji; 11 | WidgetUserNameEmoji( 12 | this.name, 13 | String? emoji, { 14 | super.key, 15 | }); 16 | 17 | @override 18 | Widget build(BuildContext ctx) { 19 | final parser = EmojiParser(); 20 | final constTheme = Theme.of(ctx).extension()!; 21 | 22 | return RichText( 23 | maxLines: 1, 24 | overflow: TextOverflow.ellipsis, 25 | text: TextSpan( 26 | text: name, 27 | style: TextStyle( 28 | color: constTheme.sidebarText, 29 | fontWeight: FontWeight.normal, 30 | fontSize: 15.w, 31 | overflow: TextOverflow.ellipsis, 32 | ), 33 | children: [ 34 | (emoji != null) 35 | ? WidgetSpan( 36 | child: Transform.translate( 37 | offset: const Offset(10.0, -5.0), 38 | child: Text( 39 | parser.emojify(emoji!).toString(), 40 | style: TextStyle(fontSize: 15.w), 41 | ), 42 | ), 43 | ) 44 | : const TextSpan(text: ''), 45 | ], 46 | ), 47 | ); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /lib/application/chain/wetee/wetee_gen/types/wetee_gov/prop_status.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: no_leading_underscores_for_library_prefixes 2 | import 'dart:typed_data' as _i2; 3 | 4 | import 'package:polkadart/scale_codec.dart' as _i1; 5 | 6 | enum PropStatus { 7 | ongoing('Ongoing', 0), 8 | approved('Approved', 1), 9 | rejected('Rejected', 2); 10 | 11 | const PropStatus( 12 | this.variantName, 13 | this.codecIndex, 14 | ); 15 | 16 | factory PropStatus.decode(_i1.Input input) { 17 | return codec.decode(input); 18 | } 19 | 20 | final String variantName; 21 | 22 | final int codecIndex; 23 | 24 | static const $PropStatusCodec codec = $PropStatusCodec(); 25 | 26 | String toJson() => variantName; 27 | _i2.Uint8List encode() { 28 | return codec.encode(this); 29 | } 30 | } 31 | 32 | class $PropStatusCodec with _i1.Codec { 33 | const $PropStatusCodec(); 34 | 35 | @override 36 | PropStatus decode(_i1.Input input) { 37 | final index = _i1.U8Codec.codec.decode(input); 38 | switch (index) { 39 | case 0: 40 | return PropStatus.ongoing; 41 | case 1: 42 | return PropStatus.approved; 43 | case 2: 44 | return PropStatus.rejected; 45 | default: 46 | throw Exception('PropStatus: Invalid variant index: "$index"'); 47 | } 48 | } 49 | 50 | @override 51 | void encodeTo( 52 | PropStatus value, 53 | _i1.Output output, 54 | ) { 55 | _i1.U8Codec.codec.encodeTo( 56 | value.codecIndex, 57 | output, 58 | ); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /lib/application/chain/wetee/wetee_gen/types/pallet_contracts/pallet/hold_reason.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: no_leading_underscores_for_library_prefixes 2 | import 'dart:typed_data' as _i2; 3 | 4 | import 'package:polkadart/scale_codec.dart' as _i1; 5 | 6 | enum HoldReason { 7 | codeUploadDepositReserve('CodeUploadDepositReserve', 0), 8 | storageDepositReserve('StorageDepositReserve', 1); 9 | 10 | const HoldReason( 11 | this.variantName, 12 | this.codecIndex, 13 | ); 14 | 15 | factory HoldReason.decode(_i1.Input input) { 16 | return codec.decode(input); 17 | } 18 | 19 | final String variantName; 20 | 21 | final int codecIndex; 22 | 23 | static const $HoldReasonCodec codec = $HoldReasonCodec(); 24 | 25 | String toJson() => variantName; 26 | _i2.Uint8List encode() { 27 | return codec.encode(this); 28 | } 29 | } 30 | 31 | class $HoldReasonCodec with _i1.Codec { 32 | const $HoldReasonCodec(); 33 | 34 | @override 35 | HoldReason decode(_i1.Input input) { 36 | final index = _i1.U8Codec.codec.decode(input); 37 | switch (index) { 38 | case 0: 39 | return HoldReason.codeUploadDepositReserve; 40 | case 1: 41 | return HoldReason.storageDepositReserve; 42 | default: 43 | throw Exception('HoldReason: Invalid variant index: "$index"'); 44 | } 45 | } 46 | 47 | @override 48 | void encodeTo( 49 | HoldReason value, 50 | _i1.Output output, 51 | ) { 52 | _i1.U8Codec.codec.encodeTo( 53 | value.codecIndex, 54 | output, 55 | ); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /lib/infra/components/dao/info_card.dart: -------------------------------------------------------------------------------- 1 | import 'package:dtim/domain/utils/screen/screen.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | import 'package:dtim/application/store/theme.dart'; 5 | import 'text.dart'; 6 | 7 | class InfoCard extends StatelessWidget { 8 | final IconData? icon; 9 | final String? label; 10 | final String? amount; 11 | const InfoCard({super.key, required this.icon, required this.label, required this.amount}); 12 | 13 | @override 14 | Widget build(BuildContext context) { 15 | final constTheme = Theme.of(context).extension()!; 16 | return Container( 17 | constraints: BoxConstraints(minWidth: 140.w, maxWidth: double.maxFinite), 18 | padding: EdgeInsets.fromLTRB(20.w, 20.w, 10.w, 20.w), 19 | decoration: BoxDecoration( 20 | borderRadius: BorderRadius.circular(10.w), 21 | color: constTheme.centerChannelColor.withOpacity(0.05), 22 | ), 23 | child: Column( 24 | crossAxisAlignment: CrossAxisAlignment.start, 25 | children: [ 26 | Icon( 27 | icon, 28 | size: 25.w, 29 | color: constTheme.centerChannelColor, 30 | ), 31 | SizedBox(height: 15.w), 32 | PrimaryText( 33 | text: label!, 34 | size: 13.w, 35 | ), 36 | SizedBox(height: 2.w), 37 | PrimaryText( 38 | text: amount!, 39 | size: 15.w, 40 | fontWeight: FontWeight.w800, 41 | ) 42 | ], 43 | ), 44 | ); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /analysis_options.yaml: -------------------------------------------------------------------------------- 1 | # This file configures the analyzer, which statically analyzes Dart code to 2 | # check for errors, warnings, and lints. 3 | # 4 | # The issues identified by the analyzer are surfaced in the UI of Dart-enabled 5 | # IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be 6 | # invoked from the command line by running `flutter analyze`. 7 | 8 | # The following line activates a set of recommended lints for Flutter apps, 9 | # packages, and plugins designed to encourage good coding practices. 10 | include: package:flutter_lints/flutter.yaml 11 | 12 | linter: 13 | # The lint rules applied to this project can be customized in the 14 | # section below to disable rules from the `package:flutter_lints/flutter.yaml` 15 | # included above or to enable additional rules. A list of all available lints 16 | # and their documentation is published at 17 | # https://dart-lang.github.io/linter/lints/index.html. 18 | # 19 | # Instead of disabling a lint rule for the entire project in the 20 | # section below, it can also be suppressed for a single line of code 21 | # or a specific dart file by using the `// ignore: name_of_lint` and 22 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file 23 | # producing the lint. 24 | rules: 25 | # avoid_print: false # Uncomment to disable the `avoid_print` rule 26 | # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule 27 | 28 | # Additional information about this file can be found at 29 | # https://dart.dev/guides/language/analysis-options 30 | -------------------------------------------------------------------------------- /test/loading_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:dtim/router.dart'; 2 | import 'package:dtim/application/store/theme.dart'; 3 | import 'package:dtim/domain/utils/screen/screen.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:flutter_test/flutter_test.dart'; 6 | 7 | import 'package:dtim/infra/components/loading_dialog.dart'; 8 | 9 | void main() { 10 | testWidgets("test loading", (WidgetTester tester) async { 11 | initScreen(1200); 12 | await tester.pumpWidget( 13 | MaterialApp( 14 | navigatorKey: rootNavigatorKey, 15 | theme: getDefaultTheme(), 16 | home: Scaffold( 17 | body: Column( 18 | children: [ 19 | InkWell( 20 | key: const Key('auto_test'), 21 | child: Container( 22 | height: 100, 23 | width: 100, 24 | color: Colors.blue, 25 | ), 26 | onTap: () { 27 | print("test"); 28 | waitFutureLoading( 29 | context: rootNavigatorKey!.currentContext!, 30 | future: () async { 31 | await Future.delayed(const Duration(seconds: 1)); 32 | }, 33 | ); 34 | }, 35 | ), 36 | ], 37 | ), 38 | ), 39 | ), 40 | ); 41 | 42 | await tester.pumpAndSettle(); 43 | // 触发注册按钮点击 44 | await tester.tap(find.byKey(const Key('auto_test'))); 45 | await tester.pumpAndSettle(); 46 | }); 47 | } 48 | -------------------------------------------------------------------------------- /lib/application/chain/wetee/wetee_gen/types/sp_runtime/transactional_error.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: no_leading_underscores_for_library_prefixes 2 | import 'dart:typed_data' as _i2; 3 | 4 | import 'package:polkadart/scale_codec.dart' as _i1; 5 | 6 | enum TransactionalError { 7 | limitReached('LimitReached', 0), 8 | noLayer('NoLayer', 1); 9 | 10 | const TransactionalError( 11 | this.variantName, 12 | this.codecIndex, 13 | ); 14 | 15 | factory TransactionalError.decode(_i1.Input input) { 16 | return codec.decode(input); 17 | } 18 | 19 | final String variantName; 20 | 21 | final int codecIndex; 22 | 23 | static const $TransactionalErrorCodec codec = $TransactionalErrorCodec(); 24 | 25 | String toJson() => variantName; 26 | _i2.Uint8List encode() { 27 | return codec.encode(this); 28 | } 29 | } 30 | 31 | class $TransactionalErrorCodec with _i1.Codec { 32 | const $TransactionalErrorCodec(); 33 | 34 | @override 35 | TransactionalError decode(_i1.Input input) { 36 | final index = _i1.U8Codec.codec.decode(input); 37 | switch (index) { 38 | case 0: 39 | return TransactionalError.limitReached; 40 | case 1: 41 | return TransactionalError.noLayer; 42 | default: 43 | throw Exception('TransactionalError: Invalid variant index: "$index"'); 44 | } 45 | } 46 | 47 | @override 48 | void encodeTo( 49 | TransactionalError value, 50 | _i1.Output output, 51 | ) { 52 | _i1.U8Codec.codec.encodeTo( 53 | value.codecIndex, 54 | output, 55 | ); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /lib/application/chain/wetee/wetee_gen/types/pallet_balances/types/adjustment_direction.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: no_leading_underscores_for_library_prefixes 2 | import 'dart:typed_data' as _i2; 3 | 4 | import 'package:polkadart/scale_codec.dart' as _i1; 5 | 6 | enum AdjustmentDirection { 7 | increase('Increase', 0), 8 | decrease('Decrease', 1); 9 | 10 | const AdjustmentDirection( 11 | this.variantName, 12 | this.codecIndex, 13 | ); 14 | 15 | factory AdjustmentDirection.decode(_i1.Input input) { 16 | return codec.decode(input); 17 | } 18 | 19 | final String variantName; 20 | 21 | final int codecIndex; 22 | 23 | static const $AdjustmentDirectionCodec codec = $AdjustmentDirectionCodec(); 24 | 25 | String toJson() => variantName; 26 | _i2.Uint8List encode() { 27 | return codec.encode(this); 28 | } 29 | } 30 | 31 | class $AdjustmentDirectionCodec with _i1.Codec { 32 | const $AdjustmentDirectionCodec(); 33 | 34 | @override 35 | AdjustmentDirection decode(_i1.Input input) { 36 | final index = _i1.U8Codec.codec.decode(input); 37 | switch (index) { 38 | case 0: 39 | return AdjustmentDirection.increase; 40 | case 1: 41 | return AdjustmentDirection.decrease; 42 | default: 43 | throw Exception('AdjustmentDirection: Invalid variant index: "$index"'); 44 | } 45 | } 46 | 47 | @override 48 | void encodeTo( 49 | AdjustmentDirection value, 50 | _i1.Output output, 51 | ) { 52 | _i1.U8Codec.codec.encodeTo( 53 | value.codecIndex, 54 | output, 55 | ); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /lib/application/chain/wetee/wetee_gen/types/wetee_sudo/pallet/error.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: no_leading_underscores_for_library_prefixes 2 | import 'dart:typed_data' as _i2; 3 | 4 | import 'package:polkadart/scale_codec.dart' as _i1; 5 | 6 | /// The `Error` enum of this pallet. 7 | enum Error { 8 | /// Not a sudo account, nor a dao account. 9 | notSudo('NotSudo', 0), 10 | rootNotExists('RootNotExists', 1), 11 | sudoRunError('SudoRunError', 2); 12 | 13 | const Error( 14 | this.variantName, 15 | this.codecIndex, 16 | ); 17 | 18 | factory Error.decode(_i1.Input input) { 19 | return codec.decode(input); 20 | } 21 | 22 | final String variantName; 23 | 24 | final int codecIndex; 25 | 26 | static const $ErrorCodec codec = $ErrorCodec(); 27 | 28 | String toJson() => variantName; 29 | _i2.Uint8List encode() { 30 | return codec.encode(this); 31 | } 32 | } 33 | 34 | class $ErrorCodec with _i1.Codec { 35 | const $ErrorCodec(); 36 | 37 | @override 38 | Error decode(_i1.Input input) { 39 | final index = _i1.U8Codec.codec.decode(input); 40 | switch (index) { 41 | case 0: 42 | return Error.notSudo; 43 | case 1: 44 | return Error.rootNotExists; 45 | case 2: 46 | return Error.sudoRunError; 47 | default: 48 | throw Exception('Error: Invalid variant index: "$index"'); 49 | } 50 | } 51 | 52 | @override 53 | void encodeTo( 54 | Error value, 55 | _i1.Output output, 56 | ) { 57 | _i1.U8Codec.codec.encodeTo( 58 | value.codecIndex, 59 | output, 60 | ); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /lib/application/chain/wetee/wetee_gen/types/frame_support/dispatch/dispatch_class.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: no_leading_underscores_for_library_prefixes 2 | import 'dart:typed_data' as _i2; 3 | 4 | import 'package:polkadart/scale_codec.dart' as _i1; 5 | 6 | enum DispatchClass { 7 | normal('Normal', 0), 8 | operational('Operational', 1), 9 | mandatory('Mandatory', 2); 10 | 11 | const DispatchClass( 12 | this.variantName, 13 | this.codecIndex, 14 | ); 15 | 16 | factory DispatchClass.decode(_i1.Input input) { 17 | return codec.decode(input); 18 | } 19 | 20 | final String variantName; 21 | 22 | final int codecIndex; 23 | 24 | static const $DispatchClassCodec codec = $DispatchClassCodec(); 25 | 26 | String toJson() => variantName; 27 | _i2.Uint8List encode() { 28 | return codec.encode(this); 29 | } 30 | } 31 | 32 | class $DispatchClassCodec with _i1.Codec { 33 | const $DispatchClassCodec(); 34 | 35 | @override 36 | DispatchClass decode(_i1.Input input) { 37 | final index = _i1.U8Codec.codec.decode(input); 38 | switch (index) { 39 | case 0: 40 | return DispatchClass.normal; 41 | case 1: 42 | return DispatchClass.operational; 43 | case 2: 44 | return DispatchClass.mandatory; 45 | default: 46 | throw Exception('DispatchClass: Invalid variant index: "$index"'); 47 | } 48 | } 49 | 50 | @override 51 | void encodeTo( 52 | DispatchClass value, 53 | _i1.Output output, 54 | ) { 55 | _i1.U8Codec.codec.encodeTo( 56 | value.codecIndex, 57 | output, 58 | ); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /lib/domain/models/app.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'app.dart'; 4 | 5 | // ************************************************************************** 6 | // TypeAdapterGenerator 7 | // ************************************************************************** 8 | 9 | class AppAdapter extends TypeAdapter { 10 | @override 11 | final int typeId = 5; 12 | 13 | @override 14 | App read(BinaryReader reader) { 15 | final numOfFields = reader.readByte(); 16 | final fields = { 17 | for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(), 18 | }; 19 | return App( 20 | hash: fields[2] as String, 21 | type: fields[3] as int, 22 | url: fields[4] as String?, 23 | name: fields[5] as String?, 24 | desc: fields[6] as String?, 25 | icon: fields[8] as String?, 26 | ); 27 | } 28 | 29 | @override 30 | void write(BinaryWriter writer, App obj) { 31 | writer 32 | ..writeByte(6) 33 | ..writeByte(2) 34 | ..write(obj.hash) 35 | ..writeByte(3) 36 | ..write(obj.type) 37 | ..writeByte(4) 38 | ..write(obj.url) 39 | ..writeByte(5) 40 | ..write(obj.name) 41 | ..writeByte(6) 42 | ..write(obj.desc) 43 | ..writeByte(8) 44 | ..write(obj.icon); 45 | } 46 | 47 | @override 48 | int get hashCode => typeId.hashCode; 49 | 50 | @override 51 | bool operator ==(Object other) => 52 | identical(this, other) || 53 | other is AppAdapter && 54 | runtimeType == other.runtimeType && 55 | typeId == other.typeId; 56 | } 57 | -------------------------------------------------------------------------------- /lib/application/chain/wetee/wetee_gen/types/wetee_project/task_status.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: no_leading_underscores_for_library_prefixes 2 | import 'dart:typed_data' as _i2; 3 | 4 | import 'package:polkadart/scale_codec.dart' as _i1; 5 | 6 | enum TaskStatus { 7 | toDo('ToDo', 0), 8 | inProgress('InProgress', 1), 9 | inReview('InReview', 2), 10 | done('Done', 3); 11 | 12 | const TaskStatus( 13 | this.variantName, 14 | this.codecIndex, 15 | ); 16 | 17 | factory TaskStatus.decode(_i1.Input input) { 18 | return codec.decode(input); 19 | } 20 | 21 | final String variantName; 22 | 23 | final int codecIndex; 24 | 25 | static const $TaskStatusCodec codec = $TaskStatusCodec(); 26 | 27 | String toJson() => variantName; 28 | _i2.Uint8List encode() { 29 | return codec.encode(this); 30 | } 31 | } 32 | 33 | class $TaskStatusCodec with _i1.Codec { 34 | const $TaskStatusCodec(); 35 | 36 | @override 37 | TaskStatus decode(_i1.Input input) { 38 | final index = _i1.U8Codec.codec.decode(input); 39 | switch (index) { 40 | case 0: 41 | return TaskStatus.toDo; 42 | case 1: 43 | return TaskStatus.inProgress; 44 | case 2: 45 | return TaskStatus.inReview; 46 | case 3: 47 | return TaskStatus.done; 48 | default: 49 | throw Exception('TaskStatus: Invalid variant index: "$index"'); 50 | } 51 | } 52 | 53 | @override 54 | void encodeTo( 55 | TaskStatus value, 56 | _i1.Output output, 57 | ) { 58 | _i1.U8Codec.codec.encodeTo( 59 | value.codecIndex, 60 | output, 61 | ); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "16x16", 5 | "idiom" : "mac", 6 | "filename" : "app_icon_16.png", 7 | "scale" : "1x" 8 | }, 9 | { 10 | "size" : "16x16", 11 | "idiom" : "mac", 12 | "filename" : "app_icon_32.png", 13 | "scale" : "2x" 14 | }, 15 | { 16 | "size" : "32x32", 17 | "idiom" : "mac", 18 | "filename" : "app_icon_32.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "32x32", 23 | "idiom" : "mac", 24 | "filename" : "app_icon_64.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "128x128", 29 | "idiom" : "mac", 30 | "filename" : "app_icon_128.png", 31 | "scale" : "1x" 32 | }, 33 | { 34 | "size" : "128x128", 35 | "idiom" : "mac", 36 | "filename" : "app_icon_256.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "256x256", 41 | "idiom" : "mac", 42 | "filename" : "app_icon_256.png", 43 | "scale" : "1x" 44 | }, 45 | { 46 | "size" : "256x256", 47 | "idiom" : "mac", 48 | "filename" : "app_icon_512.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "512x512", 53 | "idiom" : "mac", 54 | "filename" : "app_icon_512.png", 55 | "scale" : "1x" 56 | }, 57 | { 58 | "size" : "512x512", 59 | "idiom" : "mac", 60 | "filename" : "app_icon_1024.png", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /lib/application/chain/wetee/wetee_gen/types/pallet_contracts/schedule/instruction_weights.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: no_leading_underscores_for_library_prefixes 2 | import 'dart:typed_data' as _i2; 3 | 4 | import 'package:polkadart/scale_codec.dart' as _i1; 5 | 6 | class InstructionWeights { 7 | const InstructionWeights({required this.base}); 8 | 9 | factory InstructionWeights.decode(_i1.Input input) { 10 | return codec.decode(input); 11 | } 12 | 13 | /// u32 14 | final int base; 15 | 16 | static const $InstructionWeightsCodec codec = $InstructionWeightsCodec(); 17 | 18 | _i2.Uint8List encode() { 19 | return codec.encode(this); 20 | } 21 | 22 | Map toJson() => {'base': base}; 23 | 24 | @override 25 | bool operator ==(Object other) => 26 | identical( 27 | this, 28 | other, 29 | ) || 30 | other is InstructionWeights && other.base == base; 31 | 32 | @override 33 | int get hashCode => base.hashCode; 34 | } 35 | 36 | class $InstructionWeightsCodec with _i1.Codec { 37 | const $InstructionWeightsCodec(); 38 | 39 | @override 40 | void encodeTo( 41 | InstructionWeights obj, 42 | _i1.Output output, 43 | ) { 44 | _i1.U32Codec.codec.encodeTo( 45 | obj.base, 46 | output, 47 | ); 48 | } 49 | 50 | @override 51 | InstructionWeights decode(_i1.Input input) { 52 | return InstructionWeights(base: _i1.U32Codec.codec.decode(input)); 53 | } 54 | 55 | @override 56 | int sizeHint(InstructionWeights obj) { 57 | int size = 0; 58 | size = size + _i1.U32Codec.codec.sizeHint(obj.base); 59 | return size; 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /lib/application/chain/wetee/wetee_gen/types/sp_arithmetic/arithmetic_error.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: no_leading_underscores_for_library_prefixes 2 | import 'dart:typed_data' as _i2; 3 | 4 | import 'package:polkadart/scale_codec.dart' as _i1; 5 | 6 | enum ArithmeticError { 7 | underflow('Underflow', 0), 8 | overflow('Overflow', 1), 9 | divisionByZero('DivisionByZero', 2); 10 | 11 | const ArithmeticError( 12 | this.variantName, 13 | this.codecIndex, 14 | ); 15 | 16 | factory ArithmeticError.decode(_i1.Input input) { 17 | return codec.decode(input); 18 | } 19 | 20 | final String variantName; 21 | 22 | final int codecIndex; 23 | 24 | static const $ArithmeticErrorCodec codec = $ArithmeticErrorCodec(); 25 | 26 | String toJson() => variantName; 27 | _i2.Uint8List encode() { 28 | return codec.encode(this); 29 | } 30 | } 31 | 32 | class $ArithmeticErrorCodec with _i1.Codec { 33 | const $ArithmeticErrorCodec(); 34 | 35 | @override 36 | ArithmeticError decode(_i1.Input input) { 37 | final index = _i1.U8Codec.codec.decode(input); 38 | switch (index) { 39 | case 0: 40 | return ArithmeticError.underflow; 41 | case 1: 42 | return ArithmeticError.overflow; 43 | case 2: 44 | return ArithmeticError.divisionByZero; 45 | default: 46 | throw Exception('ArithmeticError: Invalid variant index: "$index"'); 47 | } 48 | } 49 | 50 | @override 51 | void encodeTo( 52 | ArithmeticError value, 53 | _i1.Output output, 54 | ) { 55 | _i1.U8Codec.codec.encodeTo( 56 | value.codecIndex, 57 | output, 58 | ); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /lib/application/chain/wetee/wetee_gen/types/wetee_dsecret/pallet/error.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: no_leading_underscores_for_library_prefixes 2 | import 'dart:typed_data' as _i2; 3 | 4 | import 'package:polkadart/scale_codec.dart' as _i1; 5 | 6 | /// The `Error` enum of this pallet. 7 | enum Error { 8 | /// 无效的用户,无权调用 9 | call403('Call403', 0), 10 | 11 | /// 无效的签名 12 | offchainSigError('OffchainSigError', 1), 13 | 14 | /// 签名数量不够 15 | offchainSigNotEnough('OffchainSigNotEnough', 2); 16 | 17 | const Error( 18 | this.variantName, 19 | this.codecIndex, 20 | ); 21 | 22 | factory Error.decode(_i1.Input input) { 23 | return codec.decode(input); 24 | } 25 | 26 | final String variantName; 27 | 28 | final int codecIndex; 29 | 30 | static const $ErrorCodec codec = $ErrorCodec(); 31 | 32 | String toJson() => variantName; 33 | _i2.Uint8List encode() { 34 | return codec.encode(this); 35 | } 36 | } 37 | 38 | class $ErrorCodec with _i1.Codec { 39 | const $ErrorCodec(); 40 | 41 | @override 42 | Error decode(_i1.Input input) { 43 | final index = _i1.U8Codec.codec.decode(input); 44 | switch (index) { 45 | case 0: 46 | return Error.call403; 47 | case 1: 48 | return Error.offchainSigError; 49 | case 2: 50 | return Error.offchainSigNotEnough; 51 | default: 52 | throw Exception('Error: Invalid variant index: "$index"'); 53 | } 54 | } 55 | 56 | @override 57 | void encodeTo( 58 | Error value, 59 | _i1.Output output, 60 | ) { 61 | _i1.U8Codec.codec.encodeTo( 62 | value.codecIndex, 63 | output, 64 | ); 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /lib/domain/models/user.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'user.dart'; 4 | 5 | // ************************************************************************** 6 | // TypeAdapterGenerator 7 | // ************************************************************************** 8 | 9 | class UserAdapter extends TypeAdapter { 10 | @override 11 | final int typeId = 7; 12 | 13 | @override 14 | User read(BinaryReader reader) { 15 | final numOfFields = reader.readByte(); 16 | final fields = { 17 | for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(), 18 | }; 19 | return User() 20 | ..name = fields[1] as String 21 | ..address = fields[2] as String 22 | ..domain = fields[3] as String 23 | ..status = fields[4] as int 24 | ..avatar = fields[5] as String? 25 | ..account = fields[6] as Account; 26 | } 27 | 28 | @override 29 | void write(BinaryWriter writer, User obj) { 30 | writer 31 | ..writeByte(6) 32 | ..writeByte(1) 33 | ..write(obj.name) 34 | ..writeByte(2) 35 | ..write(obj.address) 36 | ..writeByte(3) 37 | ..write(obj.domain) 38 | ..writeByte(4) 39 | ..write(obj.status) 40 | ..writeByte(5) 41 | ..write(obj.avatar) 42 | ..writeByte(6) 43 | ..write(obj.account); 44 | } 45 | 46 | @override 47 | int get hashCode => typeId.hashCode; 48 | 49 | @override 50 | bool operator ==(Object other) => 51 | identical(this, other) || 52 | other is UserAdapter && 53 | runtimeType == other.runtimeType && 54 | typeId == other.typeId; 55 | } 56 | -------------------------------------------------------------------------------- /lib/infra/pages/utils/image_viewer/image_viewer.dart: -------------------------------------------------------------------------------- 1 | // Copyright 2023 FluffyChat. 2 | // This file is part of FluffyChat 3 | 4 | // Licensed under the AGPL; 5 | // 6 | // https://gitlab.com/famedly/fluffychat 7 | // 8 | 9 | import 'package:flutter/material.dart'; 10 | 11 | import 'package:matrix/matrix.dart'; 12 | 13 | import 'image_viewer_view.dart'; 14 | import 'package:dtim/domain/utils/platform_infos.dart'; 15 | import 'package:dtim/domain/utils/matrix_sdk_extensions/event_extension.dart'; 16 | 17 | class ImageViewer extends StatefulWidget { 18 | final Event event; 19 | 20 | const ImageViewer(this.event, {Key? key}) : super(key: key); 21 | 22 | @override 23 | ImageViewerController createState() => ImageViewerController(); 24 | } 25 | 26 | class ImageViewerController extends State { 27 | /// Forward this image to another room. 28 | void forwardAction() {} 29 | 30 | /// Save this file with a system call. 31 | void saveFileAction(BuildContext context) => widget.event.saveFile(context); 32 | 33 | /// Save this file with a system call. 34 | void shareFileAction(BuildContext context) => widget.event.shareFile(context); 35 | 36 | static const maxScaleFactor = 1.5; 37 | 38 | /// Go back if user swiped it away 39 | void onInteractionEnds(ScaleEndDetails endDetails) { 40 | if (PlatformInfos.usesTouchscreen == false) { 41 | if (endDetails.velocity.pixelsPerSecond.dy > MediaQuery.of(context).size.height * maxScaleFactor) { 42 | Navigator.of(context, rootNavigator: false).pop(); 43 | } 44 | } 45 | } 46 | 47 | @override 48 | Widget build(BuildContext context) => ImageViewerView(this); 49 | } 50 | -------------------------------------------------------------------------------- /lib/infra/components/dao/payment_list_tile.dart: -------------------------------------------------------------------------------- 1 | import 'package:dtim/infra/components/dao/text.dart'; 2 | import 'package:dtim/domain/utils/screen/screen.dart'; 3 | import 'package:flutter/material.dart'; 4 | 5 | import 'package:dtim/application/store/theme.dart'; 6 | 7 | class PaymentListTile extends StatelessWidget { 8 | final IconData? icon; 9 | final String? label; 10 | final String? amount; 11 | final Widget? action; 12 | const PaymentListTile({ 13 | Key? key, 14 | required this.icon, 15 | required this.label, 16 | required this.amount, 17 | this.action, 18 | }) : super(key: key); 19 | 20 | @override 21 | Widget build(BuildContext context) { 22 | final constTheme = Theme.of(context).extension()!; 23 | return ListTile( 24 | contentPadding: EdgeInsets.only(left: 0, right: 0.w), 25 | visualDensity: VisualDensity.standard, 26 | leading: Container( 27 | padding: EdgeInsets.symmetric(vertical: 10.w, horizontal: 10.w), 28 | width: 40.w, 29 | height: 40.w, 30 | decoration: BoxDecoration( 31 | color: constTheme.centerChannelColor.withOpacity(0.03), 32 | borderRadius: BorderRadius.circular(15.w), 33 | ), 34 | child: Icon( 35 | icon!, 36 | size: 15.w, 37 | color: constTheme.centerChannelColor, 38 | ), 39 | ), 40 | title: PrimaryText( 41 | text: label!, 42 | size: 14.w, 43 | fontWeight: FontWeight.w500, 44 | ), 45 | subtitle: PrimaryText( 46 | text: amount!, 47 | size: 12.w, 48 | ), 49 | trailing: action ?? Container(), 50 | ); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /lib/application/chain/wetee/wetee_gen/types/frame_system/limits/block_length.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: no_leading_underscores_for_library_prefixes 2 | import 'dart:typed_data' as _i3; 3 | 4 | import 'package:polkadart/scale_codec.dart' as _i1; 5 | 6 | import '../../frame_support/dispatch/per_dispatch_class_3.dart' as _i2; 7 | 8 | class BlockLength { 9 | const BlockLength({required this.max}); 10 | 11 | factory BlockLength.decode(_i1.Input input) { 12 | return codec.decode(input); 13 | } 14 | 15 | /// PerDispatchClass 16 | final _i2.PerDispatchClass max; 17 | 18 | static const $BlockLengthCodec codec = $BlockLengthCodec(); 19 | 20 | _i3.Uint8List encode() { 21 | return codec.encode(this); 22 | } 23 | 24 | Map> toJson() => {'max': max.toJson()}; 25 | 26 | @override 27 | bool operator ==(Object other) => 28 | identical( 29 | this, 30 | other, 31 | ) || 32 | other is BlockLength && other.max == max; 33 | 34 | @override 35 | int get hashCode => max.hashCode; 36 | } 37 | 38 | class $BlockLengthCodec with _i1.Codec { 39 | const $BlockLengthCodec(); 40 | 41 | @override 42 | void encodeTo( 43 | BlockLength obj, 44 | _i1.Output output, 45 | ) { 46 | _i2.PerDispatchClass.codec.encodeTo( 47 | obj.max, 48 | output, 49 | ); 50 | } 51 | 52 | @override 53 | BlockLength decode(_i1.Input input) { 54 | return BlockLength(max: _i2.PerDispatchClass.codec.decode(input)); 55 | } 56 | 57 | @override 58 | int sizeHint(BlockLength obj) { 59 | int size = 0; 60 | size = size + _i2.PerDispatchClass.codec.sizeHint(obj.max); 61 | return size; 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /macos/Podfile: -------------------------------------------------------------------------------- 1 | platform :osx, '11.05' 2 | 3 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency. 4 | ENV['COCOAPODS_DISABLE_STATS'] = 'true' 5 | 6 | project 'Runner', { 7 | 'Debug' => :debug, 8 | 'Profile' => :release, 9 | 'Release' => :release, 10 | } 11 | 12 | def flutter_root 13 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'ephemeral', 'Flutter-Generated.xcconfig'), __FILE__) 14 | unless File.exist?(generated_xcode_build_settings_path) 15 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure \"flutter pub get\" is executed first" 16 | end 17 | 18 | File.foreach(generated_xcode_build_settings_path) do |line| 19 | matches = line.match(/FLUTTER_ROOT\=(.*)/) 20 | return matches[1].strip if matches 21 | end 22 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Flutter-Generated.xcconfig, then run \"flutter pub get\"" 23 | end 24 | 25 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) 26 | 27 | flutter_macos_podfile_setup 28 | 29 | target 'Runner' do 30 | use_frameworks! 31 | use_modular_headers! 32 | 33 | flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__)) 34 | target 'RunnerTests' do 35 | inherit! :search_paths 36 | end 37 | end 38 | 39 | post_install do |installer| 40 | installer.pods_project.targets.each do |target| 41 | flutter_additional_macos_build_settings(target) 42 | target.build_configurations.each do |config| 43 | config.build_settings['MACOSX_DEPLOYMENT_TARGET'] = '11.05' 44 | end 45 | end 46 | end 47 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/infra/pages/setting/location.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:dtim/infra/components/setting/settings_ui.dart'; 3 | 4 | class ThemePage extends StatefulWidget { 5 | const ThemePage({Key? key}) : super(key: key); 6 | 7 | @override 8 | _ThemePageState createState() => _ThemePageState(); 9 | } 10 | 11 | class _ThemePageState extends State { 12 | bool useNotificationDotOnAppIcon = true; 13 | 14 | @override 15 | Widget build(BuildContext context) { 16 | return Scaffold( 17 | // appBar: !isPc() 18 | // ? AppBar( 19 | // title: const Text('theme'), 20 | // ) 21 | // : null, 22 | body: SettingsList( 23 | contentPadding: EdgeInsets.zero, 24 | platform: DevicePlatform.android, 25 | sections: [ 26 | SettingsSection( 27 | title: const Text('深色'), 28 | tiles: [ 29 | Switchtile( 30 | initialValue: false, 31 | onToggle: (_) {}, 32 | title: const Text('私聊消息'), 33 | ), 34 | Switchtile( 35 | initialValue: false, 36 | onToggle: (_) {}, 37 | title: const Text('私聊中加密消息'), 38 | ), 39 | Switchtile( 40 | initialValue: false, 41 | onToggle: (_) {}, 42 | title: const Text('群聊中的消息'), 43 | ), 44 | Switchtile( 45 | initialValue: false, 46 | onToggle: (_) {}, 47 | title: const Text('群聊中的加密消息'), 48 | ), 49 | ], 50 | ), 51 | ], 52 | ), 53 | ); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /integration_test/base.dart: -------------------------------------------------------------------------------- 1 | import 'package:dtim/router.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_test/flutter_test.dart'; 4 | 5 | import 'package:dtim/main.dart' as app; 6 | 7 | import 'extensions/wait_for.dart'; 8 | 9 | login(WidgetTester tester) async { 10 | runInTest = true; 11 | // 构建应用 12 | await app.main(); 13 | await tester.pumpAndSettle(); 14 | await tester.waitFor(find.byKey(const Key("auto_test")), timeout: const Duration(seconds: 50)); 15 | 16 | // 触发注册按钮点击 17 | await tester.tap(find.byKey(const Key('auto_test'))); 18 | await tester.pumpAndSettle(); 19 | 20 | await Future.delayed(const Duration(seconds: 1)); 21 | 22 | // 输入密码 23 | await tester.waitFor(find.byType(TextFormField), timeout: const Duration(seconds: 50)); 24 | var passwd = find.byType(TextFormField); 25 | await tester.enterText(passwd, "test123456"); 26 | await tester.pumpAndSettle(); 27 | 28 | // 登陆 29 | await tester.waitFor(find.maybeUppercaseText('OK'), timeout: const Duration(seconds: 50)); 30 | await tester.tap(find.maybeUppercaseText('OK')); 31 | await tester.pumpAndSettle(); 32 | 33 | await Future.delayed(const Duration(seconds: 2)); 34 | 35 | try { 36 | await tester.tap(find.byKey(const Key('asyoumeCard'))); 37 | await tester.pumpAndSettle(); 38 | 39 | await Future.delayed(const Duration(seconds: 2)); 40 | 41 | await tester.tap(find.byKey(const Key('orgOk'))); 42 | await tester.pumpAndSettle(); 43 | // ignore: empty_catches 44 | } catch (e) {} 45 | 46 | await Future.delayed(const Duration(seconds: 8)); 47 | } 48 | 49 | // ignore: constant_identifier_names 50 | const DAO_ROOT_SEED = "gloom album notable jewel divorce never trouble lesson month neck sign harbor"; 51 | -------------------------------------------------------------------------------- /lib/domain/utils/webrtc/voip.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:flutter/material.dart'; 4 | import 'package:matrix/matrix.dart'; 5 | // ignore: implementation_imports 6 | import 'package:matrix/src/voip/models/call_options.dart'; 7 | // ignore: implementation_imports 8 | import 'package:matrix/src/voip/models/voip_id.dart'; 9 | 10 | import 'call.dart'; 11 | 12 | class WebrtcVoIP extends VoIP { 13 | OverlayEntry? callingPopup; 14 | 15 | WebrtcVoIP(super.client, super.delegate) 16 | : super( 17 | enableSFUE2EEKeyRatcheting: false, 18 | ); 19 | 20 | @override 21 | Future inviteToCall( 22 | Room room, 23 | CallType type, { 24 | String? userId, 25 | String? deviceId, 26 | }) async { 27 | final roomId = room.id; 28 | final callId = 'cid${DateTime.now().millisecondsSinceEpoch}'; 29 | if (currentGroupCID == null) { 30 | incomingCallRoomId[roomId] = callId; 31 | } 32 | final opts = CallOptions( 33 | callId: callId, 34 | type: type, 35 | dir: CallDirection.kOutgoing, 36 | room: room, 37 | voip: this, 38 | localPartyId: localPartyId, 39 | iceServers: await getIceServers(), 40 | ); 41 | final newCall = createNewCall(opts); 42 | 43 | newCall.remoteUserId = userId; 44 | newCall.remoteDeviceId = deviceId; 45 | 46 | currentCID = VoipId(roomId: roomId, callId: callId); 47 | await newCall.initOutboundCall(type).then((_) { 48 | delegate.handleNewCall(newCall); 49 | }); 50 | return newCall; 51 | } 52 | 53 | @override 54 | WebrtcCallSession createNewCall(CallOptions opts) { 55 | final call = WebrtcCallSession(opts); 56 | calls[VoipId(roomId: opts.room.id, callId: opts.callId)] = call; 57 | return call; 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /docs/install_and_run.md: -------------------------------------------------------------------------------- 1 | ### Rust Setup 2 | - [Linux development environment](https://docs.substrate.io/install/linux/). 3 | - [MacOS development environment](https://docs.substrate.io/install/macos/). 4 | - [Windows development environment](https://docs.substrate.io/install/windows/). 5 | 6 | ### Rust precompile lib 7 | - window run "sh hacks/init_windows.sh" 8 | - mac run "sh hacks/init_mac.sh" 9 | - linux run "sh hacks/init_linux.sh" 10 | > Subsequently, if a glibc error occurs, please run "sh hacks/precompile_linux.sh" 11 | 12 | ### Flutter Setup 13 | - [Linux development environment](https://docs.flutter.dev/get-started/install/linux/). 14 | - [MacOS development environment](https://docs.flutter.dev/get-started/install/macos/). 15 | - [Windows development environment](https://docs.flutter.dev/get-started/install/windows/). 16 | 17 | ### RUN client 18 | > please uninstall Flutter Snap and install it manually, it is best to install version 3.7.3 19 | - run environment 20 | ``` 21 | $ rustup update 22 | $ rustup default nighty 23 | $ flutter config --enable-macos-desktop 24 | $ flutter config --enable-linux-desktop 25 | $ flutter config --enable-windows-desktop 26 | 27 | # for linux 28 | $ apt-get install clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev 29 | $ apt install libsecret-1-dev libjsoncpp-dev libolm3 libclang-dev libayatana-appindicator3-dev 30 | $ apt install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev 31 | ``` 32 | - run in macos/linux 33 | ``` 34 | $ flutter run -d linux 35 | OR 36 | $ flutter run -d macos 37 | ``` 38 | 39 | ### RUN E2E CHAT 40 | ``` 41 | flutter test integration_test/chat_test.dart 42 | ``` 43 | 44 | ### RUN E2E DAO 45 | ``` 46 | flutter test integration_test/dao_test.dart 47 | ``` 48 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 15 | 19 | 23 | 24 | 25 | 26 | 27 | 28 | 30 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDisplayName 8 | Asyou App 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | asyou_app 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(FLUTTER_BUILD_NAME) 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | $(FLUTTER_BUILD_NUMBER) 25 | LSRequiresIPhoneOS 26 | 27 | UILaunchStoryboardName 28 | LaunchScreen 29 | UIMainStoryboardFile 30 | Main 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | UIViewControllerBasedStatusBarAppearance 45 | 46 | CADisableMinimumFrameDurationOnPhone 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /lib/infra/components/dao/priority_icon.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:dtim/application/store/theme.dart'; 4 | 5 | class PriorityIcon extends StatelessWidget { 6 | final double size; 7 | final int priority; 8 | 9 | const PriorityIcon({ 10 | Key? key, 11 | this.size = 2, 12 | required this.priority, 13 | }) : super(key: key); 14 | 15 | @override 16 | Widget build(BuildContext context) { 17 | final constTheme = Theme.of(context).extension()!; 18 | if (priority == 0) { 19 | return Icon(Icons.more_horiz_rounded, size: size * 7, color: constTheme.centerChannelColor); 20 | } 21 | return Row( 22 | crossAxisAlignment: CrossAxisAlignment.end, 23 | children: [ 24 | Container( 25 | width: size, 26 | height: size * 2, 27 | margin: EdgeInsets.only(right: size), 28 | color: constTheme.centerChannelColor.withOpacity(priority > 0 ? 1 : 0.3), 29 | ), 30 | Container( 31 | width: size, 32 | height: size * 3, 33 | margin: EdgeInsets.only(right: size), 34 | color: constTheme.centerChannelColor.withOpacity(priority > 1 ? 1 : 0.3), 35 | ), 36 | Container( 37 | width: size, 38 | height: size * 4, 39 | margin: EdgeInsets.only(right: size), 40 | color: constTheme.centerChannelColor.withOpacity(priority > 2 ? 1 : 0.3), 41 | ), 42 | Container( 43 | width: size, 44 | height: size * 5, 45 | color: constTheme.centerChannelColor.withOpacity(priority > 3 ? 1 : 0.3), 46 | ), 47 | ], 48 | ); 49 | } 50 | } 51 | 52 | Map prioritys = { 53 | 0: "No Priority", 54 | 1: "Low Priority", 55 | 2: "Medium Priority", 56 | 3: "High Priority", 57 | 4: "Urgent", 58 | }; 59 | --------------------------------------------------------------------------------