├── .github └── workflows │ └── publish.yml ├── .gitignore ├── .gitmodules ├── LICENSE ├── README.md ├── RELEASE_CHANGELOG.md ├── analysis_options.yaml ├── android ├── .gitignore ├── app │ ├── build.gradle │ └── src │ │ ├── debug │ │ └── AndroidManifest.xml │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── kotlin │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── kyc │ │ │ │ └── MainActivity.kt │ │ └── res │ │ │ ├── drawable-v21 │ │ │ └── launch_background.xml │ │ │ ├── drawable │ │ │ └── launch_background.xml │ │ │ ├── mipmap-hdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ └── ic_launcher.png │ │ │ ├── values-night │ │ │ └── styles.xml │ │ │ └── values │ │ │ └── styles.xml │ │ └── profile │ │ └── AndroidManifest.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties ├── kyc_android.iml └── settings.gradle ├── asset ├── 7z2405-x64.exe ├── ChineseSimplified.isl ├── appimagetool-x86_64.AppImage ├── font │ ├── Droid_Sans_Mono.ttf │ ├── HarmonyOS_Sans_SC_Bold.ttf │ ├── HarmonyOS_Sans_SC_Light.ttf │ ├── HarmonyOS_Sans_SC_Medium.ttf │ └── HarmonyOS_Sans_SC_Regular.ttf ├── icon │ ├── icon.ico │ └── icon.png └── is.exe ├── changelog.txt ├── fonts ├── JetBrainsMono-Regular.ttf └── MyFlutterApp.ttf ├── img ├── 1.png └── 2.png ├── ios ├── .gitignore ├── Flutter │ ├── AppFrameworkInfo.plist │ ├── Debug.xcconfig │ └── Release.xcconfig ├── Runner.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── WorkspaceSettings.xcsettings │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── IDEWorkspaceChecks.plist │ │ └── WorkspaceSettings.xcsettings ├── Runner │ ├── AppDelegate.swift │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ ├── Contents.json │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ ├── Icon-App-20x20@1x.png │ │ │ ├── Icon-App-20x20@2x.png │ │ │ ├── Icon-App-20x20@3x.png │ │ │ ├── Icon-App-29x29@1x.png │ │ │ ├── Icon-App-29x29@2x.png │ │ │ ├── Icon-App-29x29@3x.png │ │ │ ├── Icon-App-40x40@1x.png │ │ │ ├── Icon-App-40x40@2x.png │ │ │ ├── Icon-App-40x40@3x.png │ │ │ ├── Icon-App-60x60@2x.png │ │ │ ├── Icon-App-60x60@3x.png │ │ │ ├── Icon-App-76x76@1x.png │ │ │ ├── Icon-App-76x76@2x.png │ │ │ └── Icon-App-83.5x83.5@2x.png │ │ └── LaunchImage.imageset │ │ │ ├── Contents.json │ │ │ ├── LaunchImage.png │ │ │ ├── LaunchImage@2x.png │ │ │ ├── LaunchImage@3x.png │ │ │ └── README.md │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ ├── Info.plist │ └── Runner-Bridging-Header.h └── RunnerTests │ └── RunnerTests.swift ├── kyc.iml ├── lib ├── assets │ ├── aifadian.svg │ ├── alipay.svg │ ├── colorEgg.png │ ├── donate_alipay.png │ ├── donate_wechat.png │ ├── icon.png │ ├── iconWin.ico │ ├── loading.gif │ ├── logo.png │ ├── logo_Old.png │ ├── my_flutter_app_icons.dart │ └── wechat.svg ├── main.dart ├── ui │ ├── broadcast │ │ ├── detail.dart │ │ └── list.dart │ ├── deploy │ │ ├── deploy.dart │ │ └── deployment.dart │ ├── mainPage │ │ ├── createbot.dart │ │ ├── fast_deploy.dart │ │ ├── import_bot.dart │ │ └── manage_bot.dart │ ├── manage │ │ ├── adapter.dart │ │ ├── driver.dart │ │ ├── env.dart │ │ ├── manage_cli.dart │ │ ├── manage_plugin.dart │ │ ├── manage_protocol.dart │ │ ├── managecli.dart │ │ ├── plugin.dart │ │ └── stderr.dart │ └── settings │ │ ├── about.dart │ │ ├── more_page.dart │ │ └── setting.dart └── utils │ ├── core.dart │ ├── deployBot.dart │ ├── global.dart │ ├── manage.dart │ └── userConfig.dart ├── linux ├── .gitignore ├── CMakeLists.txt ├── flutter │ ├── CMakeLists.txt │ ├── generated_plugin_registrant.cc │ ├── generated_plugin_registrant.h │ └── generated_plugins.cmake ├── main.cc ├── my_application.cc ├── my_application.h └── packaging │ ├── appimage │ └── make_config.yaml │ ├── deb │ └── make_config.yaml │ └── rpm │ └── make_config.yaml ├── macos ├── .gitignore ├── Flutter │ ├── Flutter-Debug.xcconfig │ ├── Flutter-Release.xcconfig │ └── GeneratedPluginRegistrant.swift ├── Runner.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── Runner │ ├── AppDelegate.swift │ ├── Assets.xcassets │ │ └── AppIcon.appiconset │ │ │ ├── Contents.json │ │ │ ├── app_icon_1024.png │ │ │ ├── app_icon_128.png │ │ │ ├── app_icon_16.png │ │ │ ├── app_icon_256.png │ │ │ ├── app_icon_32.png │ │ │ ├── app_icon_512.png │ │ │ └── app_icon_64.png │ ├── Base.lproj │ │ └── MainMenu.xib │ ├── Configs │ │ ├── AppInfo.xcconfig │ │ ├── Debug.xcconfig │ │ ├── Release.xcconfig │ │ └── Warnings.xcconfig │ ├── DebugProfile.entitlements │ ├── Info.plist │ ├── MainFlutterWindow.swift │ └── Release.entitlements ├── RunnerTests │ └── RunnerTests.swift └── packaging │ └── dmg │ └── make_config.yaml ├── pubspec.lock ├── pubspec.yaml ├── test ├── tem.dart └── widget_test.dart ├── web ├── favicon.png ├── icons │ ├── Icon-192.png │ ├── Icon-512.png │ ├── Icon-maskable-192.png │ └── Icon-maskable-512.png ├── index.html └── manifest.json ├── website ├── assets │ ├── animatecss │ │ └── animate.min.css │ ├── as-pie-progress │ │ ├── css │ │ │ └── progress.min.css │ │ └── jquery-as-pie-progress.min.js │ ├── bootstrap │ │ ├── css │ │ │ ├── bootstrap-grid.min.css │ │ │ ├── bootstrap-reboot.min.css │ │ │ └── bootstrap.min.css │ │ └── js │ │ │ └── bootstrap.min.js │ ├── busuanzi.pure.mini.js │ ├── imagesloaded.pkgd.min.js │ ├── mobirise │ │ └── css │ │ │ └── mbr-additional.css │ ├── mystyle.css │ ├── parallax │ │ └── jarallax.min.js │ ├── popper │ │ └── popper.min.js │ ├── simple-pre-loader │ │ ├── images │ │ │ ├── loader-128x │ │ │ │ ├── preloader_1.gif │ │ │ │ ├── preloader_2.gif │ │ │ │ ├── preloader_3.gif │ │ │ │ ├── preloader_4.gif │ │ │ │ ├── preloader_5.gif │ │ │ │ ├── preloader_6.gif │ │ │ │ └── preloader_7.gif │ │ │ ├── loader-32x │ │ │ │ ├── loader1.gif │ │ │ │ ├── loader2.gif │ │ │ │ ├── loader3.gif │ │ │ │ ├── loader4.gif │ │ │ │ ├── loader5.gif │ │ │ │ ├── loader6.gif │ │ │ │ └── loader7.gif │ │ │ └── loader-64x │ │ │ │ ├── preloader_1.gif │ │ │ │ ├── preloader_2.gif │ │ │ │ ├── preloader_3.gif │ │ │ │ ├── preloader_4.gif │ │ │ │ ├── preloader_5.gif │ │ │ │ ├── preloader_6.gif │ │ │ │ └── preloader_7.gif │ │ ├── index.html │ │ ├── loader-icons-set-1-32x64x128.zip │ │ ├── loader-icons-set-2-32x64x128.zip │ │ ├── loading.gif │ │ └── readme.txt │ ├── smoothscroll │ │ └── smooth-scroll.js │ ├── socicon │ │ ├── css │ │ │ └── styles.css │ │ └── fonts │ │ │ ├── socicon.eot │ │ │ ├── socicon.svg │ │ │ ├── socicon.ttf │ │ │ └── socicon.woff │ ├── tether │ │ ├── tether.min.css │ │ └── tether.min.js │ ├── theme │ │ ├── css │ │ │ └── style.css │ │ └── js │ │ │ └── script.js │ ├── viewportchecker │ │ └── jquery.viewportchecker.js │ └── web │ │ └── assets │ │ ├── jquery │ │ └── jquery.min.js │ │ └── mobirise-icons │ │ ├── mobirise-icons.css │ │ ├── mobirise-icons.eot │ │ ├── mobirise-icons.svg │ │ ├── mobirise-icons.ttf │ │ └── mobirise-icons.woff ├── bingsiteauth.xml ├── image │ ├── 1.png │ ├── 2.png │ ├── 3.png │ ├── 4.png │ ├── 5.png │ ├── cloudflare.svg │ ├── icon.png │ └── netlify.svg ├── index.html └── sitemap.xml └── windows ├── .gitignore ├── CMakeLists.txt ├── flutter ├── CMakeLists.txt ├── generated_plugin_registrant.cc ├── generated_plugin_registrant.h └── generated_plugins.cmake ├── packaging └── exe │ ├── inno_setup.iss │ └── make_config.yaml └── runner ├── CMakeLists.txt ├── Runner.rc ├── flutter_window.cpp ├── flutter_window.h ├── main.cpp ├── resource.h ├── resources └── app_icon.ico ├── runner.exe.manifest ├── utils.cpp ├── utils.h ├── win32_window.cpp └── win32_window.h /.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 | /dist/ 35 | 36 | # Symbolication related 37 | app.*.symbols 38 | 39 | # Obfuscation related 40 | app.*.map.json 41 | 42 | # Android Studio will place build artifacts here 43 | /android/app/debug 44 | /android/app/profile 45 | /android/app/release 46 | 47 | .vscode -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "tool/flutter_distributor"] 2 | path = tool/flutter_distributor 3 | url = https://github.com/Muska-Ami/flutter_distributor 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |
2 | nonebot-flutter-gui
3 |
4 | 5 | # Re:NoneBot GUI 6 |
7 | 8 | _✨ 新一代 NoneBot 图形化界面 ✨_ 9 | 10 | 11 | license 12 | 13 | 14 | Build 15 | 16 | 17 | QQ Chat Group 18 | 19 |
20 | 21 | 🌎 使用截图 22 | 23 |   |   24 | 25 | 📖 文档地址 26 | 27 | 28 |
29 | 30 | > [!warning] 31 | > 本项目包含了**大量的史山代码** 32 | 33 | ## 📖 介绍 34 | 35 | 新一代 NoneBot 图形化界面,基于 Dart 和 Flutter 开发 36 | 37 | ## ✨ 特性 38 | 39 | - 简约 UI 40 | - 快速上手,开箱即用 41 | - 全平台支持(Windows,Linux,MacOS ~~(待测试)~~) 42 | - 实用高效,一步到位 43 | - 支持多 Bot 管理 44 | - 快速部署,一键连接 45 | 46 | 47 | ## 🤓安装前置 48 | ### Windows 49 | 本软件运行需要安装 Microsoft Visual C++ Redistributable 依赖,如无法打开请尝试从此处下载安装运行后使用。 50 | [https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist](https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist) 51 | 52 | ### Linux 53 | 请使用以下命令安装依赖(以 Debian 系为例) 54 | 55 | ```bash 56 | sudo apt-get install appindicator3-0.1 libappindicator3-dev libnotify-dev 57 | ``` 58 | 59 | 60 | ## ⚙️安装 61 | 62 | 即刻前往:[Release](https://github.com/NonebotGUI/nonebot-flutter-gui/releases) 63 | 64 | 65 | ## 🖼️ 使用截图 66 | 67 | ![img1](img/1.png) 68 | 69 | ![img](img/2.png) 70 | 71 | ## 🚚 旧数据迁移指南 72 | 73 | 从 `0.1.7` 版本开始,NoneBotGUI 将不再使用 `用户目录/.nbgui`作为数据文件夹,而是使用 `path_provider`提供路径
74 | 你需要**手动**将旧版本 `.nbgui` 下的所有目录和文件移动到新版本的文件夹中,在应用程序的 `更多-设置-旧版本数据迁移指南` 中可以看见新版本的路径 75 | 76 | ## 📑 TODO List 77 | 78 | - [X] 清理史山【完成度:50%】 79 | - [X] 重构新的 UI 80 | - [X] 在主页面直接启动 Bot 81 | - [X] 检查更新 82 | 83 | ## 📄 协议 84 | 85 | GPL-3.0 license 86 | 87 | ## 🐧 QQ Group 88 | 89 | 欢迎加入我们的 QQ 群组! 90 | 91 | 92 | 972526136 93 | 94 | -------------------------------------------------------------------------------- /RELEASE_CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 🌈ChangeLog 2025.03.21 🤯 2 | by @XTxiaoting14332 3 | 修复一键部署时填写路径错误的问题 -------------------------------------------------------------------------------- /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 | analyzer: 12 | exclude: 13 | - tool/** 14 | 15 | linter: 16 | # The lint rules applied to this project can be customized in the 17 | # section below to disable rules from the `package:flutter_lints/flutter.yaml` 18 | # included above or to enable additional rules. A list of all available lints 19 | # and their documentation is published at https://dart.dev/lints. 20 | # 21 | # Instead of disabling a lint rule for the entire project in the 22 | # section below, it can also be suppressed for a single line of code 23 | # or a specific dart file by using the `// ignore: name_of_lint` and 24 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file 25 | # producing the lint. 26 | rules: 27 | always_use_package_imports: true 28 | avoid_web_libraries_in_flutter: true 29 | use_build_context_synchronously: false 30 | annotate_overrides: true 31 | # avoid_print: false # Uncomment to disable the `avoid_print` rule 32 | # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule 33 | 34 | # Additional information about this file can be found at 35 | # https://dart.dev/guides/language/analysis-options 36 | -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | 9 | # Remember to never publicly share your keystore. 10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app 11 | key.properties 12 | **/*.keystore 13 | **/*.jks 14 | -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id "com.android.application" 3 | id "kotlin-android" 4 | id "dev.flutter.flutter-gradle-plugin" 5 | } 6 | 7 | def localProperties = new Properties() 8 | def localPropertiesFile = rootProject.file('local.properties') 9 | if (localPropertiesFile.exists()) { 10 | localPropertiesFile.withReader('UTF-8') { reader -> 11 | localProperties.load(reader) 12 | } 13 | } 14 | 15 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 16 | if (flutterVersionCode == null) { 17 | flutterVersionCode = '1' 18 | } 19 | 20 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 21 | if (flutterVersionName == null) { 22 | flutterVersionName = '1.0' 23 | } 24 | 25 | android { 26 | namespace "com.nightwind.NonebotGUI" 27 | compileSdk flutter.compileSdkVersion 28 | ndkVersion flutter.ndkVersion 29 | 30 | compileOptions { 31 | sourceCompatibility JavaVersion.VERSION_1_8 32 | targetCompatibility JavaVersion.VERSION_1_8 33 | } 34 | 35 | kotlinOptions { 36 | jvmTarget = '1.8' 37 | } 38 | 39 | sourceSets { 40 | main.java.srcDirs += 'src/main/kotlin' 41 | } 42 | 43 | defaultConfig { 44 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 45 | applicationId "com.nightwind.NonebotGUI" 46 | // You can update the following values to match your application needs. 47 | // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. 48 | minSdkVersion flutter.minSdkVersion 49 | targetSdkVersion flutter.targetSdkVersion 50 | versionCode flutterVersionCode.toInteger() 51 | versionName flutterVersionName 52 | } 53 | 54 | buildTypes { 55 | release { 56 | // TODO: Add your own signing config for the release build. 57 | // Signing with the debug keys for now, so `flutter run --release` works. 58 | signingConfig signingConfigs.debug 59 | } 60 | } 61 | } 62 | 63 | flutter { 64 | source '../..' 65 | } 66 | 67 | dependencies {} 68 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 14 | 18 | 22 | 23 | 24 | 25 | 26 | 27 | 29 | 32 | 33 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /android/app/src/main/kotlin/com/example/kyc/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.nightwind.NonebotGUI 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() 6 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NonebotGUI/nonebot-flutter-gui/74fb214e9247bacde29baf0f476f2d968b93e842/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NonebotGUI/nonebot-flutter-gui/74fb214e9247bacde29baf0f476f2d968b93e842/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NonebotGUI/nonebot-flutter-gui/74fb214e9247bacde29baf0f476f2d968b93e842/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NonebotGUI/nonebot-flutter-gui/74fb214e9247bacde29baf0f476f2d968b93e842/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NonebotGUI/nonebot-flutter-gui/74fb214e9247bacde29baf0f476f2d968b93e842/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | allprojects { 2 | repositories { 3 | google() 4 | mavenCentral() 5 | } 6 | } 7 | 8 | rootProject.buildDir = '../build' 9 | subprojects { 10 | project.buildDir = "${rootProject.buildDir}/${project.name}" 11 | } 12 | subprojects { 13 | project.evaluationDependsOn(':app') 14 | } 15 | 16 | tasks.register("clean", Delete) { 17 | delete rootProject.buildDir 18 | } 19 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx4G 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | zipStoreBase=GRADLE_USER_HOME 4 | zipStorePath=wrapper/dists 5 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-all.zip 6 | -------------------------------------------------------------------------------- /android/kyc_android.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | def flutterSdkPath = { 3 | def properties = new Properties() 4 | file("local.properties").withInputStream { properties.load(it) } 5 | def flutterSdkPath = properties.getProperty("flutter.sdk") 6 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 7 | return flutterSdkPath 8 | } 9 | settings.ext.flutterSdkPath = flutterSdkPath() 10 | 11 | includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle") 12 | 13 | repositories { 14 | google() 15 | mavenCentral() 16 | gradlePluginPortal() 17 | } 18 | } 19 | 20 | plugins { 21 | id "dev.flutter.flutter-plugin-loader" version "1.0.0" 22 | id "com.android.application" version "7.3.0" apply false 23 | id "org.jetbrains.kotlin.android" version "1.7.10" apply false 24 | } 25 | 26 | include ":app" 27 | -------------------------------------------------------------------------------- /asset/7z2405-x64.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NonebotGUI/nonebot-flutter-gui/74fb214e9247bacde29baf0f476f2d968b93e842/asset/7z2405-x64.exe -------------------------------------------------------------------------------- /asset/appimagetool-x86_64.AppImage: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NonebotGUI/nonebot-flutter-gui/74fb214e9247bacde29baf0f476f2d968b93e842/asset/appimagetool-x86_64.AppImage -------------------------------------------------------------------------------- /asset/font/Droid_Sans_Mono.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NonebotGUI/nonebot-flutter-gui/74fb214e9247bacde29baf0f476f2d968b93e842/asset/font/Droid_Sans_Mono.ttf -------------------------------------------------------------------------------- /asset/font/HarmonyOS_Sans_SC_Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NonebotGUI/nonebot-flutter-gui/74fb214e9247bacde29baf0f476f2d968b93e842/asset/font/HarmonyOS_Sans_SC_Bold.ttf -------------------------------------------------------------------------------- /asset/font/HarmonyOS_Sans_SC_Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NonebotGUI/nonebot-flutter-gui/74fb214e9247bacde29baf0f476f2d968b93e842/asset/font/HarmonyOS_Sans_SC_Light.ttf -------------------------------------------------------------------------------- /asset/font/HarmonyOS_Sans_SC_Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NonebotGUI/nonebot-flutter-gui/74fb214e9247bacde29baf0f476f2d968b93e842/asset/font/HarmonyOS_Sans_SC_Medium.ttf -------------------------------------------------------------------------------- /asset/font/HarmonyOS_Sans_SC_Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NonebotGUI/nonebot-flutter-gui/74fb214e9247bacde29baf0f476f2d968b93e842/asset/font/HarmonyOS_Sans_SC_Regular.ttf -------------------------------------------------------------------------------- /asset/icon/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NonebotGUI/nonebot-flutter-gui/74fb214e9247bacde29baf0f476f2d968b93e842/asset/icon/icon.ico -------------------------------------------------------------------------------- /asset/icon/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NonebotGUI/nonebot-flutter-gui/74fb214e9247bacde29baf0f476f2d968b93e842/asset/icon/icon.png -------------------------------------------------------------------------------- /asset/is.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NonebotGUI/nonebot-flutter-gui/74fb214e9247bacde29baf0f476f2d968b93e842/asset/is.exe -------------------------------------------------------------------------------- /changelog.txt: -------------------------------------------------------------------------------- 1 | 修复一键部署时填写路径错误的问题 -------------------------------------------------------------------------------- /fonts/JetBrainsMono-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NonebotGUI/nonebot-flutter-gui/74fb214e9247bacde29baf0f476f2d968b93e842/fonts/JetBrainsMono-Regular.ttf -------------------------------------------------------------------------------- /fonts/MyFlutterApp.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NonebotGUI/nonebot-flutter-gui/74fb214e9247bacde29baf0f476f2d968b93e842/fonts/MyFlutterApp.ttf -------------------------------------------------------------------------------- /img/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NonebotGUI/nonebot-flutter-gui/74fb214e9247bacde29baf0f476f2d968b93e842/img/1.png -------------------------------------------------------------------------------- /img/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NonebotGUI/nonebot-flutter-gui/74fb214e9247bacde29baf0f476f2d968b93e842/img/2.png -------------------------------------------------------------------------------- /ios/.gitignore: -------------------------------------------------------------------------------- 1 | **/dgph 2 | *.mode1v3 3 | *.mode2v3 4 | *.moved-aside 5 | *.pbxuser 6 | *.perspectivev3 7 | **/*sync/ 8 | .sconsign.dblite 9 | .tags* 10 | **/.vagrant/ 11 | **/DerivedData/ 12 | Icon? 13 | **/Pods/ 14 | **/.symlinks/ 15 | profile 16 | xcuserdata 17 | **/.generated/ 18 | Flutter/App.framework 19 | Flutter/Flutter.framework 20 | Flutter/Flutter.podspec 21 | Flutter/Generated.xcconfig 22 | Flutter/ephemeral/ 23 | Flutter/app.flx 24 | Flutter/app.zip 25 | Flutter/flutter_assets/ 26 | Flutter/flutter_export_environment.sh 27 | ServiceDefinitions.json 28 | Runner/GeneratedPluginRegistrant.* 29 | 30 | # Exceptions to above rules. 31 | !default.mode1v3 32 | !default.mode2v3 33 | !default.pbxuser 34 | !default.perspectivev3 35 | -------------------------------------------------------------------------------- /ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 12.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 43 | 49 | 50 | 51 | 52 | 53 | 63 | 65 | 71 | 72 | 73 | 74 | 80 | 82 | 88 | 89 | 90 | 91 | 93 | 94 | 97 | 98 | 99 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 4 | @UIApplicationMain 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-60x60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-App-20x20@1x.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-App-20x20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-29x29@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-29x29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-40x40@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-40x40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-76x76@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-76x76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-App-83.5x83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "Icon-App-1024x1024@1x.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NonebotGUI/nonebot-flutter-gui/74fb214e9247bacde29baf0f476f2d968b93e842/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NonebotGUI/nonebot-flutter-gui/74fb214e9247bacde29baf0f476f2d968b93e842/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/NonebotGUI/nonebot-flutter-gui/74fb214e9247bacde29baf0f476f2d968b93e842/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/NonebotGUI/nonebot-flutter-gui/74fb214e9247bacde29baf0f476f2d968b93e842/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/NonebotGUI/nonebot-flutter-gui/74fb214e9247bacde29baf0f476f2d968b93e842/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/NonebotGUI/nonebot-flutter-gui/74fb214e9247bacde29baf0f476f2d968b93e842/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/NonebotGUI/nonebot-flutter-gui/74fb214e9247bacde29baf0f476f2d968b93e842/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/NonebotGUI/nonebot-flutter-gui/74fb214e9247bacde29baf0f476f2d968b93e842/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/NonebotGUI/nonebot-flutter-gui/74fb214e9247bacde29baf0f476f2d968b93e842/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/NonebotGUI/nonebot-flutter-gui/74fb214e9247bacde29baf0f476f2d968b93e842/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/NonebotGUI/nonebot-flutter-gui/74fb214e9247bacde29baf0f476f2d968b93e842/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/NonebotGUI/nonebot-flutter-gui/74fb214e9247bacde29baf0f476f2d968b93e842/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/NonebotGUI/nonebot-flutter-gui/74fb214e9247bacde29baf0f476f2d968b93e842/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/NonebotGUI/nonebot-flutter-gui/74fb214e9247bacde29baf0f476f2d968b93e842/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NonebotGUI/nonebot-flutter-gui/74fb214e9247bacde29baf0f476f2d968b93e842/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NonebotGUI/nonebot-flutter-gui/74fb214e9247bacde29baf0f476f2d968b93e842/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NonebotGUI/nonebot-flutter-gui/74fb214e9247bacde29baf0f476f2d968b93e842/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NonebotGUI/nonebot-flutter-gui/74fb214e9247bacde29baf0f476f2d968b93e842/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDisplayName 8 | NoneBotGUI 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | NoneBotGUI 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 | CADisableMinimumFrameDurationOnPhone 45 | 46 | UIApplicationSupportsIndirectInputEvents 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /ios/RunnerTests/RunnerTests.swift: -------------------------------------------------------------------------------- 1 | import Flutter 2 | import UIKit 3 | import XCTest 4 | 5 | class RunnerTests: XCTestCase { 6 | 7 | func testExample() { 8 | // If you add code to the Runner application, consider adding tests here. 9 | // See https://developer.apple.com/documentation/xctest for more information about using XCTest. 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /kyc.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /lib/assets/aifadian.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/assets/alipay.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/assets/colorEgg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NonebotGUI/nonebot-flutter-gui/74fb214e9247bacde29baf0f476f2d968b93e842/lib/assets/colorEgg.png -------------------------------------------------------------------------------- /lib/assets/donate_alipay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NonebotGUI/nonebot-flutter-gui/74fb214e9247bacde29baf0f476f2d968b93e842/lib/assets/donate_alipay.png -------------------------------------------------------------------------------- /lib/assets/donate_wechat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NonebotGUI/nonebot-flutter-gui/74fb214e9247bacde29baf0f476f2d968b93e842/lib/assets/donate_wechat.png -------------------------------------------------------------------------------- /lib/assets/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NonebotGUI/nonebot-flutter-gui/74fb214e9247bacde29baf0f476f2d968b93e842/lib/assets/icon.png -------------------------------------------------------------------------------- /lib/assets/iconWin.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NonebotGUI/nonebot-flutter-gui/74fb214e9247bacde29baf0f476f2d968b93e842/lib/assets/iconWin.ico -------------------------------------------------------------------------------- /lib/assets/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NonebotGUI/nonebot-flutter-gui/74fb214e9247bacde29baf0f476f2d968b93e842/lib/assets/loading.gif -------------------------------------------------------------------------------- /lib/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NonebotGUI/nonebot-flutter-gui/74fb214e9247bacde29baf0f476f2d968b93e842/lib/assets/logo.png -------------------------------------------------------------------------------- /lib/assets/logo_Old.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NonebotGUI/nonebot-flutter-gui/74fb214e9247bacde29baf0f476f2d968b93e842/lib/assets/logo_Old.png -------------------------------------------------------------------------------- /lib/assets/my_flutter_app_icons.dart: -------------------------------------------------------------------------------- 1 | /// Flutter icons MyFlutterApp 2 | /// Copyright (C) 2024 by original authors @ fluttericon.com, fontello.com 3 | /// This font was generated by FlutterIcon.com, which is derived from Fontello. 4 | /// 5 | /// To use this font, place it in your fonts/ directory and include the 6 | /// following in your pubspec.yaml 7 | /// 8 | /// flutter: 9 | /// fonts: 10 | /// - family: MyFlutterApp 11 | /// fonts: 12 | /// - asset: fonts/MyFlutterApp.ttf 13 | /// 14 | /// 15 | /// 16 | library; 17 | 18 | import 'package:flutter/widgets.dart'; 19 | 20 | class MyFlutterApp { 21 | MyFlutterApp._(); 22 | 23 | static const _kFontFam = 'MyFlutterApp'; 24 | static const String? _kFontPkg = null; 25 | 26 | static const IconData github = 27 | IconData(0xe800, fontFamily: _kFontFam, fontPackage: _kFontPkg); 28 | } 29 | -------------------------------------------------------------------------------- /lib/assets/wechat.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/ui/broadcast/detail.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:bitsdojo_window/bitsdojo_window.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:NoneBotGUI/utils/global.dart'; 6 | import 'package:flutter_markdown/flutter_markdown.dart'; 7 | import 'package:http/http.dart' as http; 8 | import 'package:window_manager/window_manager.dart'; 9 | 10 | class BroadcastDetail extends StatefulWidget { 11 | const BroadcastDetail({super.key}); 12 | 13 | @override 14 | State createState() => _HomeScreenState(); 15 | } 16 | 17 | class _HomeScreenState extends State { 18 | @override 19 | void initState() { 20 | super.initState(); 21 | fetchData(); 22 | } 23 | 24 | @override 25 | void dispose() { 26 | super.dispose(); 27 | } 28 | 29 | String md = ''; 30 | Future fetchData() async { 31 | final response = await http.get(Uri.parse( 32 | 'https://api.zobyic.top/api/nbgui/broadcast/detail?id=${MainApp.broadcastId}')); 33 | if (response.statusCode == 200) { 34 | setState(() { 35 | String decodedBody = utf8.decode(response.bodyBytes); 36 | Map jsonMap = json.decode(decodedBody); 37 | md = jsonMap['content']; 38 | }); 39 | } else { 40 | throw Exception('Failed to load data'); 41 | } 42 | } 43 | 44 | @override 45 | Widget build(BuildContext context) { 46 | return Scaffold( 47 | appBar: PreferredSize( 48 | preferredSize: const Size.fromHeight(50), 49 | child: Row( 50 | children: [ 51 | Expanded( 52 | child: MoveWindow( 53 | child: AppBar( 54 | title: const Text( 55 | '公告详情', 56 | style: TextStyle(color: Colors.white), 57 | ), 58 | actions: [ 59 | IconButton( 60 | icon: const Icon(Icons.remove_rounded), 61 | color: Colors.white, 62 | onPressed: () => appWindow.minimize(), 63 | iconSize: 20, 64 | tooltip: "最小化", 65 | ), 66 | appWindow.isMaximized 67 | ? IconButton( 68 | icon: const Icon(Icons.rectangle_outlined), 69 | color: Colors.white, 70 | onPressed: () => appWindow.restore(), 71 | iconSize: 20, 72 | tooltip: "恢复大小", 73 | ) 74 | : IconButton( 75 | icon: const Icon(Icons.rectangle_outlined), 76 | color: Colors.white, 77 | onPressed: () => appWindow.maximize(), 78 | iconSize: 20, 79 | tooltip: "最大化", 80 | ), 81 | IconButton( 82 | icon: const Icon(Icons.close_rounded), 83 | color: Colors.white, 84 | onPressed: () => windowManager.hide(), 85 | iconSize: 20, 86 | tooltip: "关闭", 87 | ) 88 | ], 89 | ), 90 | ), 91 | ), 92 | ], 93 | ), 94 | ), 95 | body: md.isEmpty 96 | ? const Center( 97 | child: Column( 98 | mainAxisAlignment: MainAxisAlignment.center, 99 | children: [CircularProgressIndicator()], 100 | ), 101 | ) 102 | : Markdown( 103 | styleSheet: MarkdownStyleSheet(textScaleFactor: 1.3), 104 | data: md)); 105 | } 106 | } 107 | -------------------------------------------------------------------------------- /lib/ui/broadcast/list.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | import 'package:NoneBotGUI/utils/global.dart'; 3 | import 'package:NoneBotGUI/ui/broadcast/detail.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:http/http.dart' as http; 6 | 7 | class BoradcastList extends StatefulWidget { 8 | const BoradcastList({super.key}); 9 | 10 | @override 11 | State createState() => _HomeScreenState(); 12 | } 13 | 14 | class _HomeScreenState extends State { 15 | List data = []; 16 | 17 | //拉取公告列表 18 | @override 19 | void initState() { 20 | super.initState(); 21 | fetchData(); 22 | } 23 | 24 | @override 25 | void dispose() { 26 | super.dispose(); 27 | } 28 | 29 | Future fetchData() async { 30 | final response = await http 31 | .get(Uri.parse('https://api.nbgui.top/api/nbgui/broadcast/list/')); 32 | if (response.statusCode == 200) { 33 | setState(() { 34 | String decodedBody = utf8.decode(response.bodyBytes); 35 | final List jsonData = json.decode(decodedBody); 36 | jsonData.sort((a, b) => b['id'] - a['id']); // 按id从大到小排序 37 | data = jsonData; 38 | }); 39 | } else { 40 | throw Exception('Failed to load data'); 41 | } 42 | } 43 | 44 | InkWell list(broadcast) => InkWell( 45 | onTap: () { 46 | MainApp.broadcastId = broadcast['id']; 47 | Navigator.push( 48 | context, 49 | MaterialPageRoute( 50 | builder: (context) => const BroadcastDetail(), 51 | ), 52 | ); 53 | }, 54 | child: Card( 55 | child: Stack( 56 | children: [ 57 | Positioned.fill( 58 | child: Padding( 59 | padding: const EdgeInsets.all(8.0), 60 | child: Column( 61 | mainAxisAlignment: MainAxisAlignment.start, 62 | crossAxisAlignment: CrossAxisAlignment.start, 63 | children: [ 64 | Text( 65 | broadcast['name'] 66 | .toString() 67 | .substring(0, broadcast['name'].length - 3), 68 | style: const TextStyle( 69 | fontWeight: FontWeight.bold, 70 | ), 71 | ), 72 | ], 73 | ), 74 | ), 75 | ), 76 | Positioned( 77 | left: 0, 78 | right: 0, 79 | bottom: 0, 80 | child: Padding( 81 | padding: const EdgeInsets.all(8.0), 82 | child: Text( 83 | broadcast['time'], 84 | style: TextStyle( 85 | fontSize: MediaQuery.of(context).textScaleFactor * 12, 86 | color: Colors.grey[550]), 87 | ), 88 | ), 89 | ), 90 | ], 91 | ), 92 | ), 93 | ); 94 | 95 | @override 96 | Widget build(BuildContext context) { 97 | return Scaffold( 98 | body: data.isEmpty 99 | ? const Center( 100 | child: Column( 101 | mainAxisAlignment: MainAxisAlignment.center, 102 | children: [CircularProgressIndicator()], 103 | ), 104 | ) 105 | : Container( 106 | margin: const EdgeInsets.fromLTRB(32, 20, 32, 12), 107 | child: GridView.builder( 108 | gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount( 109 | crossAxisCount: 3, 110 | crossAxisSpacing: 2, 111 | mainAxisSpacing: 2, 112 | childAspectRatio: 6 / 1, 113 | mainAxisExtent: 100), 114 | itemCount: data.length, 115 | itemBuilder: (BuildContext context, int index) => 116 | list(data[index]), 117 | ), 118 | ), 119 | floatingActionButton: FloatingActionButton( 120 | onPressed: () { 121 | setState(() { 122 | data.clear(); 123 | fetchData(); 124 | }); 125 | }, 126 | tooltip: "刷新列表", 127 | shape: const CircleBorder(), 128 | child: const Icon( 129 | Icons.refresh_rounded, 130 | color: Colors.white, 131 | ), 132 | ), 133 | floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked, 134 | ); 135 | } 136 | } 137 | -------------------------------------------------------------------------------- /lib/ui/mainPage/fast_deploy.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | import 'package:NoneBotGUI/utils/global.dart'; 3 | 4 | import 'package:NoneBotGUI/utils/userConfig.dart'; 5 | import 'package:flutter/material.dart'; 6 | import 'package:http/http.dart' as http; 7 | 8 | class FastDeployList extends StatefulWidget { 9 | const FastDeployList({super.key}); 10 | 11 | @override 12 | State createState() => _HomeScreenState(); 13 | } 14 | 15 | class _HomeScreenState extends State { 16 | List data = []; 17 | 18 | @override 19 | void initState() { 20 | super.initState(); 21 | fetchData(); 22 | } 23 | 24 | @override 25 | void dispose() { 26 | super.dispose(); 27 | } 28 | 29 | Future fetchData() async { 30 | final response = await http 31 | .get(Uri.parse('https://api.nbgui.top/api/nbgui/deploy/list')); 32 | if (response.statusCode == 200) { 33 | setState(() { 34 | String decodedBody = 35 | UserConfig.httpEncoding().decode(response.bodyBytes); 36 | final List jsonData = json.decode(decodedBody); 37 | jsonData.sort((a, b) => b['id'] - a['id']); // 按id从大到小排序 38 | data = jsonData; 39 | }); 40 | } else { 41 | throw Exception('Failed to load data'); 42 | } 43 | } 44 | 45 | InkWell list(deploy) => InkWell( 46 | onTap: () { 47 | FastDeploy.id = deploy['id']; 48 | setState(() { 49 | FastDeploy.page++; 50 | }); 51 | }, 52 | child: Card( 53 | child: Stack( 54 | children: [ 55 | Positioned.fill( 56 | child: Padding( 57 | padding: const EdgeInsets.all(8.0), 58 | child: Column( 59 | mainAxisAlignment: MainAxisAlignment.start, 60 | crossAxisAlignment: CrossAxisAlignment.start, 61 | children: [ 62 | Text( 63 | deploy['name'] 64 | .toString() 65 | .substring(0, deploy['name'].length - 5), 66 | style: const TextStyle( 67 | fontWeight: FontWeight.bold, 68 | ), 69 | ), 70 | ], 71 | ), 72 | ), 73 | ), 74 | Positioned( 75 | left: 0, 76 | right: 0, 77 | bottom: 25, 78 | child: Padding( 79 | padding: const EdgeInsets.all(8.0), 80 | child: Text( 81 | deploy['desc'], 82 | style: TextStyle( 83 | fontSize: MediaQuery.of(context).textScaleFactor * 12, 84 | color: Colors.grey[550]), 85 | ), 86 | ), 87 | ), 88 | ], 89 | ), 90 | ), 91 | ); 92 | 93 | @override 94 | Widget build(BuildContext context) { 95 | return Scaffold( 96 | body: data.isEmpty 97 | ? const Center( 98 | child: Column( 99 | mainAxisAlignment: MainAxisAlignment.center, 100 | children: [CircularProgressIndicator()], 101 | ), 102 | ) 103 | : Container( 104 | margin: const EdgeInsets.fromLTRB(32, 20, 32, 12), 105 | child: GridView.builder( 106 | gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount( 107 | crossAxisCount: 3, 108 | crossAxisSpacing: 2, 109 | mainAxisSpacing: 2, 110 | childAspectRatio: 6 / 1, 111 | mainAxisExtent: 125), 112 | itemCount: data.length, 113 | itemBuilder: (BuildContext context, int index) => 114 | list(data[index]), 115 | ), 116 | ), 117 | floatingActionButton: FloatingActionButton( 118 | onPressed: () { 119 | setState(() { 120 | data.clear(); 121 | fetchData(); 122 | }); 123 | }, 124 | tooltip: "刷新列表", 125 | shape: const CircleBorder(), 126 | child: const Icon( 127 | Icons.refresh_rounded, 128 | color: Colors.white, 129 | ), 130 | ), 131 | floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked, 132 | ); 133 | } 134 | } 135 | -------------------------------------------------------------------------------- /lib/ui/manage/stderr.dart: -------------------------------------------------------------------------------- 1 | import 'package:NoneBotGUI/utils/manage.dart'; 2 | import 'package:bitsdojo_window/bitsdojo_window.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:window_manager/window_manager.dart'; 5 | 6 | class StdErr extends StatefulWidget { 7 | const StdErr({super.key}); 8 | 9 | @override 10 | State createState() => _HomeScreenState(); 11 | } 12 | 13 | class _HomeScreenState extends State { 14 | @override 15 | void dispose() { 16 | super.dispose(); 17 | } 18 | 19 | @override 20 | Widget build(BuildContext context) { 21 | return Scaffold( 22 | appBar: PreferredSize( 23 | preferredSize: const Size.fromHeight(50), 24 | child: Row( 25 | children: [ 26 | Expanded( 27 | child: MoveWindow( 28 | child: AppBar( 29 | title: Text( 30 | "${Bot.name()} - stderr.log", 31 | style: const TextStyle( 32 | color: Colors.white, 33 | fontSize: 20, 34 | ), 35 | ), 36 | actions: [ 37 | IconButton( 38 | icon: const Icon(Icons.delete_rounded), 39 | onPressed: () => _showConfirmationDialog(context), 40 | iconSize: 20, 41 | tooltip: "删除", 42 | ), 43 | IconButton( 44 | icon: const Icon(Icons.remove_rounded), 45 | color: Colors.white, 46 | onPressed: () => appWindow.minimize(), 47 | iconSize: 20, 48 | tooltip: "最小化", 49 | ), 50 | appWindow.isMaximized 51 | ? IconButton( 52 | icon: const Icon(Icons.rectangle_outlined), 53 | color: Colors.white, 54 | onPressed: () => setState(() { 55 | appWindow.restore(); 56 | }), 57 | iconSize: 20, 58 | tooltip: "恢复大小", 59 | ) 60 | : IconButton( 61 | icon: const Icon(Icons.rectangle_outlined), 62 | color: Colors.white, 63 | onPressed: () => setState(() { 64 | appWindow.maximize(); 65 | }), 66 | iconSize: 20, 67 | tooltip: "最大化", 68 | ), 69 | IconButton( 70 | icon: const Icon(Icons.close_rounded), 71 | color: Colors.white, 72 | onPressed: () => windowManager.hide(), 73 | iconSize: 20, 74 | tooltip: "关闭", 75 | ) 76 | ], 77 | ), 78 | ), 79 | ) 80 | ], 81 | ), 82 | ), 83 | body: SingleChildScrollView( 84 | child: SizedBox( 85 | width: 20000, 86 | child: Row( 87 | children: [ 88 | Expanded( 89 | child: Align( 90 | alignment: Alignment.centerLeft, 91 | child: Text(Bot.stderr()))), 92 | ], 93 | ), 94 | ), 95 | ), 96 | ); 97 | } 98 | } 99 | 100 | void _showConfirmationDialog(BuildContext context) { 101 | showDialog( 102 | context: context, 103 | builder: (BuildContext context) { 104 | return AlertDialog( 105 | title: const Text('删除'), 106 | content: const Text('你确定要删除吗?'), 107 | actions: [ 108 | TextButton( 109 | child: const Text('取消'), 110 | onPressed: () { 111 | Navigator.of(context).pop(); 112 | }, 113 | ), 114 | TextButton( 115 | child: const Text( 116 | '确定', 117 | style: TextStyle(color: Color.fromRGBO(238, 109, 109, 1)), 118 | ), 119 | onPressed: () { 120 | Navigator.of(context).pop(); 121 | Bot.deleteStderr(); 122 | ScaffoldMessenger.of(context).showSnackBar( 123 | const SnackBar( 124 | content: Text('已删除'), 125 | duration: Duration(seconds: 3), 126 | ), 127 | ); 128 | }, 129 | ), 130 | ], 131 | ); 132 | }, 133 | ); 134 | } 135 | -------------------------------------------------------------------------------- /lib/utils/core.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | import 'dart:io'; 3 | import 'dart:core'; 4 | import 'package:NoneBotGUI/utils/manage.dart'; 5 | import 'package:NoneBotGUI/utils/userConfig.dart'; 6 | import 'package:path_provider/path_provider.dart'; 7 | import 'package:NoneBotGUI/utils/global.dart'; 8 | import 'package:toml/toml.dart'; 9 | import 'package:path/path.dart' as path; 10 | 11 | ///初始化nbgui 12 | nbguiInit() async { 13 | Directory usrDir = await getApplicationSupportDirectory(); 14 | if (!usrDir.existsSync()) { 15 | usrDir.createSync(); 16 | } 17 | String dir = usrDir.path; 18 | File cfgFile = File('$dir/user_config.json'); 19 | if (!cfgFile.existsSync()) { 20 | String cfg = ''' 21 | { 22 | "python":"default", 23 | "nbcli":"default", 24 | "color":"light", 25 | "checkUpdate": true, 26 | "encoding": "systemEncoding", 27 | "httpencoding": "utf8", 28 | "botEncoding": "systemEncoding", 29 | "protocolEncoding": "utf8", 30 | "deployEncoding": "systemEncoding", 31 | "mirror": "https://registry.nonebot.dev", 32 | "refreshMode": "auto" 33 | } 34 | '''; 35 | cfgFile.writeAsStringSync(cfg); 36 | } 37 | Directory botDir = Directory('$dir/bots/'); 38 | if (!botDir.existsSync()) { 39 | botDir.createSync(); 40 | } 41 | return dir; 42 | } 43 | 44 | ///检查py 45 | Future getPyVer() async { 46 | try { 47 | ProcessResult results = 48 | await Process.run('${UserConfig.pythonPath()}', ['--version']); 49 | return results.stdout.trim(); 50 | } catch (e) { 51 | return '你似乎还没有安装python?'; 52 | } 53 | } 54 | 55 | ///检查nbcli 56 | Future getnbcliver() async { 57 | try { 58 | final ProcessResult results = 59 | await Process.run('${UserConfig.nbcliPath()}', ['-V']); 60 | return results.stdout; 61 | } catch (error) { 62 | return '你似乎还没有安装nb-cli?'; 63 | } 64 | } 65 | 66 | //补救用,发现进managebot时如果找不到stderr就会炸() 67 | createLog(path) { 68 | File stdout = File('$path/nbgui_stdout.log'); 69 | File stderr = File('$path/nbgui_stderr.log'); 70 | File disable = File('$path/.disabled_plugins'); 71 | if (!stdout.existsSync()) { 72 | stdout.createSync(); 73 | } 74 | if (!stderr.existsSync()) { 75 | stderr.createSync(); 76 | } 77 | if (!disable.existsSync()) { 78 | disable.createSync(); 79 | } 80 | } 81 | 82 | ///清除日志 83 | clearLog(path) async { 84 | File stdout = File('$path/nbgui_stdout.log'); 85 | stdout.delete(); 86 | String info = "[INFO]Welcome to Nonebot GUI!"; 87 | stdout.writeAsString(info); 88 | } 89 | 90 | ///从pyproject.toml中读取插件列表 91 | List getPluginList() { 92 | File pyprojectFile = File('${Bot.path()}/pyproject.toml'); 93 | pyprojectFile.writeAsStringSync(pyprojectFile 94 | .readAsStringSync() 95 | .replaceAll('\r\n', '\n') 96 | .replaceAll('\r', '\n')); 97 | String pyprojectContent = 98 | pyprojectFile.readAsStringSync(encoding: systemEncoding); 99 | List linesWithoutComments = pyprojectContent 100 | .split('\n') 101 | .map((line) { 102 | int commentIndex = line.indexOf('#'); 103 | if (commentIndex != -1) { 104 | return line.substring(0, commentIndex).trim(); 105 | } 106 | return line; 107 | }) 108 | .where((line) => line.isNotEmpty) 109 | .toList(); 110 | String pyprojectWithoutComments = linesWithoutComments.join('\n'); 111 | // 解析 TOML 文件 112 | var toml = TomlDocument.parse(pyprojectWithoutComments).toMap(); 113 | var nonebot = toml['tool']['nonebot']; 114 | List pluginsList = nonebot['plugins']; 115 | 116 | return pluginsList; 117 | } 118 | 119 | getDisabledPluginList() { 120 | File disable = File('${Bot.path()}/.disabled_plugins'); 121 | String content = disable.readAsStringSync(); 122 | List disabledPlugins = content.split('\n'); 123 | return disabledPlugins; 124 | } 125 | 126 | ///获取协议端文件名 127 | getProtocolFileName() { 128 | String ucmd = FastDeploy.cmd.replaceAll('./', '').replaceAll('.\\', ''); 129 | List cmdList = ucmd.split(' ').toList(); 130 | String pcmd = ''; 131 | if (cmdList.length > 1) { 132 | pcmd = cmdList[0]; 133 | } else { 134 | pcmd = cmdList[0]; 135 | } 136 | FastDeploy.protocolFileName = pcmd; 137 | } 138 | 139 | //获取extDir 140 | Future getExtDir(String fileName, String searchDirectory) async { 141 | Directory dir = Directory(searchDirectory); 142 | 143 | if (await dir.exists()) { 144 | List entities = dir.listSync(recursive: true); 145 | for (FileSystemEntity entity in entities) { 146 | if (entity is File && path.basename(entity.path) == fileName) { 147 | String normalizedPath = 148 | path.normalize(path.dirname(entity.absolute.path)); 149 | String escapedPath = normalizedPath.replaceAll(r'\', r'\\'); 150 | return escapedPath; 151 | } 152 | } 153 | } else { 154 | print('Directory does not exist: $searchDirectory'); 155 | } 156 | return null; 157 | } 158 | 159 | ///打开文件夹 160 | Future openFolder(path) async { 161 | if (Platform.isWindows) { 162 | await Process.run('explorer', [path]); 163 | } else if (Platform.isLinux) { 164 | await Process.run('xdg-open', [path]); 165 | } else if (Platform.isMacOS) { 166 | await Process.run('open', [path]); 167 | } 168 | } 169 | 170 | ///清除stderr 171 | deleteStderr(dir) { 172 | File stderrfile = File('$dir/nbgui_stderr.log'); 173 | String clear = ""; 174 | stderrfile.writeAsString(clear); 175 | } 176 | 177 | ///检查bot的type键 178 | //适配老东西( 179 | checkBotType() { 180 | File botcfg = File('$userDir/bots/${gOnOpen}.json'); 181 | Map jsonMap = jsonDecode(botcfg.readAsStringSync()); 182 | if (jsonMap.containsKey('type')) { 183 | return (jsonMap['type'] == 'deployed') ? true : false; 184 | } else { 185 | return false; 186 | } 187 | } 188 | 189 | ///设置快速部署的路径 190 | setDeployPath(path, name) { 191 | if (Platform.isWindows) { 192 | FastDeploy.path = '${path.toString().replaceAll('\\', '\\\\')}\\\\$name'; 193 | } else if (Platform.isLinux || Platform.isMacOS) { 194 | FastDeploy.path = '$path/$name'; 195 | } 196 | } 197 | -------------------------------------------------------------------------------- /lib/utils/global.dart: -------------------------------------------------------------------------------- 1 | //全局变量 2 | //用户目录 3 | late final userDir; 4 | 5 | ///当前打开的Bot 6 | String gOnOpen = ''; 7 | 8 | class MainApp { 9 | ///log 10 | static late String nbLog; 11 | 12 | ///协议端日志 13 | static late String protocolLog; 14 | 15 | ///版本号 16 | static late String version; 17 | 18 | static late int broadcastId; 19 | 20 | ///部署id 21 | static late int deployId; 22 | 23 | ///侧边栏是否展开 24 | static late bool barExtended; 25 | } 26 | 27 | ///快速部署相关 28 | class FastDeploy { 29 | ///快速部署页面 30 | static late int page; 31 | 32 | ///编号 33 | static late int id; 34 | 35 | ///下载连接 36 | static late List dlLink; 37 | 38 | ///部署时是否启用虚拟环境 39 | static late bool venv; 40 | 41 | ///部署路径 42 | static late String path; 43 | 44 | ///选择的路径 45 | static late String selectPath; 46 | 47 | ///部署名称 48 | static late String name; 49 | 50 | ///Websocket主机 51 | static late String wsHost; 52 | 53 | ///Websocket端口 54 | static late String wsPort; 55 | 56 | ///协议端本体解压后的目录 57 | static late String extDir; 58 | 59 | ///协议端配置文件 60 | static late String botConfig; 61 | 62 | ///协议端配置文件是否包含QQ号 63 | static late bool needQQ; 64 | 65 | ///如果需要QQ号,那么Bot的QQ号是?(诶诶真麻烦) 66 | static late String botQQ; 67 | 68 | ///协议端配置文件的相对路径 69 | static late String configPath; 70 | 71 | ///协议端配置文件的名称 72 | static late String configName; 73 | 74 | ///配套安装的驱动器 75 | static late String driver; 76 | 77 | ///配套安装的适配器 78 | static late String adapter; 79 | 80 | ///启动协议端的命令 81 | static late String cmd; 82 | 83 | ///模板 84 | static late String template; 85 | 86 | ///插件存放位置 87 | static late String pluginDir; 88 | 89 | ///协议端文件名 90 | static late String protocolFileName; 91 | } 92 | 93 | ///创建Bot相关 94 | class Create { 95 | ///Bot名称 96 | static late String name; 97 | 98 | ///Bot路径 99 | static late String? path; 100 | 101 | ///是否启用虚拟环境 102 | static late bool venv; 103 | 104 | ///是否立刻安装依赖 105 | static late bool installDep; 106 | 107 | ///适配器 108 | static late String adapter; 109 | 110 | ///驱动器 111 | static late String driver; 112 | 113 | ///模板 114 | static late String template; 115 | 116 | ///插件存放位置 117 | static late String pluginDir; 118 | } 119 | 120 | ///Bot.time列表 121 | List botList = []; 122 | -------------------------------------------------------------------------------- /linux/.gitignore: -------------------------------------------------------------------------------- 1 | flutter/ephemeral 2 | -------------------------------------------------------------------------------- /linux/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Project-level configuration. 2 | cmake_minimum_required(VERSION 3.10) 3 | project(runner LANGUAGES CXX) 4 | 5 | # The name of the executable created for the application. Change this to change 6 | # the on-disk name of your application. 7 | set(BINARY_NAME "NoneBotGUI") 8 | # The unique GTK application identifier for this application. See: 9 | # https://wiki.gnome.org/HowDoI/ChooseApplicationID 10 | set(APPLICATION_ID "com.nightwind.NonebotGUI") 11 | 12 | # Explicitly opt in to modern CMake behaviors to avoid warnings with recent 13 | # versions of CMake. 14 | cmake_policy(SET CMP0063 NEW) 15 | 16 | # Load bundled libraries from the lib/ directory relative to the binary. 17 | set(CMAKE_INSTALL_RPATH "$ORIGIN/lib") 18 | 19 | # Root filesystem for cross-building. 20 | if(FLUTTER_TARGET_PLATFORM_SYSROOT) 21 | set(CMAKE_SYSROOT ${FLUTTER_TARGET_PLATFORM_SYSROOT}) 22 | set(CMAKE_FIND_ROOT_PATH ${CMAKE_SYSROOT}) 23 | set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) 24 | set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) 25 | set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) 26 | set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) 27 | endif() 28 | 29 | # Define build configuration options. 30 | if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) 31 | set(CMAKE_BUILD_TYPE "Debug" CACHE 32 | STRING "Flutter build mode" FORCE) 33 | set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS 34 | "Debug" "Profile" "Release") 35 | endif() 36 | 37 | # Compilation settings that should be applied to most targets. 38 | # 39 | # Be cautious about adding new options here, as plugins use this function by 40 | # default. In most cases, you should add new options to specific targets instead 41 | # of modifying this function. 42 | function(APPLY_STANDARD_SETTINGS TARGET) 43 | target_compile_features(${TARGET} PUBLIC cxx_std_14) 44 | target_compile_options(${TARGET} PRIVATE -Wall -Werror) 45 | target_compile_options(${TARGET} PRIVATE "$<$>:-O3>") 46 | target_compile_definitions(${TARGET} PRIVATE "$<$>:NDEBUG>") 47 | endfunction() 48 | 49 | # Flutter library and tool build rules. 50 | set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") 51 | add_subdirectory(${FLUTTER_MANAGED_DIR}) 52 | 53 | # System-level dependencies. 54 | find_package(PkgConfig REQUIRED) 55 | pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) 56 | 57 | add_definitions(-DAPPLICATION_ID="${APPLICATION_ID}") 58 | 59 | # Define the application target. To change its name, change BINARY_NAME above, 60 | # not the value here, or `flutter run` will no longer work. 61 | # 62 | # Any new source files that you add to the application should be added here. 63 | add_executable(${BINARY_NAME} 64 | "main.cc" 65 | "my_application.cc" 66 | "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" 67 | ) 68 | 69 | # Apply the standard set of build settings. This can be removed for applications 70 | # that need different build settings. 71 | apply_standard_settings(${BINARY_NAME}) 72 | 73 | # Add dependency libraries. Add any application-specific dependencies here. 74 | target_link_libraries(${BINARY_NAME} PRIVATE flutter) 75 | target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK) 76 | 77 | # Run the Flutter tool portions of the build. This must not be removed. 78 | add_dependencies(${BINARY_NAME} flutter_assemble) 79 | 80 | # Only the install-generated bundle's copy of the executable will launch 81 | # correctly, since the resources must in the right relative locations. To avoid 82 | # people trying to run the unbundled copy, put it in a subdirectory instead of 83 | # the default top-level location. 84 | set_target_properties(${BINARY_NAME} 85 | PROPERTIES 86 | RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/intermediates_do_not_run" 87 | ) 88 | 89 | 90 | # Generated plugin build rules, which manage building the plugins and adding 91 | # them to the application. 92 | include(flutter/generated_plugins.cmake) 93 | 94 | 95 | # === Installation === 96 | # By default, "installing" just makes a relocatable bundle in the build 97 | # directory. 98 | set(BUILD_BUNDLE_DIR "${PROJECT_BINARY_DIR}/bundle") 99 | if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) 100 | set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) 101 | endif() 102 | 103 | # Start with a clean build bundle directory every time. 104 | install(CODE " 105 | file(REMOVE_RECURSE \"${BUILD_BUNDLE_DIR}/\") 106 | " COMPONENT Runtime) 107 | 108 | set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") 109 | set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib") 110 | 111 | install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}" 112 | COMPONENT Runtime) 113 | 114 | install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" 115 | COMPONENT Runtime) 116 | 117 | install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 118 | COMPONENT Runtime) 119 | 120 | foreach(bundled_library ${PLUGIN_BUNDLED_LIBRARIES}) 121 | install(FILES "${bundled_library}" 122 | DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 123 | COMPONENT Runtime) 124 | endforeach(bundled_library) 125 | 126 | # Copy the native assets provided by the build.dart from all packages. 127 | set(NATIVE_ASSETS_DIR "${PROJECT_BUILD_DIR}native_assets/linux/") 128 | install(DIRECTORY "${NATIVE_ASSETS_DIR}" 129 | DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 130 | COMPONENT Runtime) 131 | 132 | # Fully re-copy the assets directory on each build to avoid having stale files 133 | # from a previous install. 134 | set(FLUTTER_ASSET_DIR_NAME "flutter_assets") 135 | install(CODE " 136 | file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") 137 | " COMPONENT Runtime) 138 | install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" 139 | DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) 140 | 141 | # Install the AOT library on non-Debug builds only. 142 | if(NOT CMAKE_BUILD_TYPE MATCHES "Debug") 143 | install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 144 | COMPONENT Runtime) 145 | endif() 146 | -------------------------------------------------------------------------------- /linux/flutter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file controls Flutter-level build steps. It should not be edited. 2 | cmake_minimum_required(VERSION 3.10) 3 | 4 | set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral") 5 | 6 | # Configuration provided via flutter tool. 7 | include(${EPHEMERAL_DIR}/generated_config.cmake) 8 | 9 | # TODO: Move the rest of this into files in ephemeral. See 10 | # https://github.com/flutter/flutter/issues/57146. 11 | 12 | # Serves the same purpose as list(TRANSFORM ... PREPEND ...), 13 | # which isn't available in 3.10. 14 | function(list_prepend LIST_NAME PREFIX) 15 | set(NEW_LIST "") 16 | foreach(element ${${LIST_NAME}}) 17 | list(APPEND NEW_LIST "${PREFIX}${element}") 18 | endforeach(element) 19 | set(${LIST_NAME} "${NEW_LIST}" PARENT_SCOPE) 20 | endfunction() 21 | 22 | # === Flutter Library === 23 | # System-level dependencies. 24 | find_package(PkgConfig REQUIRED) 25 | pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) 26 | pkg_check_modules(GLIB REQUIRED IMPORTED_TARGET glib-2.0) 27 | pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0) 28 | 29 | set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/libflutter_linux_gtk.so") 30 | 31 | # Published to parent scope for install step. 32 | set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) 33 | set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) 34 | set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) 35 | set(AOT_LIBRARY "${PROJECT_DIR}/build/lib/libapp.so" PARENT_SCOPE) 36 | 37 | list(APPEND FLUTTER_LIBRARY_HEADERS 38 | "fl_basic_message_channel.h" 39 | "fl_binary_codec.h" 40 | "fl_binary_messenger.h" 41 | "fl_dart_project.h" 42 | "fl_engine.h" 43 | "fl_json_message_codec.h" 44 | "fl_json_method_codec.h" 45 | "fl_message_codec.h" 46 | "fl_method_call.h" 47 | "fl_method_channel.h" 48 | "fl_method_codec.h" 49 | "fl_method_response.h" 50 | "fl_plugin_registrar.h" 51 | "fl_plugin_registry.h" 52 | "fl_standard_message_codec.h" 53 | "fl_standard_method_codec.h" 54 | "fl_string_codec.h" 55 | "fl_value.h" 56 | "fl_view.h" 57 | "flutter_linux.h" 58 | ) 59 | list_prepend(FLUTTER_LIBRARY_HEADERS "${EPHEMERAL_DIR}/flutter_linux/") 60 | add_library(flutter INTERFACE) 61 | target_include_directories(flutter INTERFACE 62 | "${EPHEMERAL_DIR}" 63 | ) 64 | target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}") 65 | target_link_libraries(flutter INTERFACE 66 | PkgConfig::GTK 67 | PkgConfig::GLIB 68 | PkgConfig::GIO 69 | ) 70 | add_dependencies(flutter flutter_assemble) 71 | 72 | # === Flutter tool backend === 73 | # _phony_ is a non-existent file to force this command to run every time, 74 | # since currently there's no way to get a full input/output list from the 75 | # flutter tool. 76 | add_custom_command( 77 | OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} 78 | ${CMAKE_CURRENT_BINARY_DIR}/_phony_ 79 | COMMAND ${CMAKE_COMMAND} -E env 80 | ${FLUTTER_TOOL_ENVIRONMENT} 81 | "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.sh" 82 | ${FLUTTER_TARGET_PLATFORM} ${CMAKE_BUILD_TYPE} 83 | VERBATIM 84 | ) 85 | add_custom_target(flutter_assemble DEPENDS 86 | "${FLUTTER_LIBRARY}" 87 | ${FLUTTER_LIBRARY_HEADERS} 88 | ) 89 | -------------------------------------------------------------------------------- /linux/flutter/generated_plugin_registrant.cc: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #include "generated_plugin_registrant.h" 8 | 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | 16 | void fl_register_plugins(FlPluginRegistry* registry) { 17 | g_autoptr(FlPluginRegistrar) bitsdojo_window_linux_registrar = 18 | fl_plugin_registry_get_registrar_for_plugin(registry, "BitsdojoWindowPlugin"); 19 | bitsdojo_window_plugin_register_with_registrar(bitsdojo_window_linux_registrar); 20 | g_autoptr(FlPluginRegistrar) local_notifier_registrar = 21 | fl_plugin_registry_get_registrar_for_plugin(registry, "LocalNotifierPlugin"); 22 | local_notifier_plugin_register_with_registrar(local_notifier_registrar); 23 | g_autoptr(FlPluginRegistrar) screen_retriever_registrar = 24 | fl_plugin_registry_get_registrar_for_plugin(registry, "ScreenRetrieverPlugin"); 25 | screen_retriever_plugin_register_with_registrar(screen_retriever_registrar); 26 | g_autoptr(FlPluginRegistrar) tray_manager_registrar = 27 | fl_plugin_registry_get_registrar_for_plugin(registry, "TrayManagerPlugin"); 28 | tray_manager_plugin_register_with_registrar(tray_manager_registrar); 29 | g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar = 30 | fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin"); 31 | url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar); 32 | g_autoptr(FlPluginRegistrar) window_manager_registrar = 33 | fl_plugin_registry_get_registrar_for_plugin(registry, "WindowManagerPlugin"); 34 | window_manager_plugin_register_with_registrar(window_manager_registrar); 35 | } 36 | -------------------------------------------------------------------------------- /linux/flutter/generated_plugin_registrant.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #ifndef GENERATED_PLUGIN_REGISTRANT_ 8 | #define GENERATED_PLUGIN_REGISTRANT_ 9 | 10 | #include 11 | 12 | // Registers Flutter plugins. 13 | void fl_register_plugins(FlPluginRegistry* registry); 14 | 15 | #endif // GENERATED_PLUGIN_REGISTRANT_ 16 | -------------------------------------------------------------------------------- /linux/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | bitsdojo_window_linux 7 | local_notifier 8 | screen_retriever 9 | tray_manager 10 | url_launcher_linux 11 | window_manager 12 | ) 13 | 14 | list(APPEND FLUTTER_FFI_PLUGIN_LIST 15 | ) 16 | 17 | set(PLUGIN_BUNDLED_LIBRARIES) 18 | 19 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 20 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin}) 21 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 22 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 23 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 24 | endforeach(plugin) 25 | 26 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) 27 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin}) 28 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) 29 | endforeach(ffi_plugin) 30 | -------------------------------------------------------------------------------- /linux/main.cc: -------------------------------------------------------------------------------- 1 | #include "my_application.h" 2 | 3 | int main(int argc, char** argv) { 4 | g_autoptr(MyApplication) app = my_application_new(); 5 | return g_application_run(G_APPLICATION(app), argc, argv); 6 | } 7 | -------------------------------------------------------------------------------- /linux/my_application.cc: -------------------------------------------------------------------------------- 1 | #include "my_application.h" 2 | 3 | #include 4 | #ifdef GDK_WINDOWING_X11 5 | #include 6 | #endif 7 | 8 | #include "flutter/generated_plugin_registrant.h" 9 | #include 10 | 11 | 12 | struct _MyApplication { 13 | GtkApplication parent_instance; 14 | char** dart_entrypoint_arguments; 15 | }; 16 | 17 | G_DEFINE_TYPE(MyApplication, my_application, GTK_TYPE_APPLICATION) 18 | 19 | // Implements GApplication::activate. 20 | static void my_application_activate(GApplication* application) { 21 | MyApplication* self = MY_APPLICATION(application); 22 | GtkWindow* window = 23 | GTK_WINDOW(gtk_application_window_new(GTK_APPLICATION(application))); 24 | 25 | // Use a header bar when running in GNOME as this is the common style used 26 | // by applications and is the setup most users will be using (e.g. Ubuntu 27 | // desktop). 28 | // If running on X and not using GNOME then just use a traditional title bar 29 | // in case the window manager does more exotic layout, e.g. tiling. 30 | // If running on Wayland assume the header bar will work (may need changing 31 | // if future cases occur). 32 | gboolean use_header_bar = TRUE; 33 | #ifdef GDK_WINDOWING_X11 34 | GdkScreen* screen = gtk_window_get_screen(window); 35 | if (GDK_IS_X11_SCREEN(screen)) { 36 | const gchar* wm_name = gdk_x11_screen_get_window_manager_name(screen); 37 | if (g_strcmp0(wm_name, "GNOME Shell") != 0) { 38 | use_header_bar = FALSE; 39 | } 40 | } 41 | #endif 42 | if (use_header_bar) { 43 | GtkHeaderBar* header_bar = GTK_HEADER_BAR(gtk_header_bar_new()); 44 | gtk_widget_show(GTK_WIDGET(header_bar)); 45 | gtk_header_bar_set_title(header_bar, "NoneBot GUI"); 46 | gtk_header_bar_set_show_close_button(header_bar, TRUE); 47 | gtk_window_set_titlebar(window, GTK_WIDGET(header_bar)); 48 | } else { 49 | gtk_window_set_title(window, "NoneBot GUI"); 50 | } 51 | 52 | auto bdw = bitsdojo_window_from(window); // <--- add this line 53 | bdw->setCustomFrame(true); // <-- add this line 54 | //gtk_window_set_default_size(window, 1280, 720); // <-- comment this line 55 | gtk_widget_show(GTK_WIDGET(window)); 56 | 57 | 58 | g_autoptr(FlDartProject) project = fl_dart_project_new(); 59 | fl_dart_project_set_dart_entrypoint_arguments(project, self->dart_entrypoint_arguments); 60 | 61 | FlView* view = fl_view_new(project); 62 | gtk_widget_show(GTK_WIDGET(view)); 63 | gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(view)); 64 | 65 | fl_register_plugins(FL_PLUGIN_REGISTRY(view)); 66 | 67 | gtk_widget_grab_focus(GTK_WIDGET(view)); 68 | } 69 | 70 | // Implements GApplication::local_command_line. 71 | static gboolean my_application_local_command_line(GApplication* application, gchar*** arguments, int* exit_status) { 72 | MyApplication* self = MY_APPLICATION(application); 73 | // Strip out the first argument as it is the binary name. 74 | self->dart_entrypoint_arguments = g_strdupv(*arguments + 1); 75 | 76 | g_autoptr(GError) error = nullptr; 77 | if (!g_application_register(application, nullptr, &error)) { 78 | g_warning("Failed to register: %s", error->message); 79 | *exit_status = 1; 80 | return TRUE; 81 | } 82 | 83 | g_application_activate(application); 84 | *exit_status = 0; 85 | 86 | return TRUE; 87 | } 88 | 89 | // Implements GApplication::startup. 90 | static void my_application_startup(GApplication* application) { 91 | //MyApplication* self = MY_APPLICATION(object); 92 | 93 | // Perform any actions required at application startup. 94 | 95 | G_APPLICATION_CLASS(my_application_parent_class)->startup(application); 96 | } 97 | 98 | // Implements GApplication::shutdown. 99 | static void my_application_shutdown(GApplication* application) { 100 | //MyApplication* self = MY_APPLICATION(object); 101 | 102 | // Perform any actions required at application shutdown. 103 | 104 | G_APPLICATION_CLASS(my_application_parent_class)->shutdown(application); 105 | } 106 | 107 | // Implements GObject::dispose. 108 | static void my_application_dispose(GObject* object) { 109 | MyApplication* self = MY_APPLICATION(object); 110 | g_clear_pointer(&self->dart_entrypoint_arguments, g_strfreev); 111 | G_OBJECT_CLASS(my_application_parent_class)->dispose(object); 112 | } 113 | 114 | static void my_application_class_init(MyApplicationClass* klass) { 115 | G_APPLICATION_CLASS(klass)->activate = my_application_activate; 116 | G_APPLICATION_CLASS(klass)->local_command_line = my_application_local_command_line; 117 | G_APPLICATION_CLASS(klass)->startup = my_application_startup; 118 | G_APPLICATION_CLASS(klass)->shutdown = my_application_shutdown; 119 | G_OBJECT_CLASS(klass)->dispose = my_application_dispose; 120 | } 121 | 122 | static void my_application_init(MyApplication* self) {} 123 | 124 | MyApplication* my_application_new() { 125 | return MY_APPLICATION(g_object_new(my_application_get_type(), 126 | "application-id", APPLICATION_ID, 127 | "flags", G_APPLICATION_NON_UNIQUE, 128 | nullptr)); 129 | } 130 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /linux/packaging/appimage/make_config.yaml: -------------------------------------------------------------------------------- 1 | display_name: NoneBotGUI 2 | app_binary_name: NoneBotGUI 3 | 4 | icon: asset/icon/icon.png 5 | 6 | keywords: 7 | - Nonebot 8 | 9 | generic_name: NoneBotGUI 10 | 11 | actions: [] 12 | 13 | categories: 14 | - Utility 15 | 16 | startup_notify: true 17 | 18 | # 您可以指定要与您的应用捆绑的共享库 19 | # 20 | # flutter_distributor 会自动检测您的应用所依赖的共享库,但您也可以在此处手动指定它们。 21 | # 22 | # 以下示例展示了如何将 libcurl 库与您的应用捆绑在一起 23 | # 24 | # include: 25 | # - libcurl.so.4 26 | include: [] -------------------------------------------------------------------------------- /linux/packaging/deb/make_config.yaml: -------------------------------------------------------------------------------- 1 | display_name: NoneBotGUI 2 | package_name: NoneBotGUI 3 | maintainer: 4 | name: 【夜风】NightWind 5 | email: HT30332@126.com 6 | co_authors: 7 | - name: 【夜风】NightWind 8 | email: HT30332@126.com 9 | priority: optional 10 | section: x11 11 | installed_size: 6604 12 | essential: false 13 | icon: asset/icon/icon.png 14 | 15 | postinstall_scripts: [] 16 | postuninstall_scripts: 17 | - 'echo 感谢您的使用,再见!' 18 | 19 | keywords: 20 | - Nonebot 21 | 22 | generic_name: NoneBotGUI 23 | 24 | categories: 25 | - Utility 26 | 27 | startup_notify: true 28 | -------------------------------------------------------------------------------- /linux/packaging/rpm/make_config.yaml: -------------------------------------------------------------------------------- 1 | icon: asset/icon/icon.png 2 | summary: 新一代Nonebot图形化界面 3 | group: Application/Utility 4 | vendor: 【夜风】NightWind 5 | packager: 【夜风】NightWind 6 | packagerEmail: HT30332@126.com 7 | license: GPL3 8 | url: https://github.com/XTxiaoting14332/nonebot-flutter-gui 9 | build_arch: x86_64 10 | 11 | display_name: NoneBotGUI 12 | 13 | keywords: 14 | - Nonebot 15 | 16 | generic_name: NoneBotGUI 17 | 18 | categories: 19 | - Utility 20 | 21 | startup_notify: true -------------------------------------------------------------------------------- /macos/.gitignore: -------------------------------------------------------------------------------- 1 | # Flutter-related 2 | **/Flutter/ephemeral/ 3 | **/Pods/ 4 | 5 | # Xcode-related 6 | **/dgph 7 | **/xcuserdata/ 8 | -------------------------------------------------------------------------------- /macos/Flutter/Flutter-Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "ephemeral/Flutter-Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /macos/Flutter/Flutter-Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "ephemeral/Flutter-Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /macos/Flutter/GeneratedPluginRegistrant.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | import FlutterMacOS 6 | import Foundation 7 | 8 | import bitsdojo_window_macos 9 | import local_notifier 10 | import path_provider_foundation 11 | import screen_retriever 12 | import tray_manager 13 | import url_launcher_macos 14 | import window_manager 15 | 16 | func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { 17 | BitsdojoWindowPlugin.register(with: registry.registrar(forPlugin: "BitsdojoWindowPlugin")) 18 | LocalNotifierPlugin.register(with: registry.registrar(forPlugin: "LocalNotifierPlugin")) 19 | PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) 20 | ScreenRetrieverPlugin.register(with: registry.registrar(forPlugin: "ScreenRetrieverPlugin")) 21 | TrayManagerPlugin.register(with: registry.registrar(forPlugin: "TrayManagerPlugin")) 22 | UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin")) 23 | WindowManagerPlugin.register(with: registry.registrar(forPlugin: "WindowManagerPlugin")) 24 | } 25 | -------------------------------------------------------------------------------- /macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 43 | 49 | 50 | 51 | 52 | 53 | 63 | 65 | 71 | 72 | 73 | 74 | 80 | 82 | 88 | 89 | 90 | 91 | 93 | 94 | 97 | 98 | 99 | -------------------------------------------------------------------------------- /macos/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /macos/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | 4 | @NSApplicationMain 5 | class AppDelegate: FlutterAppDelegate { 6 | override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { 7 | return true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "16x16", 5 | "idiom" : "mac", 6 | "filename" : "app_icon_16.png", 7 | "scale" : "1x" 8 | }, 9 | { 10 | "size" : "16x16", 11 | "idiom" : "mac", 12 | "filename" : "app_icon_32.png", 13 | "scale" : "2x" 14 | }, 15 | { 16 | "size" : "32x32", 17 | "idiom" : "mac", 18 | "filename" : "app_icon_32.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "32x32", 23 | "idiom" : "mac", 24 | "filename" : "app_icon_64.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "128x128", 29 | "idiom" : "mac", 30 | "filename" : "app_icon_128.png", 31 | "scale" : "1x" 32 | }, 33 | { 34 | "size" : "128x128", 35 | "idiom" : "mac", 36 | "filename" : "app_icon_256.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "256x256", 41 | "idiom" : "mac", 42 | "filename" : "app_icon_256.png", 43 | "scale" : "1x" 44 | }, 45 | { 46 | "size" : "256x256", 47 | "idiom" : "mac", 48 | "filename" : "app_icon_512.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "512x512", 53 | "idiom" : "mac", 54 | "filename" : "app_icon_512.png", 55 | "scale" : "1x" 56 | }, 57 | { 58 | "size" : "512x512", 59 | "idiom" : "mac", 60 | "filename" : "app_icon_1024.png", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NonebotGUI/nonebot-flutter-gui/74fb214e9247bacde29baf0f476f2d968b93e842/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NonebotGUI/nonebot-flutter-gui/74fb214e9247bacde29baf0f476f2d968b93e842/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NonebotGUI/nonebot-flutter-gui/74fb214e9247bacde29baf0f476f2d968b93e842/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NonebotGUI/nonebot-flutter-gui/74fb214e9247bacde29baf0f476f2d968b93e842/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NonebotGUI/nonebot-flutter-gui/74fb214e9247bacde29baf0f476f2d968b93e842/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NonebotGUI/nonebot-flutter-gui/74fb214e9247bacde29baf0f476f2d968b93e842/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NonebotGUI/nonebot-flutter-gui/74fb214e9247bacde29baf0f476f2d968b93e842/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png -------------------------------------------------------------------------------- /macos/Runner/Configs/AppInfo.xcconfig: -------------------------------------------------------------------------------- 1 | // Application-level settings for the Runner target. 2 | // 3 | // This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the 4 | // future. If not, the values below would default to using the project name when this becomes a 5 | // 'flutter create' template. 6 | 7 | // The application's name. By default this is also the title of the Flutter window. 8 | PRODUCT_NAME = NoneBotGUI 9 | 10 | // The application's bundle identifier 11 | PRODUCT_BUNDLE_IDENTIFIER = com.nightwind.NonebotGUI 12 | 13 | // The copyright displayed in application information 14 | PRODUCT_COPYRIGHT = Copyright © 2023 com.nightwind. All rights reserved. 15 | -------------------------------------------------------------------------------- /macos/Runner/Configs/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Debug.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /macos/Runner/Configs/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Release.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /macos/Runner/Configs/Warnings.xcconfig: -------------------------------------------------------------------------------- 1 | WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings 2 | GCC_WARN_UNDECLARED_SELECTOR = YES 3 | CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES 4 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE 5 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES 6 | CLANG_WARN_PRAGMA_PACK = YES 7 | CLANG_WARN_STRICT_PROTOTYPES = YES 8 | CLANG_WARN_COMMA = YES 9 | GCC_WARN_STRICT_SELECTOR_MATCH = YES 10 | CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES 11 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES 12 | GCC_WARN_SHADOW = YES 13 | CLANG_WARN_UNREACHABLE_CODE = YES 14 | -------------------------------------------------------------------------------- /macos/Runner/DebugProfile.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.cs.allow-jit 8 | 9 | com.apple.security.network.server 10 | 11 | com.apple.security.filesystem.read-write 12 | 13 | com.apple.security.files.bookmarks.app-scope 14 | 15 | com.apple.security.files.downloads.read-write 16 | 17 | com.apple.security.network.client 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /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 | CFBundleURLTypes 32 | 33 | 34 | CFBundleURLName 35 | 36 | LoCyanFrp 37 | CFBundleURLSchemes 38 | 39 | 40 | locyanfrp 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /macos/Runner/MainFlutterWindow.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | 4 | import bitsdojo_window_macos 5 | 6 | class MainFlutterWindow: BitsdojoWindow { 7 | override func bitsdojo_window_configure() -> UInt { 8 | return BDW_CUSTOM_FRAME | BDW_HIDE_ON_STARTUP 9 | } 10 | 11 | override func awakeFromNib() { 12 | let flutterViewController = FlutterViewController() 13 | let windowFrame = self.frame 14 | self.contentViewController = flutterViewController 15 | self.standardWindowButton(NSWindow.ButtonType.closeButton)?.isHidden = true 16 | self.standardWindowButton(NSWindow.ButtonType.miniaturizeButton)?.isHidden = true 17 | self.standardWindowButton(NSWindow.ButtonType.zoomButton)?.isHidden = true 18 | self.setFrame(windowFrame, display: true) 19 | 20 | RegisterGeneratedPlugins(registry: flutterViewController) 21 | 22 | super.awakeFromNib() 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /macos/Runner/Release.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.filesystem.read-write 8 | 9 | com.apple.security.files.bookmarks.app-scope 10 | 11 | com.apple.security.files.downloads.read-write 12 | 13 | com.apple.security.network.client 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /macos/packaging/dmg/make_config.yaml: -------------------------------------------------------------------------------- 1 | title: NoneBot GUI 2 | contents: 3 | - x: 448 4 | y: 344 5 | type: link 6 | path: "/Applications" 7 | - x: 192 8 | y: 344 9 | type: file 10 | path: NoneBotGUI.app -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: "NoneBotGUI" 2 | description: "新一代Nonebot图形化界面" 3 | # The following line prevents the package from being accidentally published to 4 | # pub.dev using `flutter pub publish`. This is preferred for private packages. 5 | publish_to: 'none' # Remove this line if you wish to publish to pub.dev 6 | 7 | # The following defines the version and build number for your application. 8 | # A version number is three numbers separated by dots, like 1.2.43 9 | # followed by an optional build number separated by a +. 10 | # Both the version and the builder number may be overridden in flutter 11 | # build by specifying --build-name and --build-number, respectively. 12 | # In Android, build-name is used as versionName while build-number used as versionCode. 13 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning 14 | # In iOS, build-name is used as CFBundleShortVersionString while build-number is used as CFBundleVersion. 15 | # Read more about iOS versioning at 16 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html 17 | # In Windows, build-name is used as the major, minor, and patch parts 18 | # of the product and file versions while build-number is used as the build suffix. 19 | version: 1.1.2+1 20 | environment: 21 | sdk: '>=3.3.1 <4.0.0' 22 | 23 | # Dependencies specify other packages that your package needs in order to work. 24 | # To automatically upgrade your package dependencies to the latest versions 25 | # consider running `flutter pub upgrade --major-versions`. Alternatively, 26 | # dependencies can be manually updated by changing the version numbers below to 27 | # the latest version available on pub.dev. To see which dependencies have newer 28 | # versions available, run `flutter pub outdated`. 29 | dependencies: 30 | flutter: 31 | sdk: flutter 32 | file_picker: ^8.0.0 33 | path_provider: ^2.1.2 34 | flutter_launcher_icons: ^0.13.1 35 | url_launcher: ^6.2.5 36 | http: ^1.2.1 37 | toml: ^0.15.0 38 | ansicolor: ^2.0.2 39 | 40 | # The following adds the Cupertino Icons font to your application. 41 | # Use with the CupertinoIcons class for iOS style icons. 42 | cupertino_icons: ^1.0.6 43 | flutter_markdown: ^0.7.1 44 | tray_manager: ^0.2.3 45 | window_manager: ^0.3.9 46 | bitsdojo_window: ^0.1.6 47 | dio: ^5.5.0+1 48 | archive: ^3.6.1 49 | watcher: ^1.1.0 50 | flutter_svg: ^2.0.10+1 51 | local_notifier: ^0.1.6 52 | path: ^1.9.0 53 | 54 | dev_dependencies: 55 | flutter_test: 56 | sdk: flutter 57 | 58 | # The "flutter_lints" package below contains a set of recommended lints to 59 | # encourage good coding practices. The lint set provided by the package is 60 | # activated in the `analysis_options.yaml` file located at the root of your 61 | # package. See that file for information about deactivating specific lint 62 | # rules and activating additional ones. 63 | flutter_lints: ^3.0.2 64 | 65 | flutter_launcher_icons: 66 | image_path: "asset/icon/icon.png" 67 | windows: 68 | generate: true 69 | macos: 70 | generate: true 71 | linux: 72 | generate: true 73 | 74 | # For information on the generic Dart part of this file, see the 75 | # following page: https://dart.dev/tools/pub/pubspec 76 | 77 | # The following section is specific to Flutter packages. 78 | flutter: 79 | 80 | # The following line ensures that the Material Icons font is 81 | # included with your application, so that you can use the icons in 82 | # the material Icons class. 83 | uses-material-design: true 84 | 85 | # To add assets to your application, add an assets section, like this: 86 | assets: 87 | - lib/assets/logo.png 88 | - lib/assets/colorEgg.png 89 | - lib/assets/loading.gif 90 | - lib/assets/iconWin.ico 91 | - lib/assets/icon.png 92 | - lib/assets/alipay.svg 93 | - lib/assets/wechat.svg 94 | - lib/assets/donate_wechat.png 95 | - lib/assets/donate_alipay.png 96 | - lib/assets/aifadian.svg 97 | 98 | 99 | # An image asset can refer to one or more resolution-specific "variants", see 100 | # https://flutter.dev/assets-and-images/#resolution-aware 101 | 102 | # For details regarding adding assets from package dependencies, see 103 | # https://flutter.dev/assets-and-images/#from-packages 104 | 105 | # To add custom fonts to your application, add a fonts section here, 106 | # in this "flutter" section. Each entry in this list should have a 107 | # "family" key with the font family name, and a "fonts" key with a 108 | # list giving the asset and other descriptors for the font. For 109 | # example: 110 | fonts: 111 | - family: MyFlutterApp 112 | fonts: 113 | - asset: fonts/MyFlutterApp.ttf 114 | 115 | - family: JetBrainsMono 116 | fonts: 117 | - asset: fonts/JetBrainsMono-Regular.ttf 118 | # - family: Trajan Pro 119 | # fonts: 120 | # - asset: fonts/TrajanPro.ttf 121 | # - asset: fonts/TrajanPro_Bold.ttf 122 | # weight: 700 123 | # 124 | # For details regarding fonts from package dependencies, 125 | # see https://flutter.dev/custom-fonts/#from-packages 126 | -------------------------------------------------------------------------------- /test/tem.dart: -------------------------------------------------------------------------------- 1 | import 'package:bitsdojo_window/bitsdojo_window.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:window_manager/window_manager.dart'; 4 | 5 | // 这段无意义的main不知道有什么用Test应该放到 /test 进行 6 | // 如果只是检查单页状态,可以在DEBUG Console里面调用NavPush来跳转路由 7 | // void main() { 8 | // runApp( 9 | // const MyApp(), 10 | // ); 11 | // 12 | // } 13 | // class MyApp extends StatelessWidget { 14 | // const MyApp({super.key}); 15 | // 16 | // @override 17 | // Widget build(BuildContext context) { 18 | // return MaterialApp( 19 | // home: Template(), 20 | // ); 21 | // } 22 | // } 23 | 24 | class Template extends StatefulWidget { 25 | const Template({super.key}); 26 | 27 | @override 28 | State