diff --git a/android/.gitignore b/android/.gitignore index 55afd91..6f56801 100644 --- a/android/.gitignore +++ b/android/.gitignore @@ -7,7 +7,7 @@ gradle-wrapper.jar GeneratedPluginRegistrant.java # Remember to never publicly share your keystore. -# See https://flutter.dev/to/reference-keystore +# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app key.properties **/*.keystore **/*.jks diff --git a/android/app/build.gradle b/android/app/build.gradle index 1d92565..e31a031 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -5,40 +5,103 @@ plugins { id "dev.flutter.flutter-gradle-plugin" } -android { - namespace = "com.example.vbvs_app" - compileSdk = flutter.compileSdkVersion - ndkVersion = flutter.ndkVersion +def localProperties = new Properties() +def localPropertiesFile = rootProject.file("local.properties") +if (localPropertiesFile.exists()) { + localPropertiesFile.withReader("UTF-8") { reader -> + localProperties.load(reader) + } +} +def keystoreProperties = new Properties() +def keystorePropertiesFile = rootProject.file("key.properties") +if (keystorePropertiesFile.exists()) { + keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) +} + +def versionProperties = new Properties() +def versionPropertiesFile = rootProject.file("version.properties") +if (versionPropertiesFile.exists()) { + versionProperties.load(new FileInputStream(versionPropertiesFile)) +} + +def flutterVersionCode = versionProperties.getProperty("flutter.android.versionCode") +if (flutterVersionCode == null) { + flutterVersionCode = "5" +} + +def flutterVersionName = versionProperties.getProperty("flutter.android.versionName") +if (flutterVersionName == null) { + flutterVersionName = "1.0.4" +} + +android { + namespace = "com.taihe.vbvs_app" +// compileSdk = flutter.compileSdkVersion + compileSdk = localProperties.getProperty('flutter.compileSdkVersion').toInteger() +// ndkVersion = flutter.ndkVersion + ndkVersion = localProperties.getProperty('flutter.ndkVersion') + + // 编译的jvm版本 compileOptions { sourceCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8 } + // 指定Kotilin的jvm版本 kotlinOptions { - jvmTarget = JavaVersion.VERSION_1_8 + jvmTarget = JavaVersion.VERSION_1_8.toString() } defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId = "com.example.vbvs_app" + applicationId "com.taihe.vbvs_app" // You can update the following values to match your application needs. - // For more information, see: https://flutter.dev/to/review-gradle-config. - minSdk = flutter.minSdkVersion - targetSdk = flutter.targetSdkVersion - versionCode = flutter.versionCode - versionName = flutter.versionName + // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. +// minSdk = flutter.minSdkVersion +// targetSdk = flutter.targetSdkVersion + minSdk = localProperties.getProperty('flutter.minSdkVersion').toInteger() + targetSdk = localProperties.getProperty('flutter.targetSdkVersion').toInteger() + versionCode = flutterVersionCode.toInteger() + versionName = flutterVersionName + } + + signingConfigs { + release { + keyAlias keystoreProperties['keyAlias'] + keyPassword keystoreProperties['keyPassword'] + storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null + storePassword keystoreProperties['storePassword'] + } } buildTypes { release { + debuggable false + minifyEnabled true//是否启动混淆 ture:打开 false:关闭 + shrinkResources true //删除无用资源(压缩) + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' // TODO: Add your own signing config for the release build. // Signing with the debug keys for now, so `flutter run --release` works. - signingConfig = signingConfigs.debug +// signingConfig = signingConfigs.debug + signingConfig signingConfigs.release + android.applicationVariants.all { variant -> + variant.outputs.all { + outputFileName = "ZHMHT_v${variant.versionName}-${releaseTime()}.apk" + } + } + } + debug { + debuggable true + signingConfig signingConfigs.release } } } +static def releaseTime() { + return new Date().format("yyyyMMdd", TimeZone.getTimeZone("UTC")) +} + flutter { source = "../.." } diff --git a/android/app/proguard-rules.pro b/android/app/proguard-rules.pro new file mode 100644 index 0000000..4c61592 --- /dev/null +++ b/android/app/proguard-rules.pro @@ -0,0 +1,24 @@ +#Flutter Wrapper +-ignorewarnings +-keep class io.flutter.app.** { *; } +-keep class io.flutter.plugin.** { *; } +-keep class io.flutter.util.** { *; } +-keep class io.flutter.view.** { *; } +-keep class io.flutter.embedding.** { *; } +-keep class io.flutter.embedding.engine.** { *; } +-keep class io.flutter.embedding.android.** { *; } +-keep class io.flutter.embedding.engine.plugins.** { *; } +-keep class io.flutter.plugin.common.** { *; } +-keep class io.flutter.plugin.platform.** { *; } +#微信 +-keep class com.tencent.mm.opensdk.** { *; } +-keep class com.tencent.wxop.** { *; } +-keep class com.tencent.mm.sdk.** { *; } +## XUpdate需要配置的内容(flutter_xupdate android app 更新) +##gson +#-keepattributes Signature +#-keep class sun.misc.Unsafe { *; } +#-keep class com.google.gson.** { *; } +#-keep class com.google.gson.examples.android.model.** { *; } +## xupdate +#-keep class com.xuexiang.xupdate.entity.** { *; } \ No newline at end of file diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index ce8cc5f..119b8c8 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -1,28 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + android:icon="@mipmap/ic_launcher" + android:label="智慧眠花糖"> + android:name="io.flutter.embedding.android.NormalTheme" + android:resource="@style/NormalTheme" /> + + - - + + - - + + + + + + + + + + + + + + + + diff --git a/android/app/src/main/kotlin/com/example/vbvs_app/MainActivity.kt b/android/app/src/main/kotlin/com/taihe/mianhuatang/MainActivity.kt similarity index 76% rename from android/app/src/main/kotlin/com/example/vbvs_app/MainActivity.kt rename to android/app/src/main/kotlin/com/taihe/mianhuatang/MainActivity.kt index 016ed42..8537ae0 100644 --- a/android/app/src/main/kotlin/com/example/vbvs_app/MainActivity.kt +++ b/android/app/src/main/kotlin/com/taihe/mianhuatang/MainActivity.kt @@ -1,4 +1,4 @@ -package com.example.vbvs_app +package com.taihe.vbvs_app import io.flutter.embedding.android.FlutterActivity diff --git a/android/app/src/main/res/drawable-hdpi/xupdate_bg_app_top.png b/android/app/src/main/res/drawable-hdpi/xupdate_bg_app_top.png new file mode 100644 index 0000000..3c1df31 Binary files /dev/null and b/android/app/src/main/res/drawable-hdpi/xupdate_bg_app_top.png differ diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png index db77bb4..17f8265 100644 Binary files a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-ldpi/ic_launcher.png b/android/app/src/main/res/mipmap-ldpi/ic_launcher.png new file mode 100644 index 0000000..e9d9fbc Binary files /dev/null and b/android/app/src/main/res/mipmap-ldpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png index 17987b7..98c4f5e 100644 Binary files a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png index 09d4391..63ce850 100644 Binary files a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png index d5f1c8d..92662bd 100644 Binary files a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png index 4d6372e..d31b2cb 100644 Binary files a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/android/build.gradle b/android/build.gradle index d2ffbff..c87fc5f 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,8 +1,49 @@ allprojects { repositories { + maven { url 'https://repo.huaweicloud.com/repository/maven/' } + maven { url 'https://mirrors.cloud.tencent.com/nexus/repository/maven-public/' } + maven { url 'https://maven.aliyun.com/repository/google' } + maven { url 'https://maven.aliyun.com/repository/jcenter' } + maven { url 'https://maven.aliyun.com/repository/public' } + maven { url 'https://maven.aliyun.com/repository/center' } + maven { url 'https://maven.aliyun.com/repository/gradle-plugin' } + maven { url 'https://jitpack.io' } google() mavenCentral() } + + // 修复由于高版本导致namespace检测为空的问题,没遇到可不添加 + subprojects { + afterEvaluate { project -> + if (project.hasProperty('android')) { + project.android { + if (namespace == null) { + namespace project.group + } + } + } + + // 指定Kotilin的jvm版本与编译版本 + def javaVersion = JavaVersion.VERSION_1_8 + android { + compileOptions { + sourceCompatibility javaVersion + targetCompatibility javaVersion + } + tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach { + kotlinOptions { + jvmTarget = javaVersion.toString() + } + } + tasks.withType(org.jetbrains.kotlin.gradle.tasks.KaptGenerateStubs).configureEach { + kotlinOptions { + jvmTarget = javaVersion.toString() + } + } + } + } + } + // 修复由于高版本导致namespace检测为空的问题,没遇到可不添加 } rootProject.buildDir = "../build" diff --git a/android/gradle.properties b/android/gradle.properties index 2597170..3b5b324 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -1,3 +1,3 @@ -org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=2G -XX:+HeapDumpOnOutOfMemoryError +org.gradle.jvmargs=-Xmx4G -XX:+HeapDumpOnOutOfMemoryError android.useAndroidX=true android.enableJetifier=true diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index 7bb2df6..4ad34d7 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -2,4 +2,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip +# distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip +distributionUrl=https\://mirrors.cloud.tencent.com/gradle/gradle-8.10.2-bin.zip \ No newline at end of file diff --git a/android/settings.gradle b/android/settings.gradle index b9e43bd..07c9882 100644 --- a/android/settings.gradle +++ b/android/settings.gradle @@ -10,6 +10,14 @@ pluginManagement { includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") repositories { + maven { url 'https://repo.huaweicloud.com/repository/maven/' } + maven { url 'https://mirrors.cloud.tencent.com/nexus/repository/maven-public/' } + maven { url 'https://maven.aliyun.com/repository/google' } + maven { url 'https://maven.aliyun.com/repository/jcenter' } + maven { url 'https://maven.aliyun.com/repository/public' } + maven { url 'https://maven.aliyun.com/repository/center' } + maven { url 'https://maven.aliyun.com/repository/gradle-plugin' } + maven { url 'https://jitpack.io' } google() mavenCentral() gradlePluginPortal() @@ -18,8 +26,8 @@ pluginManagement { plugins { id "dev.flutter.flutter-plugin-loader" version "1.0.0" - id "com.android.application" version "8.1.0" apply false - id "org.jetbrains.kotlin.android" version "1.8.22" apply false + id "com.android.application" version "8.7.1" apply false + id "org.jetbrains.kotlin.android" version "1.9.25" apply false } include ":app" diff --git a/android/version.properties b/android/version.properties new file mode 100644 index 0000000..beaa3b6 --- /dev/null +++ b/android/version.properties @@ -0,0 +1,2 @@ +flutter.android.versionName=1.0.4 +flutter.android.versionCode=5 \ No newline at end of file diff --git a/assets/fonts/calculatrix.ttf b/assets/fonts/calculatrix.ttf new file mode 100644 index 0000000..ae0ecd5 Binary files /dev/null and b/assets/fonts/calculatrix.ttf differ diff --git a/assets/images/33.svg b/assets/images/33.svg new file mode 100644 index 0000000..f2db33c --- /dev/null +++ b/assets/images/33.svg @@ -0,0 +1 @@ +资源 1028 \ No newline at end of file diff --git a/assets/images/_16228.png b/assets/images/_16228.png new file mode 100644 index 0000000..22a237d Binary files /dev/null and b/assets/images/_16228.png differ diff --git a/assets/images/_16328.png b/assets/images/_16328.png new file mode 100644 index 0000000..00bbab1 Binary files /dev/null and b/assets/images/_16328.png differ diff --git a/assets/images/_16428.png b/assets/images/_16428.png new file mode 100644 index 0000000..c4456e1 Binary files /dev/null and b/assets/images/_16428.png differ diff --git a/assets/images/_18328.png b/assets/images/_18328.png new file mode 100644 index 0000000..8317000 Binary files /dev/null and b/assets/images/_18328.png differ diff --git a/assets/images/_18428.png b/assets/images/_18428.png new file mode 100644 index 0000000..2f6607c Binary files /dev/null and b/assets/images/_18428.png differ diff --git a/assets/images/add.svg b/assets/images/add.svg new file mode 100644 index 0000000..d4ab9da --- /dev/null +++ b/assets/images/add.svg @@ -0,0 +1 @@ +资源 3328 \ No newline at end of file diff --git a/assets/images/alarm.svg b/assets/images/alarm.svg new file mode 100644 index 0000000..e0714b3 --- /dev/null +++ b/assets/images/alarm.svg @@ -0,0 +1 @@ +资源 2228 \ No newline at end of file diff --git a/assets/images/alarm_before.svg b/assets/images/alarm_before.svg new file mode 100644 index 0000000..43b301c --- /dev/null +++ b/assets/images/alarm_before.svg @@ -0,0 +1 @@ +资源 324192 \ No newline at end of file diff --git a/assets/images/allread.svg b/assets/images/allread.svg new file mode 100644 index 0000000..bdc68d2 --- /dev/null +++ b/assets/images/allread.svg @@ -0,0 +1 @@ +资源 362192 \ No newline at end of file diff --git a/assets/images/avatar.png b/assets/images/avatar.png new file mode 100644 index 0000000..cd9f20e Binary files /dev/null and b/assets/images/avatar.png differ diff --git a/assets/images/background.png b/assets/images/background.png new file mode 100644 index 0000000..a25cdd4 Binary files /dev/null and b/assets/images/background.png differ diff --git a/assets/images/bed.png b/assets/images/bed.png new file mode 100644 index 0000000..169fe0c Binary files /dev/null and b/assets/images/bed.png differ diff --git a/assets/images/bed_1.png b/assets/images/bed_1.png new file mode 100644 index 0000000..3faa4f8 Binary files /dev/null and b/assets/images/bed_1.png differ diff --git a/assets/images/bed_2.png b/assets/images/bed_2.png new file mode 100644 index 0000000..a0ac5fd Binary files /dev/null and b/assets/images/bed_2.png differ diff --git a/assets/images/bed_3.png b/assets/images/bed_3.png new file mode 100644 index 0000000..f65ded2 Binary files /dev/null and b/assets/images/bed_3.png differ diff --git a/assets/images/bed_4.png b/assets/images/bed_4.png new file mode 100644 index 0000000..5211b0d Binary files /dev/null and b/assets/images/bed_4.png differ diff --git a/assets/images/bed_point.gif b/assets/images/bed_point.gif new file mode 100644 index 0000000..18a3a7c Binary files /dev/null and b/assets/images/bed_point.gif differ diff --git a/assets/images/bed_runing.png b/assets/images/bed_runing.png new file mode 100644 index 0000000..fd6fb15 Binary files /dev/null and b/assets/images/bed_runing.png differ diff --git a/assets/images/bed_start.png b/assets/images/bed_start.png new file mode 100644 index 0000000..e863a87 Binary files /dev/null and b/assets/images/bed_start.png differ diff --git a/assets/images/body.gif b/assets/images/body.gif new file mode 100644 index 0000000..1ac4323 Binary files /dev/null and b/assets/images/body.gif differ diff --git a/assets/images/bottom.svg b/assets/images/bottom.svg new file mode 100644 index 0000000..3081b70 --- /dev/null +++ b/assets/images/bottom.svg @@ -0,0 +1 @@ +资源 128 \ No newline at end of file diff --git a/assets/images/breath.png b/assets/images/breath.png new file mode 100644 index 0000000..e0945a2 Binary files /dev/null and b/assets/images/breath.png differ diff --git a/assets/images/camera.png b/assets/images/camera.png new file mode 100644 index 0000000..ece6c10 Binary files /dev/null and b/assets/images/camera.png differ diff --git a/assets/images/checkOther.svg b/assets/images/checkOther.svg new file mode 100644 index 0000000..d0b1f49 --- /dev/null +++ b/assets/images/checkOther.svg @@ -0,0 +1 @@ +资源 3528 \ No newline at end of file diff --git a/assets/images/delete.svg b/assets/images/delete.svg new file mode 100644 index 0000000..4539ca2 --- /dev/null +++ b/assets/images/delete.svg @@ -0,0 +1 @@ +资源 1628 \ No newline at end of file diff --git a/assets/images/delete_account.png b/assets/images/delete_account.png new file mode 100644 index 0000000..ca8e40a Binary files /dev/null and b/assets/images/delete_account.png differ diff --git a/assets/images/device.svg b/assets/images/device.svg new file mode 100644 index 0000000..6c3e643 --- /dev/null +++ b/assets/images/device.svg @@ -0,0 +1 @@ +资源 2428 \ No newline at end of file diff --git a/assets/images/empty.png b/assets/images/empty.png new file mode 100644 index 0000000..ec4a650 Binary files /dev/null and b/assets/images/empty.png differ diff --git a/assets/images/emptyUser.png b/assets/images/emptyUser.png new file mode 100644 index 0000000..88b253f Binary files /dev/null and b/assets/images/emptyUser.png differ diff --git a/assets/images/fangpin.svg b/assets/images/fangpin.svg new file mode 100644 index 0000000..408b0e6 --- /dev/null +++ b/assets/images/fangpin.svg @@ -0,0 +1 @@ +资源 357192 \ No newline at end of file diff --git a/assets/images/group.svg b/assets/images/group.svg new file mode 100644 index 0000000..7b74c95 --- /dev/null +++ b/assets/images/group.svg @@ -0,0 +1 @@ +资源 1728 \ No newline at end of file diff --git a/assets/images/heart.png b/assets/images/heart.png new file mode 100644 index 0000000..7d04589 Binary files /dev/null and b/assets/images/heart.png differ diff --git a/assets/images/help.svg b/assets/images/help.svg new file mode 100644 index 0000000..87df57f --- /dev/null +++ b/assets/images/help.svg @@ -0,0 +1 @@ +资源 1828 \ No newline at end of file diff --git a/assets/images/icon_article.svg b/assets/images/icon_article.svg new file mode 100644 index 0000000..229c6fd --- /dev/null +++ b/assets/images/icon_article.svg @@ -0,0 +1 @@ +资源 314192 \ No newline at end of file diff --git a/assets/images/icon_home.svg b/assets/images/icon_home.svg new file mode 100644 index 0000000..c793d8b --- /dev/null +++ b/assets/images/icon_home.svg @@ -0,0 +1 @@ +资源 313192 \ No newline at end of file diff --git a/assets/images/icon_people.svg b/assets/images/icon_people.svg new file mode 100644 index 0000000..084ad7e --- /dev/null +++ b/assets/images/icon_people.svg @@ -0,0 +1 @@ +资源 316192 \ No newline at end of file diff --git a/assets/images/icon_shopping.svg b/assets/images/icon_shopping.svg new file mode 100644 index 0000000..c34e67a --- /dev/null +++ b/assets/images/icon_shopping.svg @@ -0,0 +1 @@ +资源 315192 \ No newline at end of file diff --git a/assets/images/icon_sleep_dark.png b/assets/images/icon_sleep_dark.png new file mode 100644 index 0000000..11117fc Binary files /dev/null and b/assets/images/icon_sleep_dark.png differ diff --git a/assets/images/icon_sleep_light.png b/assets/images/icon_sleep_light.png new file mode 100644 index 0000000..41ae555 Binary files /dev/null and b/assets/images/icon_sleep_light.png differ diff --git a/assets/images/issue.svg b/assets/images/issue.svg new file mode 100644 index 0000000..d3214c1 --- /dev/null +++ b/assets/images/issue.svg @@ -0,0 +1 @@ +资源 1928 \ No newline at end of file diff --git a/assets/images/linzhongli.svg b/assets/images/linzhongli.svg new file mode 100644 index 0000000..a017b46 --- /dev/null +++ b/assets/images/linzhongli.svg @@ -0,0 +1 @@ +资源 358192 \ No newline at end of file diff --git a/assets/images/location.svg b/assets/images/location.svg new file mode 100644 index 0000000..d63e3c1 --- /dev/null +++ b/assets/images/location.svg @@ -0,0 +1 @@ +资源 2128 \ No newline at end of file diff --git a/assets/images/locationColor.svg b/assets/images/locationColor.svg new file mode 100644 index 0000000..548943b --- /dev/null +++ b/assets/images/locationColor.svg @@ -0,0 +1 @@ +资源 2028 \ No newline at end of file diff --git a/assets/images/location_new.svg b/assets/images/location_new.svg new file mode 100644 index 0000000..1f42910 --- /dev/null +++ b/assets/images/location_new.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/images/mattress.png b/assets/images/mattress.png new file mode 100644 index 0000000..8e3fa06 Binary files /dev/null and b/assets/images/mattress.png differ diff --git a/assets/images/networkError.png b/assets/images/networkError.png new file mode 100644 index 0000000..7eb2114 Binary files /dev/null and b/assets/images/networkError.png differ diff --git a/assets/images/p_bei.svg b/assets/images/p_bei.svg new file mode 100644 index 0000000..1d45ca8 --- /dev/null +++ b/assets/images/p_bei.svg @@ -0,0 +1 @@ +资源 828 \ No newline at end of file diff --git a/assets/images/p_tou.svg b/assets/images/p_tou.svg new file mode 100644 index 0000000..cbc81e8 --- /dev/null +++ b/assets/images/p_tou.svg @@ -0,0 +1 @@ +资源 928 \ No newline at end of file diff --git a/assets/images/p_tui.svg b/assets/images/p_tui.svg new file mode 100644 index 0000000..50a1659 --- /dev/null +++ b/assets/images/p_tui.svg @@ -0,0 +1 @@ +资源 628 \ No newline at end of file diff --git a/assets/images/p_yao.svg b/assets/images/p_yao.svg new file mode 100644 index 0000000..408eee2 --- /dev/null +++ b/assets/images/p_yao.svg @@ -0,0 +1 @@ +资源 728 \ No newline at end of file diff --git a/assets/images/phone.svg b/assets/images/phone.svg new file mode 100644 index 0000000..4329a56 --- /dev/null +++ b/assets/images/phone.svg @@ -0,0 +1 @@ +资源 3128 \ No newline at end of file diff --git a/assets/images/player.png b/assets/images/player.png new file mode 100644 index 0000000..3cc2d5e Binary files /dev/null and b/assets/images/player.png differ diff --git a/assets/images/read.svg b/assets/images/read.svg new file mode 100644 index 0000000..45a96f2 --- /dev/null +++ b/assets/images/read.svg @@ -0,0 +1 @@ +资源 356192 \ No newline at end of file diff --git a/assets/images/repair.svg b/assets/images/repair.svg new file mode 100644 index 0000000..ab0ccd3 --- /dev/null +++ b/assets/images/repair.svg @@ -0,0 +1 @@ +资源 2328 \ No newline at end of file diff --git a/assets/images/search.svg b/assets/images/search.svg new file mode 100644 index 0000000..e38e388 --- /dev/null +++ b/assets/images/search.svg @@ -0,0 +1 @@ +资源 1128 \ No newline at end of file diff --git a/assets/images/setting.svg b/assets/images/setting.svg new file mode 100644 index 0000000..1535d1d --- /dev/null +++ b/assets/images/setting.svg @@ -0,0 +1 @@ +资源 3028 \ No newline at end of file diff --git a/assets/images/shouCang.png b/assets/images/shouCang.png new file mode 100644 index 0000000..e3c3ec9 Binary files /dev/null and b/assets/images/shouCang.png differ diff --git a/assets/images/success.png b/assets/images/success.png new file mode 100644 index 0000000..74ec57a Binary files /dev/null and b/assets/images/success.png differ diff --git a/assets/images/swiper1.png b/assets/images/swiper1.png new file mode 100644 index 0000000..e0829b2 Binary files /dev/null and b/assets/images/swiper1.png differ diff --git a/assets/images/swiper2.png b/assets/images/swiper2.png new file mode 100644 index 0000000..deeac20 Binary files /dev/null and b/assets/images/swiper2.png differ diff --git a/assets/images/swiper3.png b/assets/images/swiper3.png new file mode 100644 index 0000000..94fac3a Binary files /dev/null and b/assets/images/swiper3.png differ diff --git a/assets/images/table.svg b/assets/images/table.svg new file mode 100644 index 0000000..9f490f6 --- /dev/null +++ b/assets/images/table.svg @@ -0,0 +1 @@ +资源 1428 \ No newline at end of file diff --git a/assets/images/tasks.svg b/assets/images/tasks.svg new file mode 100644 index 0000000..1535d1d --- /dev/null +++ b/assets/images/tasks.svg @@ -0,0 +1 @@ +资源 3028 \ No newline at end of file diff --git a/assets/images/toast/ble.png b/assets/images/toast/ble.png new file mode 100644 index 0000000..d853268 Binary files /dev/null and b/assets/images/toast/ble.png differ diff --git a/assets/images/toast/danger.png b/assets/images/toast/danger.png new file mode 100644 index 0000000..e751dac Binary files /dev/null and b/assets/images/toast/danger.png differ diff --git a/assets/images/toast/error_.png b/assets/images/toast/error_.png new file mode 100644 index 0000000..d8d59e4 Binary files /dev/null and b/assets/images/toast/error_.png differ diff --git a/assets/images/toast/success.png b/assets/images/toast/success.png new file mode 100644 index 0000000..1b19514 Binary files /dev/null and b/assets/images/toast/success.png differ diff --git a/assets/images/toast/success_.png b/assets/images/toast/success_.png new file mode 100644 index 0000000..4c03f63 Binary files /dev/null and b/assets/images/toast/success_.png differ diff --git a/assets/images/toast/warn.png b/assets/images/toast/warn.png new file mode 100644 index 0000000..992453b Binary files /dev/null and b/assets/images/toast/warn.png differ diff --git a/assets/images/toast/warn_.png b/assets/images/toast/warn_.png new file mode 100644 index 0000000..fa0f021 Binary files /dev/null and b/assets/images/toast/warn_.png differ diff --git a/assets/images/toast/wifi.png b/assets/images/toast/wifi.png new file mode 100644 index 0000000..4e3e598 Binary files /dev/null and b/assets/images/toast/wifi.png differ diff --git a/assets/images/top.svg b/assets/images/top.svg new file mode 100644 index 0000000..625505e --- /dev/null +++ b/assets/images/top.svg @@ -0,0 +1 @@ +资源 228 \ No newline at end of file diff --git a/assets/images/tv.svg b/assets/images/tv.svg new file mode 100644 index 0000000..1642356 --- /dev/null +++ b/assets/images/tv.svg @@ -0,0 +1 @@ +资源 359192 \ No newline at end of file diff --git a/assets/images/wechat.png b/assets/images/wechat.png new file mode 100644 index 0000000..a12ce17 Binary files /dev/null and b/assets/images/wechat.png differ diff --git a/assets/images/weiShouCang.png b/assets/images/weiShouCang.png new file mode 100644 index 0000000..b02ffff Binary files /dev/null and b/assets/images/weiShouCang.png differ diff --git a/assets/images/wifi1.png b/assets/images/wifi1.png new file mode 100644 index 0000000..8c9949e Binary files /dev/null and b/assets/images/wifi1.png differ diff --git a/assets/images/wifi1.svg b/assets/images/wifi1.svg new file mode 100644 index 0000000..2ec55af --- /dev/null +++ b/assets/images/wifi1.svg @@ -0,0 +1 @@ +资源 332192 \ No newline at end of file diff --git a/assets/images/wifi2.png b/assets/images/wifi2.png new file mode 100644 index 0000000..b9f6b41 Binary files /dev/null and b/assets/images/wifi2.png differ diff --git a/assets/images/wifi2.svg b/assets/images/wifi2.svg new file mode 100644 index 0000000..cba0ec1 --- /dev/null +++ b/assets/images/wifi2.svg @@ -0,0 +1 @@ +资源 331192 \ No newline at end of file diff --git a/assets/images/wifi3.png b/assets/images/wifi3.png new file mode 100644 index 0000000..5cecca4 Binary files /dev/null and b/assets/images/wifi3.png differ diff --git a/assets/images/wifi3.svg b/assets/images/wifi3.svg new file mode 100644 index 0000000..b0b2934 --- /dev/null +++ b/assets/images/wifi3.svg @@ -0,0 +1 @@ +资源 330192 \ No newline at end of file diff --git a/assets/images/wifi4.png b/assets/images/wifi4.png new file mode 100644 index 0000000..af55eab Binary files /dev/null and b/assets/images/wifi4.png differ diff --git a/assets/images/wifi4.svg b/assets/images/wifi4.svg new file mode 100644 index 0000000..675034b --- /dev/null +++ b/assets/images/wifi4.svg @@ -0,0 +1 @@ +资源 329192 \ No newline at end of file diff --git a/assets/images/yueduliang.svg b/assets/images/yueduliang.svg new file mode 100644 index 0000000..b5b3a02 --- /dev/null +++ b/assets/images/yueduliang.svg @@ -0,0 +1 @@ +资源 355192 \ No newline at end of file diff --git a/assets/images/zhumian_background.gif b/assets/images/zhumian_background.gif new file mode 100644 index 0000000..c67022f Binary files /dev/null and b/assets/images/zhumian_background.gif differ diff --git a/assets/images/zhumian_background_nostart.png b/assets/images/zhumian_background_nostart.png new file mode 100644 index 0000000..1eb74bd Binary files /dev/null and b/assets/images/zhumian_background_nostart.png differ diff --git a/assets/images/zhumian_runing.png b/assets/images/zhumian_runing.png new file mode 100644 index 0000000..d8922ab Binary files /dev/null and b/assets/images/zhumian_runing.png differ diff --git a/assets/images/zhumian_runing_1.png b/assets/images/zhumian_runing_1.png new file mode 100644 index 0000000..6eb7035 Binary files /dev/null and b/assets/images/zhumian_runing_1.png differ diff --git a/assets/images/zhumian_runing_2.png b/assets/images/zhumian_runing_2.png new file mode 100644 index 0000000..6a4582a Binary files /dev/null and b/assets/images/zhumian_runing_2.png differ diff --git a/assets/images/zhumian_start.png b/assets/images/zhumian_start.png new file mode 100644 index 0000000..5be303a Binary files /dev/null and b/assets/images/zhumian_start.png differ diff --git a/assets/img/bed.png b/assets/img/bed.png new file mode 100644 index 0000000..23a3d96 Binary files /dev/null and b/assets/img/bed.png differ diff --git a/assets/img/bgImage.png b/assets/img/bgImage.png new file mode 100644 index 0000000..062f43c Binary files /dev/null and b/assets/img/bgImage.png differ diff --git a/assets/img/bgNoImg.png b/assets/img/bgNoImg.png new file mode 100644 index 0000000..148dcc9 Binary files /dev/null and b/assets/img/bgNoImg.png differ diff --git a/assets/img/camera.png b/assets/img/camera.png new file mode 100644 index 0000000..ac71bd9 Binary files /dev/null and b/assets/img/camera.png differ diff --git a/assets/img/device.png b/assets/img/device.png new file mode 100644 index 0000000..0012d4d Binary files /dev/null and b/assets/img/device.png differ diff --git a/assets/img/icon/arrow_right.svg b/assets/img/icon/arrow_right.svg new file mode 100644 index 0000000..a8d771e --- /dev/null +++ b/assets/img/icon/arrow_right.svg @@ -0,0 +1 @@ +资源 274 \ No newline at end of file diff --git a/assets/img/icon/device_repair.svg b/assets/img/icon/device_repair.svg new file mode 100644 index 0000000..a61966b --- /dev/null +++ b/assets/img/icon/device_repair.svg @@ -0,0 +1 @@ +资源 255 \ No newline at end of file diff --git a/assets/img/icon/earphone.svg b/assets/img/icon/earphone.svg new file mode 100644 index 0000000..af6936e --- /dev/null +++ b/assets/img/icon/earphone.svg @@ -0,0 +1 @@ +资源 259 \ No newline at end of file diff --git a/assets/img/icon/like.svg b/assets/img/icon/like.svg new file mode 100644 index 0000000..8a495a8 --- /dev/null +++ b/assets/img/icon/like.svg @@ -0,0 +1 @@ +资源 256 \ No newline at end of file diff --git a/assets/img/icon/my_device.svg b/assets/img/icon/my_device.svg new file mode 100644 index 0000000..0cc17be --- /dev/null +++ b/assets/img/icon/my_device.svg @@ -0,0 +1 @@ +资源 258 \ No newline at end of file diff --git a/assets/img/icon/op_ex.svg b/assets/img/icon/op_ex.svg new file mode 100644 index 0000000..0c43c9a --- /dev/null +++ b/assets/img/icon/op_ex.svg @@ -0,0 +1 @@ +资源 257 \ No newline at end of file diff --git a/assets/img/icon/setting.svg b/assets/img/icon/setting.svg new file mode 100644 index 0000000..4a7aeee --- /dev/null +++ b/assets/img/icon/setting.svg @@ -0,0 +1 @@ +资源 260 \ No newline at end of file diff --git a/assets/img/icon/version.svg b/assets/img/icon/version.svg new file mode 100644 index 0000000..a582e62 --- /dev/null +++ b/assets/img/icon/version.svg @@ -0,0 +1 @@ +资源 254 \ No newline at end of file diff --git a/assets/img/loading.json b/assets/img/loading.json new file mode 100644 index 0000000..7ade416 --- /dev/null +++ b/assets/img/loading.json @@ -0,0 +1 @@ +{"v":"5.9.4","fr":25,"ip":0,"op":25,"w":720,"h":720,"nm":"合成 1","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"形状图层 10","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":0,"s":[10]},{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":12.5,"s":[100]},{"t":25,"s":[10]}],"ix":11},"r":{"a":0,"k":324,"ix":10},"p":{"a":0,"k":[360,360,0],"ix":2,"l":2},"a":{"a":0,"k":[-77.5,-7,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[35,35],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"椭圆路径 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"fl","c":{"a":0,"k":[0,0,0,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"填充 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-77.5,-123.5],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"变换"}],"nm":"椭圆 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":75,"st":0,"ct":1,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"形状图层 9","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":0,"s":[20]},{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":11.111,"s":[100]},{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":23.611,"s":[10]},{"t":25,"s":[20]}],"ix":11},"r":{"a":0,"k":288,"ix":10},"p":{"a":0,"k":[360,360,0],"ix":2,"l":2},"a":{"a":0,"k":[-77.5,-7,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[35,35],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"椭圆路径 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"fl","c":{"a":0,"k":[0,0,0,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"填充 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-77.5,-123.5],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"变换"}],"nm":"椭圆 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":75,"st":0,"ct":1,"bm":0},{"ddd":0,"ind":3,"ty":4,"nm":"形状图层 8","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":0,"s":[30]},{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":9.723,"s":[100]},{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":22.223,"s":[10]},{"t":25,"s":[30]}],"ix":11},"r":{"a":0,"k":252,"ix":10},"p":{"a":0,"k":[360,360,0],"ix":2,"l":2},"a":{"a":0,"k":[-77.5,-7,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[35,35],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"椭圆路径 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"fl","c":{"a":0,"k":[0,0,0,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"填充 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-77.5,-123.5],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"变换"}],"nm":"椭圆 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":75,"st":0,"ct":1,"bm":0},{"ddd":0,"ind":4,"ty":4,"nm":"形状图层 7","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":0,"s":[40]},{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":8.333,"s":[100]},{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":20.833,"s":[10]},{"t":25,"s":[40]}],"ix":11},"r":{"a":0,"k":216,"ix":10},"p":{"a":0,"k":[360,360,0],"ix":2,"l":2},"a":{"a":0,"k":[-77.5,-7,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[35,35],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"椭圆路径 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"fl","c":{"a":0,"k":[0,0,0,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"填充 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-77.5,-123.5],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"变换"}],"nm":"椭圆 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":75,"st":0,"ct":1,"bm":0},{"ddd":0,"ind":5,"ty":4,"nm":"形状图层 6","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":0,"s":[50]},{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":6.944,"s":[100]},{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":19.444,"s":[10]},{"t":25,"s":[50]}],"ix":11},"r":{"a":0,"k":180,"ix":10},"p":{"a":0,"k":[360,360,0],"ix":2,"l":2},"a":{"a":0,"k":[-77.5,-7,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[35,35],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"椭圆路径 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"fl","c":{"a":0,"k":[0,0,0,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"填充 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-77.5,-123.5],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"变换"}],"nm":"椭圆 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":75,"st":0,"ct":1,"bm":0},{"ddd":0,"ind":6,"ty":4,"nm":"形状图层 5","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":0,"s":[60]},{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":5.556,"s":[100]},{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":18.056,"s":[10]},{"t":25,"s":[60]}],"ix":11},"r":{"a":0,"k":144,"ix":10},"p":{"a":0,"k":[360,360,0],"ix":2,"l":2},"a":{"a":0,"k":[-77.5,-7,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[35,35],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"椭圆路径 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"fl","c":{"a":0,"k":[0,0,0,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"填充 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-77.5,-123.5],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"变换"}],"nm":"椭圆 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":75,"st":0,"ct":1,"bm":0},{"ddd":0,"ind":7,"ty":4,"nm":"形状图层 4","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":0,"s":[70]},{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":4.167,"s":[100]},{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":16.667,"s":[10]},{"t":25,"s":[70]}],"ix":11},"r":{"a":0,"k":108,"ix":10},"p":{"a":0,"k":[360,360,0],"ix":2,"l":2},"a":{"a":0,"k":[-77.5,-7,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[35,35],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"椭圆路径 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"fl","c":{"a":0,"k":[0,0,0,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"填充 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-77.5,-123.5],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"变换"}],"nm":"椭圆 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":75,"st":0,"ct":1,"bm":0},{"ddd":0,"ind":8,"ty":4,"nm":"形状图层 3","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":0,"s":[80]},{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":2.777,"s":[100]},{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":15.277,"s":[10]},{"t":25,"s":[80]}],"ix":11},"r":{"a":0,"k":72,"ix":10},"p":{"a":0,"k":[360,360,0],"ix":2,"l":2},"a":{"a":0,"k":[-77.5,-7,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[35,35],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"椭圆路径 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"fl","c":{"a":0,"k":[0,0,0,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"填充 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-77.5,-123.5],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"变换"}],"nm":"椭圆 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":75,"st":0,"ct":1,"bm":0},{"ddd":0,"ind":9,"ty":4,"nm":"形状图层 2","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":0,"s":[90]},{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":1.389,"s":[100]},{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":13.889,"s":[10]},{"t":25,"s":[90]}],"ix":11},"r":{"a":0,"k":36,"ix":10},"p":{"a":0,"k":[360,360,0],"ix":2,"l":2},"a":{"a":0,"k":[-77.5,-7,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[35,35],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"椭圆路径 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"fl","c":{"a":0,"k":[0,0,0,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"填充 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-77.5,-123.5],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"变换"}],"nm":"椭圆 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":75,"st":0,"ct":1,"bm":0},{"ddd":0,"ind":10,"ty":4,"nm":"形状图层 1","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":0,"s":[100]},{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":12.5,"s":[10]},{"t":25,"s":[100]}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[360,360,0],"ix":2,"l":2},"a":{"a":0,"k":[-77.5,-7,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[35,35],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"椭圆路径 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"fl","c":{"a":0,"k":[0,0,0,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"填充 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-77.5,-123.5],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"变换"}],"nm":"椭圆 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":75,"st":0,"ct":1,"bm":0}],"markers":[]} \ No newline at end of file diff --git a/assets/img/menu/e.svg b/assets/img/menu/e.svg new file mode 100644 index 0000000..f5c129d --- /dev/null +++ b/assets/img/menu/e.svg @@ -0,0 +1,14 @@ + + + + + + + + 资源 268 + + + + + + diff --git a/assets/img/menu/home.svg b/assets/img/menu/home.svg new file mode 100644 index 0000000..050d6a5 --- /dev/null +++ b/assets/img/menu/home.svg @@ -0,0 +1,14 @@ + + + + + + + + 资源 264 + + + + + + diff --git a/assets/img/menu/message.svg b/assets/img/menu/message.svg new file mode 100644 index 0000000..ab772b7 --- /dev/null +++ b/assets/img/menu/message.svg @@ -0,0 +1,14 @@ + + + + + + + + 资源 265 + + + + + + diff --git a/assets/img/menu/mine.svg b/assets/img/menu/mine.svg new file mode 100644 index 0000000..ce7f7c9 --- /dev/null +++ b/assets/img/menu/mine.svg @@ -0,0 +1,14 @@ + + + + + + + + 资源 266 + + + + + + diff --git a/assets/img/menu/n_e.svg b/assets/img/menu/n_e.svg new file mode 100644 index 0000000..7eff027 --- /dev/null +++ b/assets/img/menu/n_e.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/img/menu/n_home.svg b/assets/img/menu/n_home.svg new file mode 100644 index 0000000..b9aeea8 --- /dev/null +++ b/assets/img/menu/n_home.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/img/menu/n_message.svg b/assets/img/menu/n_message.svg new file mode 100644 index 0000000..801e11d --- /dev/null +++ b/assets/img/menu/n_message.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/img/menu/n_mine.svg b/assets/img/menu/n_mine.svg new file mode 100644 index 0000000..ed30e5c --- /dev/null +++ b/assets/img/menu/n_mine.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/img/menu/n_report.svg b/assets/img/menu/n_report.svg new file mode 100644 index 0000000..f00fffe --- /dev/null +++ b/assets/img/menu/n_report.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/img/menu/report.svg b/assets/img/menu/report.svg new file mode 100644 index 0000000..63806bd --- /dev/null +++ b/assets/img/menu/report.svg @@ -0,0 +1,14 @@ + + + + + + + + 资源 267 + + + + + + diff --git a/assets/langs/zh_CN.json b/assets/langs/zh_CN.json new file mode 100644 index 0000000..e88539b --- /dev/null +++ b/assets/langs/zh_CN.json @@ -0,0 +1,42 @@ +{ + "菜单": { + "首页": "首页", + "报告": "报告", + "小e": "小e", + "消息": "消息", + "我的": "我的" + }, + "首页": { + "登录": "登录", + "提示标题": "尊敬的用户您好!绑定前请注意以下几点:", + "提示内容1": "1.传感器是否上电成功,控制盒呈绿灯快闪状态;", + "提示内容2": "2.对APP进行蓝牙和位置(定位服务)授权;", + "提示内容3": "3.若使用扫一扫功能,请对摄像头进行授权。", + "扫一扫绑定": "扫一扫添加新设备", + "蓝牙绑定": "蓝牙搜附近的设备" + }, + "我的": { + "个人信息": "个人信息", + "未登录": "未登录", + "账号": "账号:", + "我的设备": "我的设备", + "设备报修": "设备报修", + "操作说明": "操作说明", + "关注我们": "关注我们", + "当前版本": "当前版本" + }, + "设备类型": { + "我的设备": "我的设备", + "请选择设备类型": "请选择设备类型", + "体征监测设备": "体征监测设备", + "智能床/床垫": "智能床/床垫", + "摄像头": "摄像头" + }, + "绑定引导":{ + "说明标题": "设备放置说明:", + "说明正文": "该体征监测设备在床垫下方使用(注意贴有标签的一面朝上),放置在靠近使用人胸腔正下方为宜。放置完成后,连接电源,控制盒绿灯快闪时,可以进行绑定流程。", + "不再提示": "不再提示", + "跳过": "跳过" + } + +} \ No newline at end of file diff --git a/devtools_options.yaml b/devtools_options.yaml new file mode 100644 index 0000000..fa0b357 --- /dev/null +++ b/devtools_options.yaml @@ -0,0 +1,3 @@ +description: This file stores settings for Dart & Flutter DevTools. +documentation: https://docs.flutter.dev/tools/devtools/extensions#configure-extension-enablement-states +extensions: diff --git a/lib/common/color/appColors.dart b/lib/common/color/appColors.dart new file mode 100644 index 0000000..6b0ce4a --- /dev/null +++ b/lib/common/color/appColors.dart @@ -0,0 +1,27 @@ +import 'package:flutter/material.dart'; +import 'package:vbvs_app/common/util/MyUtils.dart'; + +class AppColors { + // 定义颜色常量 + static const Color text_selected_color = Color(0xFFD3B684); //选中文本 + static const Color text_default_color = Color(0xFFFFFFFF); //默认文本 + + static const Color button_active_color = Color(0xFFD3B684); //可点击按钮 + static const Color button_inactive_color = Color(0xFFD3D3D3); //不可点击按钮 + static const Color bg_color = Color(0xFF000750); //背景色 + static const Color input_bg_color = Color(0xFFF3F5F6); //输入框背景色 + static const Color input_hint_text_color = Color(0xFFF3F5F6); //hinttext + static const Color input_split_color = Color(0xFFF3F5F6); //分隔符 + static const Color textColor = Color(0xFF333333); //普通文本 + + static const Color buttonColor = Color(0xFF03A9F4); + static const Color borderColor = Color(0xFFE0E0E0); + static const Color errorColor = Color(0xFFB00020); + + Color check_Color = stringToColor('#409EFF'); + Color repair_Color = stringToColor('#409EFF'); + Color finish_Color = stringToColor('#71E2A3'); + Color unOp_Color = stringToColor('#FF4949'); + + Color press_color = stringToColor("#eaeaea"); +} diff --git a/lib/common/color/appConstants.dart b/lib/common/color/appConstants.dart new file mode 100644 index 0000000..49142ed --- /dev/null +++ b/lib/common/color/appConstants.dart @@ -0,0 +1,24 @@ +import 'package:vbvs_app/common/util/FitTool.dart'; + +class AppConstants { + // App-related constants + static const int code_time = 60; //验证码倒计时 + static const int limit = 10; //分页数量 + + static const double list_end_height = 26; //列表结尾空白高度 + static const double list_ano_end_height = 100; //列表结尾空白高度 + static const double list_start_height = 13; //列表开头空白高度 + + static const double page_button_bottom_padding = 45; //页面底部按钮距离底部距离 + + double main_left_right_padding = 30.rpx; //页面左右布局间距 + double content_left_right_padding = 15.rpx; //页面左右内容间距 + + double normal_container_radius = 24.rpx; //普通容器圆角 + double button_container_radius = 100.rpx; //按钮容器圆角 + + double text_padding_up_dowm_p = 5.rpx; //段落文字上下间距 + + double normal_text_fontSize = 26.rpx; //普通文字字号 + double title_text_fontSize = 30.rpx; //标题文字字号 +} diff --git a/lib/common/color/appFontsize.dart b/lib/common/color/appFontsize.dart new file mode 100644 index 0000000..0c688fc --- /dev/null +++ b/lib/common/color/appFontsize.dart @@ -0,0 +1,10 @@ +import 'package:vbvs_app/common/util/FitTool.dart'; + +class AppFontsize { + // 定义文字常量 + static double title_size = 15.px; //标题 + static double normal_text_size = 13.px; //普通文本 + static double small_text_size = 11.px; //小号文本 + static double smaller_text_size = 9.px; //小号文本 + static double explain_size = 8.px; //说明文本 +} diff --git a/lib/common/color/app_uri.dart b/lib/common/color/app_uri.dart new file mode 100644 index 0000000..86bb0d9 --- /dev/null +++ b/lib/common/color/app_uri.dart @@ -0,0 +1,32 @@ +// lib/api_endpoints.dart + +import 'package:vbvs_app/common/util/CommonVariables.dart'; + +class ApiEndpoints { + // Base URL of the API + static String baseUrl = '${CommonVariables.apiUrl}/api'; + + // Endpoints + static String signIn = '$baseUrl/auth/account/info/signIn'; //登录 + static String getUserInfo = '$baseUrl/user/info'; //获取用户信息 + static String updateProfile = '$baseUrl/user/updateProfile'; //更新用户信息 + static String login_code = '$baseUrl/auth/msg/signIn'; //登录验证码 + static String wx_auth_code = '$baseUrl/auth/msg/wxAuth'; //微信授权验证码 + static String register = '$baseUrl/auth/account/info/signUp'; //注册 + static String reset_code = '$baseUrl/auth/msg/restore'; //重置验证码 + static String reset_pd = '$baseUrl/auth/account/info/restore/pw'; //重置密码 + static String updateUserInfo = + '$baseUrl/auth/account/info/nameAndHead'; //更新用户资料 + static String autoLogin = '$baseUrl/auth/account/info/autoLogin'; //自动登录 + + //订单管理 + static String orderList = "/api/order/info/list"; //订单列表 + static String orderQianshou = "/api/order/info/get"; //签收 + + //分享设备 + static String deviceInvite = '$baseUrl/api/device/info/share'; //分享设备 + + // Add more endpoints as needed + //添加/床垫控制日志 + static String addLog = '$baseUrl/oplog/add'; +} diff --git a/lib/common/color/app_uri_status.dart b/lib/common/color/app_uri_status.dart new file mode 100644 index 0000000..81211a8 --- /dev/null +++ b/lib/common/color/app_uri_status.dart @@ -0,0 +1,19 @@ +// lib/http_status_codes.dart + +class HttpStatusCodes { + // Success codes + static const int ok = 1; + static const int created = 201; + static const int accepted = 202; + + // Client error codes + static const int badRequest = 400; + static const int unauthorized = 401; + static const int forbidden = 403; + static const int notFound = 404; + + // Server error codes + static const int internalServerError = 500; + static const int notImplemented = 501; + static const int serviceUnavailable = 503; +} diff --git a/lib/common/color/delivery_status.dart b/lib/common/color/delivery_status.dart new file mode 100644 index 0000000..a396d57 --- /dev/null +++ b/lib/common/color/delivery_status.dart @@ -0,0 +1,9 @@ +class DeliveryStatus { + // 私有构造函数,防止实例化 + const DeliveryStatus._(); + + // 物流状态常量 + static const String no_de = '待发货';//下单之后待发货 + static const String has_de = '已发货';//确认发货 + static const String completed = '已签收';//签收 +} diff --git a/lib/common/color/order_status.dart b/lib/common/color/order_status.dart new file mode 100644 index 0000000..860bcc6 --- /dev/null +++ b/lib/common/color/order_status.dart @@ -0,0 +1,37 @@ +class OrderStatus { + // 私有构造函数,防止实例化 + const OrderStatus._(); + + // 订单状态常量值 + static const int noPay = 1; // 已下单,待支付(both) + static const int paid = 2; // 已支付(app),待确认(web) + static const int toBeShipped = 3; // 已确认(web),待发货(app) + static const int toBeReceived = 4; // 已发货(web),待签收(app) + static const int received = 5; // 已签收(app),待完成(web) + static const int closed = 6; // 已关闭(both) + static const int completed = 7; // 已完成(web),已签收(app) + + // 订单状态编号与描述的映射 + static const Map statuses = { + 1: '待支付', // 已下单,待支付(both) + 2: '已支付', // 已支付(app),待确认(web) + 3: '待发货', // 已确认(web),待发货(app) + 4: '待签收', // 已发货(web),待签收(app) + 5: '已签收', // 已签收(app),待完成(web) + 6: '已关闭', // 已关闭(both) + 7: '已签收', // 已完成(web),已签收(app) + }; + + // 根据编号获取状态名称的描述 + static String getDescriptionByCode(int code) { + return statuses[code] ?? '未知状态'; + } + + // 根据状态名称获取编号 + static int getCodeByDescription(String description) { + return statuses.entries + .firstWhere((element) => element.value == description, + orElse: () => MapEntry(0, '未知状态')) + .key; + } +} diff --git a/lib/common/color/pay_status.dart b/lib/common/color/pay_status.dart new file mode 100644 index 0000000..54c1882 --- /dev/null +++ b/lib/common/color/pay_status.dart @@ -0,0 +1,10 @@ +class PayStatus { + // 私有构造函数,防止实例化 + const PayStatus._(); + + // 支付状态常量 + static const String no_pay = '待支付'; + static const String have_pay = '已支付'; + static const String close = '已关闭'; + +} diff --git a/lib/common/color/repair_status.dart b/lib/common/color/repair_status.dart new file mode 100644 index 0000000..65072a4 --- /dev/null +++ b/lib/common/color/repair_status.dart @@ -0,0 +1,9 @@ +class RepairStatus { + // 私有构造函数,防止实例化 + const RepairStatus._(); + + // 维修状态常量 + static const String pending = '审核中'; + static const String approved = '审核通过'; + static const String completed = '已完成'; +} diff --git a/lib/common/util/CommonVariables.dart b/lib/common/util/CommonVariables.dart new file mode 100644 index 0000000..b0c6dff --- /dev/null +++ b/lib/common/util/CommonVariables.dart @@ -0,0 +1,35 @@ +class CommonVariables { + static bool isNetWorkOn = false; + static bool test = false; + static String supabaseUrl = "https://mht1.he-info.cn"; + // static String wsUrl = "ws://mht-server.he-info.cn/ws"; + // static String apiUrl = "https://mht-server.he-info.cn"; + // static String shoph5Url = "https://mht-web.he-info.cn"; + // static String supabaseUrl = "https://zhmht.swes.com.cn:3443"; + // static String wsUrl = "wss://zhmht.swes.com.cn:8089/ws"; + // static String apiUrl = "https://zhmht.swes.com.cn:8089"; + static String wsUrl = "ws://192.168.1.129:8088/ws"; + static String apiUrl = "http://192.168.1.129:8088"; + static String shoph5Url = "https://zhmht.swes.com.cn:1443"; + static String sleepUrl = "https://alltoone.he-info.cn"; + static String efKey = "ef_key"; + + // // android app 内部更新地址 + // static String androidInternalUpgradeUrl = "http://192.168.0.112:1234"; + + // 企业微信客服拉起的url地址 + static String wxKfUrl = "https://work.weixin.qq.com/kfid/kfc7d2337b9c07b1269"; + // 企业微信ID + static String wxCorpId = "ww51feda6026280cd0"; + //ICP备案号 + static String ICPRightCode = "皖ICP备2024068219号-1A"; + //公司名称 + static String enterpriseName = "合肥眠花糖家具有限责任公司"; + //备案时间 + static String ICPTime = "2022-2025"; + + // 分享复制文字信息 + static String shareText = "您的朋友邀请您使用《智慧眠花糖》APP,请复制后面链接在浏览器中打开! " + + shoph5Url + + "/#/pages/download/download"; +} diff --git a/lib/common/util/FitTool.dart b/lib/common/util/FitTool.dart new file mode 100644 index 0000000..212c2b0 --- /dev/null +++ b/lib/common/util/FitTool.dart @@ -0,0 +1,43 @@ + + +class FitTool { + static double rpx = 0; + static bool isInit = false; + static init(double v) { + if (v < 1) { + return; + } + if (isInit == false) { + isInit = true; + rpx = v / 750.0; + } + } + + static double getPx(double size) { + return rpx * size * 2.0; + } + + static double getRpx(double size) { + return rpx * size; + } +} + +extension FitInt on int { + double get px { + return FitTool.getPx(this.toDouble()); + } + + double get rpx { + return FitTool.getRpx(this.toDouble()); + } +} + +extension FitDouble on double { + double get px { + return FitTool.getPx(this); + } + + double get rpx { + return FitTool.getRpx(this); + } +} diff --git a/lib/common/util/MyUtils.dart b/lib/common/util/MyUtils.dart new file mode 100644 index 0000000..5016e52 --- /dev/null +++ b/lib/common/util/MyUtils.dart @@ -0,0 +1,327 @@ +import 'dart:async'; + +import 'package:ef/ef.dart'; +import 'package:flutter/material.dart'; +import 'package:intl/intl.dart'; +import 'package:vbvs_app/common/util/CommonVariables.dart'; +import 'package:vbvs_app/common/util/FitTool.dart'; +import 'package:url_launcher/url_launcher.dart'; + +Future initDataEf({String key = ""}) async { + await ef.init( + '${CommonVariables.supabaseUrl}/', + key, + nosqlEnableWebsocket: false, + ); +} + +class MyUtils { + static String timestampToDateString(int timestamp) { + DateTime dateTime = DateTime.fromMillisecondsSinceEpoch(timestamp); + + String formattedDate = + '${dateTime.year}-${dateTime.month.toString().padLeft(2, '0')}-${dateTime.day.toString().padLeft(2, '0')} ' + '${dateTime.hour.toString().padLeft(2, '0')}:${dateTime.minute.toString().padLeft(2, '0')}:${dateTime.second.toString().padLeft(2, '0')}'; + + return formattedDate; + } + + static String hidePhoneNumber(String phoneNumber) { + if (phoneNumber.length != 11) { + // 检查手机号是否为11位 + throw Exception("手机号格式不正确"); + } + + // 将中间四位替换为星号 + return phoneNumber.replaceRange(3, 7, '****'); + } + + static double initialScrollOffset = 0.0; + // 判断手机号格式是否正确的方法 + static bool isValidPhoneNumber(String phoneNumber) { + final RegExp phoneRegExp = RegExp(r'^1[3-9]\d{9}$'); + return phoneRegExp.hasMatch(phoneNumber); + } + + static Future makePhoneCall(String phoneNumber) async { + final Uri launchUri = Uri( + scheme: 'tel', + path: phoneNumber, + ); + + if (await canLaunchUrl(launchUri)) { + await launchUrl(launchUri); + } else { + throw '无法拨打电话'; + } + } + + static String formatDateTime(DateTime dateTime) { + // 定义日期格式 + // dateTime.toLocal(); + final DateFormat formatter = DateFormat('yyyy-MM-dd HH:mm'); + // 返回格式化后的字符串 + return formatter.format(dateTime); + } + + static void scrollToFocusedInput(FocusNode focusNode, _scrollController) { + // 获取输入框相对于整个页面的偏移量 + RenderObject? object = focusNode.context?.findRenderObject(); + if (object != null) { + final RenderBox box = object as RenderBox; + final Offset position = box.localToGlobal(Offset.zero); + + // 将页面滚动到使输入框显示在屏幕上的位置 + _scrollController.animateTo( + position.dy - MediaQuery.of(focusNode.context!).size.height / 4, + duration: Duration(milliseconds: 300), + curve: Curves.easeInOut, + ); + } + } + + static void resetScrollPosition(_scrollController) { + _scrollController.animateTo( + initialScrollOffset, + duration: Duration(milliseconds: 300), + curve: Curves.easeInOut, + ); + } +} + +Color stringToColor(String hexColor) { + String formattedColor = hexColor.replaceAll("#", ""); + int colorValue = int.parse("0xFF$formattedColor"); + return Color(colorValue); +} + +//字节转16进制 +String ab2str(List buffer) { + return buffer.map((x) => x.toRadixString(16).padLeft(2, '0')).join(''); +} + +enum ToastColor { success, error, warn } + +ToastColor color_success = ToastColor.success; +ToastColor color_warning = ToastColor.warn; +ToastColor color_error = ToastColor.error; + +showToast(String msg, + {ToastColor color = ToastColor.error, int closeTime = 3}) { + // Fluttertoast.showToast( + // msg: msg, + // toastLength: Toast.LENGTH_LONG, + // gravity: ToastGravity.CENTER, + // timeInSecForIosWeb: 1, + // backgroundColor: color == null ? color_error : color, + // textColor: Colors.white, + // fontSize: 14.0, + // ); + final context = Get.overlayContext; // 获取 Overlay 的上下文 + Color background = Colors.red; + Color color_text = stringToColor("#FA5A4C"); + String icon = ""; + if (color == color_success) { + background = stringToColor("#DBF1E1"); + icon = "success"; + color_text = stringToColor("#31CA79"); + } else if (color == color_warning) { + background = stringToColor("#FDF6EC"); + icon = "warn"; + color_text = stringToColor("#F8AE00"); + } else if (color == color_error) { + background = stringToColor("#FEF0F0"); + icon = "error"; + color_text = stringToColor("#FA5A4C"); + } + if (context == null) return; + OverlayEntry overlayEntry = OverlayEntry( + builder: (context) => Positioned( + top: MediaQuery.of(context).size.height * 0.10, + left: MediaQuery.of(context).size.width * 0.5 - 225.rpx, + child: Material( + color: Colors.transparent, + child: Container( + width: 450.rpx, + padding: EdgeInsets.only(top: 20.rpx, bottom: 20.rpx), + decoration: BoxDecoration( + color: background, + borderRadius: BorderRadius.circular(10.rpx), + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Image.asset( + "assets/images/toast/${icon}_.png", + width: 30.rpx, + height: 30.rpx, + ), + SizedBox( + width: 18.rpx, + ), + Container( + constraints: BoxConstraints(maxWidth: 380.rpx), + child: Text( + msg, + maxLines: 9, + style: TextStyle( + color: color_text, + fontSize: 28.rpx, + fontWeight: FontWeight.w400), + ), + ) + ], + ), + ), + ), + ), + ); + Overlay.of(context)?.insert(overlayEntry); + Future.delayed(Duration(seconds: closeTime), () { + overlayEntry.remove(); + }); +} + +var closeIcon = GestureDetector( + onTapDown: (f) { + Get.back(); + }, + child: Container( + padding: EdgeInsets.fromLTRB(10.rpx, 18.rpx, 10.rpx, 10.rpx), + child: Container( + height: 42.rpx, + width: 42.rpx, + alignment: Alignment.center, + child: Icon( + Icons.close, + ), + ), + ), +); + +var closeIconWhite = GestureDetector( + onTapDown: (f) { + Get.back(); + }, + child: Container( + padding: EdgeInsets.all(10.rpx), + child: Container( + height: 42.rpx, + width: 42.rpx, + alignment: Alignment.center, + child: Icon( + Icons.close, + color: Colors.white, + ), + ), + ), +); + +var returnIconButtom = IconButton( + // padding: EdgeInsets.zero, // 去除默认 padding + // constraints: BoxConstraints(), // 去除最小尺寸限制 + onPressed: () => Get.back(), + icon: Icon(Icons.navigate_before, size: 60.rpx), +); + +var returnIconButtomAddCallback = (returnCallBack) { + return IconButton( + onPressed: () { + returnCallBack?.call(); + Get.back(); + }, + icon: Icon(Icons.navigate_before, size: 60.rpx), + ); +}; + +String time_08_Formatter(String time) { + if (time == null || time == "") { + return ""; + } + return DateFormat("yyyy-MM-dd HH:mm:ss") + .format(DateTime.parse(time).toLocal()); +} + +String time_08_Formatter_pattern(String time, String pattern) { + if (time == null || time == "") { + return ""; + } + return DateFormat(pattern).format(DateTime.parse(time).toLocal()); +} + +String storagePubSrc = + "${CommonVariables.supabaseUrl}/storage/v1/object/public/"; + +getStorageResourceUrl(String v) { + if (v.contains('http')) { + return v; + } + return storagePubSrc + v; +} + +enum LoadingDialogIcon { ble, wifi, none } + +class LoadingDialog { + static show(String name, {LoadingDialogIcon icon = LoadingDialogIcon.none}) { + String iconUrl = ""; + if (icon == LoadingDialogIcon.wifi) { + iconUrl = "wifi"; + } else if (icon == LoadingDialogIcon.ble) { + iconUrl = "ble"; + } + Get.dialog( + PopScope( + canPop: false, + child: Container( + // color: Colors.transparent, + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Container( + constraints: + BoxConstraints(minWidth: 300.rpx, maxWidth: 500.rpx), + decoration: + BoxDecoration(borderRadius: BorderRadius.circular(8)), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + if (iconUrl.isNotEmpty) + Container( + width: 120.rpx, + height: 120.rpx, + margin: EdgeInsets.only(bottom: 60.rpx), + child: + Image.asset("assets/images/toast/${iconUrl}.png"), + ), + Text( + textAlign: TextAlign.center, + name, + style: const TextStyle( + fontSize: 16, + color: Colors.white, + decoration: TextDecoration.none), + ), + SizedBox( + height: 30.rpx, + ), + const CircularProgressIndicator( + strokeWidth: 2, + valueColor: AlwaysStoppedAnimation( + Colors.white, + ), + ), + ], + ), + ) + ], + ), + ), + ), + barrierDismissible: false, + barrierColor: Color.fromRGBO(0, 0, 0, 0.8)); + } + + static hide() { + Get.back(); + } +} diff --git a/lib/common/util/Websocket.dart b/lib/common/util/Websocket.dart new file mode 100644 index 0000000..759b252 --- /dev/null +++ b/lib/common/util/Websocket.dart @@ -0,0 +1,113 @@ +import 'dart:async'; +import 'dart:convert'; + +import 'package:ef/ef.dart'; +import 'package:vbvs_app/controller/user_info_controller.dart'; +import 'package:web_socket_channel/io.dart'; +import 'package:web_socket_channel/web_socket_channel.dart'; + +class WebsocketProp { + late WebSocketChannel channel; + bool isConnecting = false; + bool isOpen = false; + bool isClose = false; //是否关闭 + late String url; + late Map fun; + + WebsocketProp initState(String url_, Map funn) { + print(url_); + fun = funn; + url = url_; + isConnecting = false; + _connect(); + return this; + } + + void _connect() { + isOpen = false; + channel = IOWebSocketChannel.connect( + "$url?token=${Get.find().model.token}"); + channel.stream.listen((message) { + // print('Received message: $message'); + // Handle incoming messages here + heartCheck(); + if (isOpen == false) { + fun['open']?.call(); + print('Received message: $message'); + isOpen = true; + isConnecting = false; + // Get.find().websocketSend(1); + return; + } + if (message == "ht") { + print('Received message: $message'); + return; + } + fun["message"]?.call(message); + }, onError: (error) { + // Handle connection error and initiate reconnection + print('Error: $error'); + isOpen = false; + _reconnect(); + }, onDone: () { + // Handle connection closed + print('Connection closed'); + isOpen = false; + _reconnect(); + }); + } + + Timer? timeoutObj; + Timer? serverTimeoutObj; + int timeout = 10; + + void heartCheck() { + timeoutObj?.cancel(); + serverTimeoutObj?.cancel(); + timeoutObj = Timer(Duration(seconds: timeout), () { + sendMessage("ht"); + serverTimeoutObj = Timer(Duration(seconds: timeout), () { + dispose(); + }); + }); + } + + void _reconnect() { + if (isClose) { + return; + } + if (!isConnecting) { + isConnecting = true; + _connect(); + Timer(const Duration(seconds: 5), () { + isConnecting = false; + if (isOpen == false) { + _reconnect(); + } + }); + } + } + + void sendMessage(data) { + if (isOpen == false) { + // showToast("websocket 已断开"); + return; + } + if (data is String) { + channel.sink.add(data); + } else { + String s = jsonEncode(data); + // print("发送 $s"); + channel.sink.add(s); + } + } + + sendWebSocketMessageCodeN(code, data) { + sendMessage({"code": code, "data": data}); + } + + void dispose() { + isClose = true; + channel.sink.close(); + } +} diff --git a/lib/common/util/myDialog/MyDialog.dart b/lib/common/util/myDialog/MyDialog.dart new file mode 100644 index 0000000..7542be4 --- /dev/null +++ b/lib/common/util/myDialog/MyDialog.dart @@ -0,0 +1,86 @@ +import 'dart:async'; + +import 'package:ef/ef.dart'; +import 'package:flutter/material.dart'; + +import 'my_dialog_controller.dart'; + +class MyDialog extends GetView { + final String message; + final int seconds; + final Color? textColor; // 可选参数 + + MyDialog({ + required this.message, + required this.seconds, + this.textColor, // 可选参数的赋值 + }); + + @override + Widget build(BuildContext context) { + // 设置弹窗在2秒后自动关闭 + Timer(Duration(seconds: seconds), () { + if (Navigator.canPop(context)) { + Navigator.of(context).pop(); + } + }); + + return Dialog( + backgroundColor: Colors.transparent, // 使弹窗背景透明 + elevation: 0, // 去除阴影 + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(20), + ), + child: ConstrainedBox( + constraints: BoxConstraints( + minWidth: 232, + maxHeight: 400, + minHeight: 47, + maxWidth: 400, + ), + child: Opacity( + opacity: 1, // 设置容器的透明度为80% + child: Container( + decoration: BoxDecoration( + // color: Color(0xFF182B7C), + color: Color(0xFFffebe9), + border: Border.all( + // color: Color(0xFFe60012), // 边框颜色 + color: textColor ?? Color(0xFFe60012), + width: 1, // 边框宽度 + ), + borderRadius: BorderRadius.circular(4), + boxShadow: [ + BoxShadow( + color: Colors.black26, + blurRadius: 10, + offset: Offset(0, 4), + ), + ], + ), + child: Padding( + padding: const EdgeInsets.all(4.0), + child: SingleChildScrollView( + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + SizedBox(height: 8), + Text( + message, + style: TextStyle( + fontSize: 13, + // color: Color(0xFFe60012), // 边框颜色 + color: textColor ?? Color(0xFFe60012), + ), + textAlign: TextAlign.center, + ), + ], + ), + ), + ), + ), + ), + ), + ); + } +} diff --git a/lib/common/util/myDialog/confirm_dialog.dart b/lib/common/util/myDialog/confirm_dialog.dart new file mode 100644 index 0000000..58ace86 --- /dev/null +++ b/lib/common/util/myDialog/confirm_dialog.dart @@ -0,0 +1,71 @@ +import 'package:ef/ef.dart'; +import 'package:flutter/material.dart'; +import 'package:vbvs_app/common/util/FitTool.dart'; +import 'package:vbvs_app/common/util/MyUtils.dart'; + +class ConfirmDialog extends GetView { + ConfirmDialog(); + + Future showConfirmCustomDialog(BuildContext context, + {String name = "是否确认取消?"}) async { + // Completer completer = Completer(); + TextEditingController textEditingController = TextEditingController(); + return showDialog( + context: context, + barrierDismissible: false, + builder: (BuildContext context) { + return Dialog( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10.0), + ), + child: Container( + width: 340, + padding: EdgeInsets.fromLTRB(16, 0, 16, 16), + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container(alignment: Alignment.centerRight, child: closeIcon), + Center( + child: Text( + '${name}', + style: TextStyle(fontSize: 16), + ), + ), + SizedBox(height: 30), + Container( + margin: EdgeInsets.only(top: 50.rpx, bottom: 40.rpx), + alignment: Alignment.center, + child: InkWell( + onTap: () { + Get.back(result: "confirm"); + }, + child: Container( + width: 280.rpx, + height: 60.rpx, + alignment: Alignment.center, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(6), + color: stringToColor("#D3B684")), + child: Text( + '确定', + style: TextStyle(color: Colors.white, fontSize: 30.rpx), + ), + ), + ), + ) + ], + ), + ), + ); + }, + ); + // return completer.future; + } + + @override + Widget build(BuildContext context) { + // TODO: implement build + return Container(); + } +} diff --git a/lib/common/util/myDialog/my_dialog_controller.dart b/lib/common/util/myDialog/my_dialog_controller.dart new file mode 100644 index 0000000..5f7d7f4 --- /dev/null +++ b/lib/common/util/myDialog/my_dialog_controller.dart @@ -0,0 +1,44 @@ +import 'package:ef/ef.dart'; +import 'package:flutter/material.dart'; +import 'package:json_annotation/json_annotation.dart'; + +import 'MyDialog.dart'; + +part 'my_dialog_controller.g.dart'; + +@JsonSerializable() +class MyDialogModel { + //版本id + String? title_name = "标题"; //标题 + String? message = "消息内容"; + + MyDialogModel(); + + static MyDialogModel fromJson(Map json) => + _$MyDialogModelFromJson(json); + Map toJson() => _$MyDialogModelToJson(this); +} + +class MyDialogController extends GetControllerEx { + MyDialogController() { + attr = GetModel(MyDialogModel()).obs; + } + + Future showCustomDialog( + BuildContext context, + String message, { + Color? textColor, // 可选参数 + }) async { + await showDialog( + barrierColor: Colors.transparent, // 设置上级页面不变暗 + context: context, + builder: (BuildContext context) { + return MyDialog( + message: message, + seconds: 2, + textColor: textColor, + ); + }, + ); + } +} diff --git a/lib/common/util/myDialog/my_dialog_controller.g.dart b/lib/common/util/myDialog/my_dialog_controller.g.dart new file mode 100644 index 0000000..a711531 --- /dev/null +++ b/lib/common/util/myDialog/my_dialog_controller.g.dart @@ -0,0 +1,18 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'my_dialog_controller.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +MyDialogModel _$MyDialogModelFromJson(Map json) => + MyDialogModel() + ..title_name = json['title_name'] as String? + ..message = json['message'] as String?; + +Map _$MyDialogModelToJson(MyDialogModel instance) => + { + 'title_name': instance.title_name, + 'message': instance.message, + }; diff --git a/lib/component/tool/CustomCard.dart b/lib/component/tool/CustomCard.dart new file mode 100644 index 0000000..0e4eb9c --- /dev/null +++ b/lib/component/tool/CustomCard.dart @@ -0,0 +1,95 @@ +import 'package:flutter/material.dart'; + +class CustomCard extends StatefulWidget { + final double borderRadius; // 圆角 + final VoidCallback onTap; // 点击回调 + final List colors; // 背景颜色列表 + final Widget child; // 子组件 + final String title; + + const CustomCard({ + Key? key, + required this.borderRadius, + required this.onTap, + required this.colors, + required this.child, + required this.title, + }) : super(key: key); + + @override + State createState() => _CustomCardState(); +} + +class _CustomCardState extends State + with SingleTickerProviderStateMixin { + double _scale = 1.0; + final Duration _animationDuration = Duration(milliseconds: 50); + final GlobalKey _inkKey = GlobalKey(); + + Future _handleTap(TapDownDetails details) async { + setState(() { + _scale = 0.95; + }); + + await Future.delayed(_animationDuration); + + setState(() { + _scale = 1.0; + }); + + await Future.delayed(_animationDuration); + + // 手动触发水波纹 + final RenderBox? box = + _inkKey.currentContext?.findRenderObject() as RenderBox?; + if (box != null) { + final Offset localPosition = box.globalToLocal(details.globalPosition); + InkRipple.splashFactory.create( + controller: Material.of(_inkKey.currentContext!)!, + referenceBox: box, + position: localPosition, + color: widget.colors.first.withOpacity(0.2), + containedInkWell: true, + borderRadius: BorderRadius.circular(widget.borderRadius), + textDirection: Directionality.of(context), + ); + } + + widget.onTap(); + } + + @override + Widget build(BuildContext context) { + final bool isGradient = widget.colors.length > 1; + final Color baseColor = widget.colors.first; + + return Material( + color: Colors.transparent, + borderRadius: BorderRadius.circular(widget.borderRadius), + child: GestureDetector( + onTapDown: _handleTap, + behavior: HitTestBehavior.translucent, // 关键:让空白区域也能点击 + child: AnimatedScale( + scale: _scale, + duration: _animationDuration, + curve: Curves.easeInOut, + child: Ink( + key: _inkKey, + decoration: BoxDecoration( + color: isGradient ? null : baseColor, + gradient: isGradient + ? LinearGradient( + colors: widget.colors, + begin: Alignment.topLeft, + end: Alignment.bottomRight, + ) + : null, + borderRadius: BorderRadius.circular(widget.borderRadius), + ), + child: widget.child, + ), + ), + ), + ); + } +} diff --git a/lib/controller/device/blueteeth_bind_controller.dart b/lib/controller/device/blueteeth_bind_controller.dart new file mode 100644 index 0000000..adf8380 --- /dev/null +++ b/lib/controller/device/blueteeth_bind_controller.dart @@ -0,0 +1,31 @@ +import 'package:ef/ef.dart'; +import 'package:json_annotation/json_annotation.dart'; + +part 'blueteeth_bind_controller.g.dart'; // 由json_serializable自动生成的部分 + +@JsonSerializable() +class BlueteethBindModel { + int read = 1;//是否不再提示教程 0 不再提示 1 需要提示 + + BlueteethBindModel(); + + // 从JSON反序列化时的异常处理 + + factory BlueteethBindModel.fromJson(Map json) { + try { + return _$BlueteethBindModelFromJson(json); + } catch (e) { + // 在实际应用中,应该有更细致的异常处理策略和错误日志 + return BlueteethBindModel(); // 或者返回一个带有错误信息的特定DeviceInfoModel实例 + } + } + + // 序列化为JSON时的异常处理 + Map toJson() => _$BlueteethBindModelToJson(this); +} + +class BlueteethBindController extends GetControllerEx { + BlueteethBindController() { + attr = GetModel(BlueteethBindModel()).obs; + } +} \ No newline at end of file diff --git a/lib/controller/device/blueteeth_bind_controller.g.dart b/lib/controller/device/blueteeth_bind_controller.g.dart new file mode 100644 index 0000000..fb8ecf3 --- /dev/null +++ b/lib/controller/device/blueteeth_bind_controller.g.dart @@ -0,0 +1,15 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'blueteeth_bind_controller.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +BlueteethBindModel _$BlueteethBindModelFromJson(Map json) => + BlueteethBindModel()..read = (json['read'] as num).toInt(); + +Map _$BlueteethBindModelToJson(BlueteethBindModel instance) => + { + 'read': instance.read, + }; diff --git a/lib/controller/main_bottom/global_controller.dart b/lib/controller/main_bottom/global_controller.dart new file mode 100644 index 0000000..8772ee5 --- /dev/null +++ b/lib/controller/main_bottom/global_controller.dart @@ -0,0 +1,172 @@ +import 'dart:async'; + +import 'package:ef/ef.dart'; +import 'package:vbvs_app/controller/main_bottom/main_page_controller.dart'; +import 'package:vbvs_app/controller/user_info_controller.dart'; + +class GlobalModel { + List deviceList = []; + Map deviceMain = {}; + + Map useBedController = {}; //之前控制的设备 + + List deviceType = []; + + List homeImgList = []; //轮播图 + + bool hideBottomNavigationBar = false; + + get deviceMainIsShare { + if (deviceMain != null && deviceMain["type"] == 2) { + return true; + } else { + return false; + } + } + + // get JunheDevices { + // List arr = []; + + // deviceList.forEach((d) { + // d?["personnelInfo"]?.forEach((item) { + // if (item["mac"] == d["bindMacA"] && + // arr.indexWhere((a) => a["mac"] == item["mac"]) == -1) { + // arr.add(item); + // } + // }); + // if (d["bindMacB"] != null && d["bindMacB"] != "") { + // d["personnelInfo"].forEach((item) { + // if (item["mac"] == d["bindMacB"] && + // arr.indexWhere((a) => a["mac"] == item["mac"]) == -1) { + // arr.add(item); + // } + // }); + // } + // }); + + // return arr; + // } + + get JunheDevices { + List arr = []; + try { + if (deviceList != null) { + deviceList.forEach((d) { + if (d?["personnelInfo"] != null) { + d["personnelInfo"].forEach((item) { + if (item["mac"] == d["bindMacA"] && + arr.indexWhere((a) => a["mac"] == item["mac"]) == -1) { + arr.add(item); + } + }); + } + if (d["bindMacB"] != null && d["bindMacB"] != "") { + if (d["personnelInfo"] != null) { + d["personnelInfo"].forEach((item) { + if (item["mac"] == d["bindMacB"] && + arr.indexWhere((a) => a["mac"] == item["mac"]) == -1) { + arr.add(item); + } + }); + } + } + }); + } + } catch (e) { + print(e); + } + return arr; + } + + get mainDevicePeople { + if (deviceMain == null || deviceMain["mac"] == null) { + return [{}, {}]; + } + List arr = [{}, {}]; + if (deviceMain["personnelInfo"] != null) { + if (deviceMain["bindMacA"] != null) { + deviceMain["personnelInfo"]?.forEach((d) { + if (d["mac"] == deviceMain["bindMacA"]) { + arr[0] = d; + } + }); + } + if (deviceMain["bindMacB"] != null) { + deviceMain["personnelInfo"]?.forEach((d) { + if (d["mac"] == deviceMain["bindMacB"]) { + arr[1] = d; + } + }); + } + } + return arr; + } + + GlobalModel(); +} + +class GlobalController extends GetControllerEx { + GlobalController() { + attr = GetModel(GlobalModel()).obs; + } + + get userInfoController => Get.find(); + + Timer? getDeviceListTimer; + + @override + void onInit() { + super.onInit(); + } + + resetParmAll() { + resetParm(); + Get.find().resetParm(); + } + + resetParm() { + getDeviceListTimer?.cancel(); + getDeviceListTimer = null; + model.deviceList = []; + model.deviceMain = {}; + model.useBedController = {}; + model.deviceType = []; + model.homeImgList = []; + model.hideBottomNavigationBar = false; + } + + deviceUpdateTimerCreated() { + if (getDeviceListTimer == null) { + getDeviceListTimer = Timer.periodic(const Duration(seconds: 10), (t) { + if (userInfoController.model.token != null) { + + } + }); + } + } + + + + + getDeviceGroupName(device) { + return "${device['roomName']}/${device["deviceType"]?["name"]}/${device["name"]}"; + } + + getDeviceGroupName2(device) { + return "${device["deviceType"]?["name"]}/${device["name"]}"; + } + + getUpperCaseMac(mac) { + if (mac == null || mac == "") { + return ""; + } + return "$mac".toUpperCase(); + } + + getDeviceType() async { + var rs = + await ef.from("app_device_type").select().order("id", ascending: true); + model.deviceType = rs.where((d) => d["page"] != null).toList(); + updateAll(); + } +} diff --git a/lib/controller/main_bottom/main_page_controller.dart b/lib/controller/main_bottom/main_page_controller.dart new file mode 100644 index 0000000..d720465 --- /dev/null +++ b/lib/controller/main_bottom/main_page_controller.dart @@ -0,0 +1,34 @@ +import 'package:ef/ef.dart'; +import 'package:json_annotation/json_annotation.dart'; + +part 'main_page_controller.g.dart'; // 由json_serializable自动生成的部分 + +@JsonSerializable() +class MainPageModel { + int currentIndex = 0; + MainPageModel(); + + // 从JSON反序列化时的异常处理 + + factory MainPageModel.fromJson(Map json) { + try { + return _$MainPageModelFromJson(json); + } catch (e) { + // 在实际应用中,应该有更细致的异常处理策略和错误日志 + return MainPageModel(); // 或者返回一个带有错误信息的特定DeviceInfoModel实例 + } + } + + // 序列化为JSON时的异常处理 + Map toJson() => _$MainPageModelToJson(this); +} + +class MainPageController extends GetControllerEx { + MainPageController() { + attr = GetModel(MainPageModel()).obs; + } + + resetParm() { + model.currentIndex = 0; + } +} \ No newline at end of file diff --git a/lib/controller/main_bottom/main_page_controller.g.dart b/lib/controller/main_bottom/main_page_controller.g.dart new file mode 100644 index 0000000..dd0b580 --- /dev/null +++ b/lib/controller/main_bottom/main_page_controller.g.dart @@ -0,0 +1,15 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'main_page_controller.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +MainPageModel _$MainPageModelFromJson(Map json) => + MainPageModel()..currentIndex = (json['currentIndex'] as num).toInt(); + +Map _$MainPageModelToJson(MainPageModel instance) => + { + 'currentIndex': instance.currentIndex, + }; diff --git a/lib/controller/theme_controller/ThemeController.dart b/lib/controller/theme_controller/ThemeController.dart new file mode 100644 index 0000000..029d5c9 --- /dev/null +++ b/lib/controller/theme_controller/ThemeController.dart @@ -0,0 +1,18 @@ +import 'package:ef/ef.dart'; +import 'package:flutter/material.dart'; +import 'package:vbvs_app/model/CustomThemeColor.dart'; + +class ThemeController extends GetControllerEx { + //todo 数据库查询的颜色等于这个 + CustomThemeColor currentColor = CustomThemeColor.light; + ThemeData currentTheme = ThemeData(); + + void changeTheme(CustomThemeColor color) { + currentColor = color; + currentTheme = ThemeData( + primaryColor: color.sc1, + scaffoldBackgroundColor: color.sc2, + ); + update(); + } +} \ No newline at end of file diff --git a/lib/controller/user_info_controller.dart b/lib/controller/user_info_controller.dart new file mode 100644 index 0000000..4ebe7e3 --- /dev/null +++ b/lib/controller/user_info_controller.dart @@ -0,0 +1,50 @@ +import 'dart:io'; + +import 'package:ef/ef.dart'; + +import 'package:get_storage/get_storage.dart'; +import 'package:json_annotation/json_annotation.dart'; +import 'package:path/path.dart' as p; +import 'package:uuid/uuid.dart'; +import 'package:vbvs_app/common/color/app_uri_status.dart'; +import 'package:vbvs_app/common/util/CommonVariables.dart'; + +import 'package:vbvs_app/common/util/MyUtils.dart'; +import 'package:vbvs_app/model/api_response.dart'; +import 'package:vbvs_app/model/user_data.dart'; + + +part 'user_info_controller.g.dart'; + +@JsonSerializable() +class UserInfoModel { + int? message = 0; //消息数量 + + UserModel? user; //用户信息 + String? token; //token值 + String? runSystem; //运行系统 + String? phoneVersion; //手机版本 + String? deviceId; //手机唯一 + String? deviceModel; //设备可见型号(如 "iPhone","iPad") + String? appVersion; //app版本信息 + + @JsonKey(ignore: true) + Session? superbase_session; + @JsonKey(ignore: true) + User? superbase_user; + + String? img_bucket = 'user'; + int? login = 0; //是否登录0:未登录 1:已登录 + + UserInfoModel(); + static UserInfoModel fromJson(Map json) => + _$UserInfoModelFromJson(json); + Map toJson() => _$UserInfoModelToJson(this); +} + +class UserInfoController extends GetControllerEx { + // 初始化实例 + UserInfoController() { + attr = GetModel(UserInfoModel()).obs; + } +} diff --git a/lib/controller/user_info_controller.g.dart b/lib/controller/user_info_controller.g.dart new file mode 100644 index 0000000..2243d6a --- /dev/null +++ b/lib/controller/user_info_controller.g.dart @@ -0,0 +1,36 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'user_info_controller.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +UserInfoModel _$UserInfoModelFromJson(Map json) => + UserInfoModel() + ..message = (json['message'] as num?)?.toInt() + ..user = json['user'] == null + ? null + : UserModel.fromJson(json['user'] as Map) + ..token = json['token'] as String? + ..runSystem = json['runSystem'] as String? + ..phoneVersion = json['phoneVersion'] as String? + ..deviceId = json['deviceId'] as String? + ..deviceModel = json['deviceModel'] as String? + ..appVersion = json['appVersion'] as String? + ..img_bucket = json['img_bucket'] as String? + ..login = (json['login'] as num?)?.toInt(); + +Map _$UserInfoModelToJson(UserInfoModel instance) => + { + 'message': instance.message, + 'user': instance.user, + 'token': instance.token, + 'runSystem': instance.runSystem, + 'phoneVersion': instance.phoneVersion, + 'deviceId': instance.deviceId, + 'deviceModel': instance.deviceModel, + 'appVersion': instance.appVersion, + 'img_bucket': instance.img_bucket, + 'login': instance.login, + }; diff --git a/lib/language/AppLanguage.dart b/lib/language/AppLanguage.dart new file mode 100644 index 0000000..5a1abda --- /dev/null +++ b/lib/language/AppLanguage.dart @@ -0,0 +1,63 @@ +import 'dart:convert'; + +import 'package:ef/ef.dart'; +import 'package:flutter/services.dart'; + +class AppLanguage extends Translations { + // 私有构造函数 + AppLanguage._internal(); + + // 单例实例 + static final AppLanguage _instance = AppLanguage._internal(); + + factory AppLanguage() => _instance; + + // 缓存翻译数据 + final Map> _localizedValues = {}; + + @override + Map> get keys => _localizedValues; + + // 动态加载语言文件 + Future loadLanguage(String languageCode) async { + if (_localizedValues.containsKey(languageCode)) { + return; // 如果语言已经加载,无需重复加载 + } + + try { + // 加载 JSON 文件 + final jsonString = + await rootBundle.loadString('assets/langs/$languageCode.json'); + final Map jsonMap = json.decode(jsonString); + + // 扁平化 JSON 数据并存储到缓存 + _localizedValues[languageCode] = _flattenJson(jsonMap); + + // 通知 GetX 更新 keys + // Get.forceAppUpdate(); + Get.appendTranslations(keys); + } catch (e) { + print('Error loading $languageCode language file: $e'); + } + } + + // 扁平化嵌套 JSON 数据 + Map _flattenJson(Map json, + [String prefix = '']) { + final Map flatMap = {}; + json.forEach((key, value) { + final newKey = prefix.isEmpty ? key : '$prefix.$key'; + if (value is Map) { + flatMap.addAll(_flattenJson(value, newKey)); + } else { + flatMap[newKey] = value.toString(); + } + }); + return flatMap; + } + + // 清理语言缓存 + void clearLanguage(String languageCode) { + _localizedValues.remove(languageCode); + } +} diff --git a/lib/main.dart b/lib/main.dart index 8e94089..f3e0f22 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,125 +1,161 @@ +import 'package:ef/ef.dart'; import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:get_storage/get_storage.dart'; +import 'package:vbvs_app/common/util/FitTool.dart'; +import 'package:vbvs_app/controller/device/blueteeth_bind_controller.dart'; +import 'package:vbvs_app/controller/main_bottom/global_controller.dart'; +import 'package:vbvs_app/controller/main_bottom/main_page_controller.dart'; +import 'package:vbvs_app/controller/theme_controller/ThemeController.dart'; +import 'package:vbvs_app/language/AppLanguage.dart'; +import 'package:vbvs_app/model/CustomThemeColor.dart'; +import 'package:vbvs_app/model/user_data.dart'; +import 'controller/user_info_controller.dart'; +import 'routers/routers.dart'; -void main() { - runApp(const MyApp()); +import 'package:flutter_localizations/flutter_localizations.dart'; +import 'package:syncfusion_localizations/syncfusion_localizations.dart'; + +Future main() async { + WidgetsFlutterBinding.ensureInitialized(); + await AppLanguage().loadLanguage("zh_CN"); + WidgetsFlutterBinding.ensureInitialized(); + + // ApiService.init(); + // await GetStorage.init(); + // 初始化登录 + await initLogin(); + // 检查网络 + // Checknetwork.checkNetwork(); + // 微信开放平台注册 + // initWX(); + // // 初始化 flutter_xupdate android app 更新 + // initXUpdate(); + + WidgetsFlutterBinding.ensureInitialized(); + SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]) + .then((_) { + runApp(MyApp()); + }); + + // runApp(const MyApp()); } +Future initLogin() async { + // 初始化控制器 + Get.put(UserInfoController()); + // Get.put(SettingController()); + + // 获取设备信息,需要用户点击确认隐私协议与用户协议选择框时才能获取 + // Deviceconfig.initPlatformState(); + // 获取app版本号 + // SettingController settingController = Get.find(); + // settingController.model.appVersion = await Deviceconfig.getAppVersion(); + + final box = GetStorage(); + UserInfoController userInfoController = Get.find(); + String? token = box.read('token'); + // print('Token: $token'); + Map? userMap = box.read('user'); + if (userMap != null) { + UserModel user = UserModel.fromJson(userMap); + userInfoController.model.user = user; + } + if (token != null) { + // userInfoController.model.login = 1; + //根据token去请求 + // await userInfoController.autoLogin(token); + } else { + // 如果没有 token,则将用户标记为未登录 + userInfoController.model.login = 0; + } +} + +// 初始化微信开放平台注册 +// Future initWX() async { +// Fluwx fluwx = Fluwx(); +// fluwx.registerApi( +// //请填写自己的微信appid +// appId: "wx929c548fea6af9c7", +// doOnAndroid: true, +// doOnIOS: true, +// universalLink: "https://zhmht.swes.com.cn/app/"); +// } + +// // 初始化 flutter_xupdate android app 更新 +// Future initXUpdate() async { +// if (Platform.isAndroid) { +// FlutterXUpdate.init( +// // 是否输出日志 +// debug: true, +// // 是否使用post请求 +// isPost: true, +// // post请求是否是上传json +// isPostJson: false, +// // 请求响应超时时间 +// timeout: 25000, +// // 是否开启自动模式 +// isWifiOnly: false, +// // 是否开启自动模式 +// isAutoMode: false, +// // 需要设置的公共参数 +// supportSilentInstall: false, +// // 在下载过程中,如果点击了取消的话,是否弹出切换下载方式的重试提示弹窗 +// enableRetry: false) +// .then((value) { +// print('初始化成功: $value'); +// }).catchError((error) { +// print(error); +// }); + +// FlutterXUpdate.setUpdateHandler(onUpdateError: (message) async { +// print('onUpdateError: $message'); +// }); +// } +// } + class MyApp extends StatelessWidget { - const MyApp({super.key}); + MyApp({super.key}); + final ThemeController themeController = Get.put(ThemeController()); // This widget is the root of your application. @override Widget build(BuildContext context) { - return MaterialApp( - title: 'Flutter Demo', - theme: ThemeData( - // This is the theme of your application. - // - // TRY THIS: Try running your application with "flutter run". You'll see - // the application has a purple toolbar. Then, without quitting the app, - // try changing the seedColor in the colorScheme below to Colors.green - // and then invoke "hot reload" (save your changes or press the "hot - // reload" button in a Flutter-supported IDE, or press "r" if you used - // the command line to start the app). - // - // Notice that the counter didn't reset back to zero; the application - // state is not lost during the reload. To reset the state, use hot - // restart instead. - // - // This works for code too, not just values: Most code changes can be - // tested with just a hot reload. - colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple), - useMaterial3: true, - ), - home: const MyHomePage(title: 'Flutter Demo Home Page'), - ); - } -} - -class MyHomePage extends StatefulWidget { - const MyHomePage({super.key, required this.title}); - - // This widget is the home page of your application. It is stateful, meaning - // that it has a State object (defined below) that contains fields that affect - // how it looks. - - // This class is the configuration for the state. It holds the values (in this - // case the title) provided by the parent (in this case the App widget) and - // used by the build method of the State. Fields in a Widget subclass are - // always marked "final". - - final String title; - - @override - State createState() => _MyHomePageState(); -} - -class _MyHomePageState extends State { - int _counter = 0; - - void _incrementCounter() { - setState(() { - // This call to setState tells the Flutter framework that something has - // changed in this State, which causes it to rerun the build method below - // so that the display can reflect the updated values. If we changed - // _counter without calling setState(), then the build method would not be - // called again, and so nothing would appear to happen. - _counter++; + themeController.changeTheme(CustomThemeColor.dark); + UserInfoController userInfoController = Get.find(); + return LayoutBuilder(builder: (contxt, cons) { + double width = cons.maxWidth; + double height = cons.maxHeight; + if (width < 1) { + return Container(); + } + FitTool.init(width < height ? width : height); + return GetMaterialApp( + translations: AppLanguage(), + locale: const Locale("zh", "CN"), + fallbackLocale: const Locale("zh", "CN"), + localizationsDelegates: [ + GlobalMaterialLocalizations.delegate, + GlobalWidgetsLocalizations.delegate, + GlobalCupertinoLocalizations.delegate, + SfGlobalLocalizations.delegate, + ], + supportedLocales: [ + const Locale('zh', 'CN'), // 中文 + // 其他支持的语言 + ], + debugShowCheckedModeBanner: false, + title: '', + theme: themeController.currentTheme, + // home: const MyHomePage(title: '智慧眠花糖 Home Page'), + initialRoute: "/mianPageBottomChange", + onGenerateRoute: onGenerateRoute, + initialBinding: BindingsBuilder(() => [ + Get.lazyPut(() => UserInfoController()), + Get.put(GlobalController()), + Get.lazyPut(() => MainPageController()), + Get.lazyPut(() => BlueteethBindController()), + ])); }); } - - @override - Widget build(BuildContext context) { - // This method is rerun every time setState is called, for instance as done - // by the _incrementCounter method above. - // - // The Flutter framework has been optimized to make rerunning build methods - // fast, so that you can just rebuild anything that needs updating rather - // than having to individually change instances of widgets. - return Scaffold( - appBar: AppBar( - // TRY THIS: Try changing the color here to a specific color (to - // Colors.amber, perhaps?) and trigger a hot reload to see the AppBar - // change color while the other colors stay the same. - backgroundColor: Theme.of(context).colorScheme.inversePrimary, - // Here we take the value from the MyHomePage object that was created by - // the App.build method, and use it to set our appbar title. - title: Text(widget.title), - ), - body: Center( - // Center is a layout widget. It takes a single child and positions it - // in the middle of the parent. - child: Column( - // Column is also a layout widget. It takes a list of children and - // arranges them vertically. By default, it sizes itself to fit its - // children horizontally, and tries to be as tall as its parent. - // - // Column has various properties to control how it sizes itself and - // how it positions its children. Here we use mainAxisAlignment to - // center the children vertically; the main axis here is the vertical - // axis because Columns are vertical (the cross axis would be - // horizontal). - // - // TRY THIS: Invoke "debug painting" (choose the "Toggle Debug Paint" - // action in the IDE, or press "p" in the console), to see the - // wireframe for each widget. - mainAxisAlignment: MainAxisAlignment.center, - children: [ - const Text( - 'You have pushed the button this many times:', - ), - Text( - '$_counter', - style: Theme.of(context).textTheme.headlineMedium, - ), - ], - ), - ), - floatingActionButton: FloatingActionButton( - onPressed: _incrementCounter, - tooltip: 'Increment', - child: const Icon(Icons.add), - ), // This trailing comma makes auto-formatting nicer for build methods. - ); - } } diff --git a/lib/model/CustomThemeColor.dart b/lib/model/CustomThemeColor.dart new file mode 100644 index 0000000..741f520 --- /dev/null +++ b/lib/model/CustomThemeColor.dart @@ -0,0 +1,283 @@ +import 'package:flutter/material.dart'; +import 'package:json_annotation/json_annotation.dart'; + +@JsonSerializable() +class CustomThemeColor { + final String color1;// + final String color2; + final String color3; + final String color4; + final String color5; + final String color6; + final String color7; + final String color8; + final String color9; + final String color10; + final String color11; + final String color12; + final String color13; + final String color14; + final String color15; + final String color16; + final String color17; + final String color18; + final String color19; + final String color20; + final String color21; + final String color25; + final String color26; + final String color27; + final String color28; + final String color29; + final String color30; + final String color31; + final String color32; + final String color33; + final String color34; + + final String color38; + final String color39; + final String color40; + + CustomThemeColor({ + required this.color1, + required this.color2, + required this.color3, + required this.color4, + required this.color5, + required this.color6, + required this.color7, + required this.color8, + required this.color9, + required this.color10, + required this.color11, + required this.color12, + required this.color13, + required this.color14, + required this.color15, + required this.color16, + required this.color17, + required this.color18, + required this.color19, + required this.color20, + required this.color21, + required this.color25, + required this.color26, + required this.color27, + required this.color28, + required this.color29, + required this.color30, + required this.color31, + required this.color32, + required this.color33, + required this.color34, + required this.color38, + required this.color39, + required this.color40, + }); + + //浅色模式 + static final light = CustomThemeColor( + color1: '#FFFFFF', + color2: "#f7f8fa", + color3: "#4AD8FA", + color4: "#4AD8FA", + color5: "#4AD8FA", + color6: "#4AD8FA", + color7: "#333333", + color8: "#333333", + color9: "#333333", + color10: "#f7f8fa", + color11: "#f7f8fa", + color12: "#DBF8FD", + color13: "#d3d3d3", + color14: "#333333", + color15: "#FF7159", + color16: "#d3d3d3", + color17: "#FFFFFF", + color18: "#4AD8FA", + color19: "#4AD8FA", + color20: "#f7f8fa", + color21: "#5EE00A", + color25: "#FF7159", + color26: "#4AD8FA", + color27: "#f7f8fa", + color28: "#4E8408", + color29: "#79BC31", + color30: "#E55E92", + color31: "#FF1D25", + color32: "#7bbb33", + color33: "#fe15b8d", + color34: "#EE0000", + color38: "#E3E4E5", + color39: "#F3F5F6", + color40: "#333333"); + //深色模式 + static final dark = CustomThemeColor( + color1: '#242835', + color2: "#f7f8fa", + color3: "#4AD8FA", + color4: "#4AD8FA", + color5: "#4AD8FA", + color6: "#4AD8FA", + color7: "#333333", + color8: "#333333", + color9: "#333333", + color10: "#f7f8fa", + color11: "#f7f8fa", + color12: "#DBF8FD", + color13: "#d3d3d3", + color14: "#333333", + color15: "#FF7159", + color16: "#d3d3d3", + color17: "#FFFFFF", + color18: "#4AD8FA", + color19: "#4AD8FA", + color20: "#f7f8fa", + color21: "#5EE00A", + color25: "#FF7159", + color26: "#4AD8FA", + color27: "#f7f8fa", + color28: "#4E8408", + color29: "#79BC31", + color30: "#E55E92", + color31: "#FF1D25", + color32: "#7bbb33", + color33: "#fe15b8d", + color34: "#EE0000", + color38: "#E3E4E5", + color39: "#F3F5F6", + color40: "#333333"); + + //获取颜色1 菜单栏颜色 + Color get sc1 => getColor(color1); + //获取颜色2 + Color get sc2 => getColor(color2); + //获取颜色3 + Color get sc3 => getColor(color3); + //获取颜色4 + Color get sc4 => getColor(color4); + //获取颜色5 + Color get sc5 => getColor(color5); + //获取颜色6 + Color get sc6 => getColor(color6); + //获取颜色7 + Color get sc7 => getColor(color7); + //获取颜色8 + Color get sc8 => getColor(color8); + //获取颜色9 + Color get sc9 => getColor(color9); + //获取颜色10 + Color get sc10 => getColor(color10); + Color get sc11 => getColor(color11); + Color get sc12 => getColor(color12); + Color get sc13 => getColor(color13); + Color get sc14 => getColor(color14); + Color get sc15 => getColor(color15); + Color get sc16 => getColor(color16); + Color get sc17 => getColor(color17); + Color get sc18 => getColor(color18); + Color get sc19 => getColor(color19); + Color get sc20 => getColor(color20); + Color get sc21 => getColor(color21); + Color get sc25 => getColor(color25); + Color get sc26 => getColor(color26); + Color get sc27 => getColor(color27); + Color get sc28 => getColor(color28); + Color get sc29 => getColor(color29); + Color get sc30 => getColor(color30); + Color get sc31 => getColor(color31); + Color get sc32 => getColor(color32); + Color get sc33 => getColor(color33); + Color get sc34 => getColor(color34); + Color get sc38 => getColor(color38); + Color get sc39 => getColor(color39); + Color get sc40 => getColor(color40); + + Color getColor(String color) { + color = color.replaceAll("#", ""); + + if (color.length == 6) { + color = "0xFF$color"; + } else { + color = "0x$color"; + } + + return Color(int.parse(color)); + } + + //序列化反序列化 + factory CustomThemeColor.fromJson(Map json) => + CustomThemeColor( + color1: json['color1'], + color2: json['color2'], + color3: json['color3'], + color4: json['color4'], + color5: json['color5'], + color6: json['color6'], + color7: json['color7'], + color8: json['color8'], + color9: json['color9'], + color10: json['color10'], + color11: json['color11'], + color12: json['color12'], + color13: json['color13'], + color14: json['color14'], + color15: json['color15'], + color16: json['color16'], + color17: json['color17'], + color18: json['color18'], + color19: json['color19'], + color20: json['color20'], + color21: json['color21'], + color25: json['color25'], + color26: json['color26'], + color27: json['color27'], + color28: json['color28'], + color29: json['color29'], + color30: json['color30'], + color31: json['color31'], + color32: json['color32'], + color33: json['color33'], + color34: json['color34'], + color38: json['color38'], + color39: json['color39'], + color40: json['color40']); + + Map toJson() => { + 'color1': color1, + 'color2': color2, + 'color3': color3, + 'color4': color4, + 'color5': color5, + 'color6': color6, + 'color7': color7, + 'color8': color8, + 'color9': color9, + 'color10': color10, + 'color11': color11, + 'color12': color12, + 'color13': color13, + 'color14': color14, + 'color15': color15, + 'color16': color16, + 'color17': color17, + 'color18': color18, + 'color19': color19, + 'color20': color20, + 'color21': color21, + 'color25': color25, + 'color26': color26, + 'color27': color27, + 'color28': color28, + 'color29': color29, + 'color30': color30, + 'color31': color31, + 'color32': color32, + 'color33': color33, + 'color34': color34, + 'color38': color38, + 'color39': color39, + 'color40': color40, + }; +} diff --git a/lib/model/api_response.dart b/lib/model/api_response.dart new file mode 100644 index 0000000..1950041 --- /dev/null +++ b/lib/model/api_response.dart @@ -0,0 +1,17 @@ + + +class ApiResponse { + int? code; + T? data; + String? msg; + + ApiResponse({required this.code, this.data, this.msg}); + factory ApiResponse.fromJson( + Map json, T Function(Object?) fromJsonT) { + return ApiResponse( + code: json['code'] as int, + data: json['data'] != null ? fromJsonT(json['data']) : null, + msg: json['msg'] as String?, + ); + } +} diff --git a/lib/model/device.dart b/lib/model/device.dart new file mode 100644 index 0000000..a35f170 --- /dev/null +++ b/lib/model/device.dart @@ -0,0 +1,22 @@ +import 'package:json_annotation/json_annotation.dart'; + +import 'device_share.dart'; + +part 'device.g.dart'; + +@JsonSerializable() +class DeviceModel { + String? name; //设备名称 + String? id; //设备id + String? status; //设备状态 + String? roomName; //设备所属房间 + String? shareNum; //设备已分享数量 + + @JsonKey(ignore: true) + List shareInfo = []; //设备分享信息 + + DeviceModel(); + static DeviceModel fromJson(Map json) => + _$DeviceModelFromJson(json); + Map toJson() => _$DeviceModelToJson(this); +} diff --git a/lib/model/device.g.dart b/lib/model/device.g.dart new file mode 100644 index 0000000..a1cb4ec --- /dev/null +++ b/lib/model/device.g.dart @@ -0,0 +1,23 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'device.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +DeviceModel _$DeviceModelFromJson(Map json) => DeviceModel() + ..name = json['name'] as String? + ..id = json['id'] as String? + ..status = json['status'] as String? + ..roomName = json['roomName'] as String? + ..shareNum = json['shareNum'] as String?; + +Map _$DeviceModelToJson(DeviceModel instance) => + { + 'name': instance.name, + 'id': instance.id, + 'status': instance.status, + 'roomName': instance.roomName, + 'shareNum': instance.shareNum, + }; diff --git a/lib/model/device_share.dart b/lib/model/device_share.dart new file mode 100644 index 0000000..0dcf329 --- /dev/null +++ b/lib/model/device_share.dart @@ -0,0 +1,15 @@ +import 'package:json_annotation/json_annotation.dart'; + +part 'device_share.g.dart'; + +@JsonSerializable() +class DeviceShareModel { + String? name; //设备名称 + String? phone; //被分享手机号 + DateTime? share_time; //分享时间 + + DeviceShareModel(); + static DeviceShareModel fromJson(Map json) => + _$DeviceShareModelFromJson(json); + Map toJson() => _$DeviceShareModelToJson(this); +} diff --git a/lib/model/device_share.g.dart b/lib/model/device_share.g.dart new file mode 100644 index 0000000..0cde0f9 --- /dev/null +++ b/lib/model/device_share.g.dart @@ -0,0 +1,22 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'device_share.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +DeviceShareModel _$DeviceShareModelFromJson(Map json) => + DeviceShareModel() + ..name = json['name'] as String? + ..phone = json['phone'] as String? + ..share_time = json['share_time'] == null + ? null + : DateTime.parse(json['share_time'] as String); + +Map _$DeviceShareModelToJson(DeviceShareModel instance) => + { + 'name': instance.name, + 'phone': instance.phone, + 'share_time': instance.share_time?.toIso8601String(), + }; diff --git a/lib/model/experience_store.dart b/lib/model/experience_store.dart new file mode 100644 index 0000000..a2d5dc1 --- /dev/null +++ b/lib/model/experience_store.dart @@ -0,0 +1,19 @@ +import 'package:json_annotation/json_annotation.dart'; + +part 'experience_store.g.dart'; + + +//体验店 +@JsonSerializable() +class ExperienceStoreModel { + String? name; //设备名称 + String? phone; //店铺电话 + String? address; //店铺地址 + + + + ExperienceStoreModel(); + static ExperienceStoreModel fromJson(Map json) => + _$ExperienceStoreModelFromJson(json); + Map toJson() => _$ExperienceStoreModelToJson(this); +} diff --git a/lib/model/experience_store.g.dart b/lib/model/experience_store.g.dart new file mode 100644 index 0000000..4a19aec --- /dev/null +++ b/lib/model/experience_store.g.dart @@ -0,0 +1,22 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'experience_store.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +ExperienceStoreModel _$ExperienceStoreModelFromJson( + Map json) => + ExperienceStoreModel() + ..name = json['name'] as String? + ..phone = json['phone'] as String? + ..address = json['address'] as String?; + +Map _$ExperienceStoreModelToJson( + ExperienceStoreModel instance) => + { + 'name': instance.name, + 'phone': instance.phone, + 'address': instance.address, + }; diff --git a/lib/model/issue.dart b/lib/model/issue.dart new file mode 100644 index 0000000..a3a2c16 --- /dev/null +++ b/lib/model/issue.dart @@ -0,0 +1,14 @@ +import 'package:json_annotation/json_annotation.dart'; + +part 'issue.g.dart'; + +@JsonSerializable() +class IssueModel { + String? title; + String? title_content; + + IssueModel(); + static IssueModel fromJson(Map json) => + _$IssueModelFromJson(json); + Map toJson() => _$IssueModelToJson(this); +} diff --git a/lib/model/issue.g.dart b/lib/model/issue.g.dart new file mode 100644 index 0000000..b042e26 --- /dev/null +++ b/lib/model/issue.g.dart @@ -0,0 +1,17 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'issue.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +IssueModel _$IssueModelFromJson(Map json) => IssueModel() + ..title = json['title'] as String? + ..title_content = json['title_content'] as String?; + +Map _$IssueModelToJson(IssueModel instance) => + { + 'title': instance.title, + 'title_content': instance.title_content, + }; diff --git a/lib/model/message.dart b/lib/model/message.dart new file mode 100644 index 0000000..0ae1492 --- /dev/null +++ b/lib/model/message.dart @@ -0,0 +1,19 @@ +import 'package:json_annotation/json_annotation.dart'; + +part 'message.g.dart'; + +@JsonSerializable() +class MessageModel { + String? title;//消息名称 + String? did;//消息设备id + String? userId;//消息用户id + String? userName;//消息用户名称 + DateTime? createTime;//消息创建时间 + int? type;//消息类型 + + + MessageModel(); + static MessageModel fromJson(Map json) => + _$MessageModelFromJson(json); + Map toJson() => _$MessageModelToJson(this); +} diff --git a/lib/model/message.g.dart b/lib/model/message.g.dart new file mode 100644 index 0000000..3702bf1 --- /dev/null +++ b/lib/model/message.g.dart @@ -0,0 +1,27 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'message.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +MessageModel _$MessageModelFromJson(Map json) => MessageModel() + ..title = json['title'] as String? + ..did = json['did'] as String? + ..userId = json['userId'] as String? + ..userName = json['userName'] as String? + ..createTime = json['createTime'] == null + ? null + : DateTime.parse(json['createTime'] as String) + ..type = (json['type'] as num?)?.toInt(); + +Map _$MessageModelToJson(MessageModel instance) => + { + 'title': instance.title, + 'did': instance.did, + 'userId': instance.userId, + 'userName': instance.userName, + 'createTime': instance.createTime?.toIso8601String(), + 'type': instance.type, + }; diff --git a/lib/model/order.dart b/lib/model/order.dart new file mode 100644 index 0000000..318ee30 --- /dev/null +++ b/lib/model/order.dart @@ -0,0 +1,32 @@ +import 'package:json_annotation/json_annotation.dart'; + +part 'order.g.dart'; + +@JsonSerializable() +class OrderModel { + String? goods_name; //商品名称 + String? goods_id; //商品id + String? id; //订单id + double? price; //支付金额 + String? tel; //电话号码 + String? addition_address; //详细地址 + // DateTime? create_time; //创建时间 + int? create_time; //创建时间 + String? desc; //审核意见 + String? create_user_id; //下单用户id + String? create_user_name; //下单用户名称 + int? order_status; //订单状态 + String? delivery_status; //物流状态 + int? order_num; //商品数量 + String? province; //省份 + String? city; //城市 + String? county; //区域 + String? street; //街道 + double? goods_price; //商品单价 + String? pay_status; //支付状态 + + OrderModel(); + static OrderModel fromJson(Map json) => + _$OrderModelFromJson(json); + Map toJson() => _$OrderModelToJson(this); +} diff --git a/lib/model/order.g.dart b/lib/model/order.g.dart new file mode 100644 index 0000000..028bb56 --- /dev/null +++ b/lib/model/order.g.dart @@ -0,0 +1,51 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'order.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +OrderModel _$OrderModelFromJson(Map json) => OrderModel() + ..goods_name = json['goods_name'] as String? + ..goods_id = json['goods_id'] as String? + ..id = json['id'] as String? + ..price = (json['price'] as num?)?.toDouble() + ..tel = json['tel'] as String? + ..addition_address = json['addition_address'] as String? + ..create_time = (json['create_time'] as num?)?.toInt() + ..desc = json['desc'] as String? + ..create_user_id = json['create_user_id'] as String? + ..create_user_name = json['create_user_name'] as String? + ..order_status = (json['order_status'] as num?)?.toInt() + ..delivery_status = json['delivery_status'] as String? + ..order_num = (json['order_num'] as num?)?.toInt() + ..province = json['province'] as String? + ..city = json['city'] as String? + ..county = json['county'] as String? + ..street = json['street'] as String? + ..goods_price = (json['goods_price'] as num?)?.toDouble() + ..pay_status = json['pay_status'] as String?; + +Map _$OrderModelToJson(OrderModel instance) => + { + 'goods_name': instance.goods_name, + 'goods_id': instance.goods_id, + 'id': instance.id, + 'price': instance.price, + 'tel': instance.tel, + 'addition_address': instance.addition_address, + 'create_time': instance.create_time, + 'desc': instance.desc, + 'create_user_id': instance.create_user_id, + 'create_user_name': instance.create_user_name, + 'order_status': instance.order_status, + 'delivery_status': instance.delivery_status, + 'order_num': instance.order_num, + 'province': instance.province, + 'city': instance.city, + 'county': instance.county, + 'street': instance.street, + 'goods_price': instance.goods_price, + 'pay_status': instance.pay_status, + }; diff --git a/lib/model/repair_process.dart b/lib/model/repair_process.dart new file mode 100644 index 0000000..de3e16d --- /dev/null +++ b/lib/model/repair_process.dart @@ -0,0 +1,18 @@ +import 'package:json_annotation/json_annotation.dart'; + +part 'repair_process.g.dart'; + +@JsonSerializable() +class RepairProcessModel { + String? status; //审核状态 + DateTime? create_time; //审核时间 + String? desc; //审核意见 + int? record_id; //归属记录 + + int? deal_user; //处理人 + + RepairProcessModel(); + static RepairProcessModel fromJson(Map json) => + _$RepairProcessModelFromJson(json); + Map toJson() => _$RepairProcessModelToJson(this); +} diff --git a/lib/model/repair_process.g.dart b/lib/model/repair_process.g.dart new file mode 100644 index 0000000..d55573e --- /dev/null +++ b/lib/model/repair_process.g.dart @@ -0,0 +1,26 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'repair_process.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +RepairProcessModel _$RepairProcessModelFromJson(Map json) => + RepairProcessModel() + ..status = json['status'] as String? + ..create_time = json['create_time'] == null + ? null + : DateTime.parse(json['create_time'] as String) + ..desc = json['desc'] as String? + ..record_id = (json['record_id'] as num?)?.toInt() + ..deal_user = (json['deal_user'] as num?)?.toInt(); + +Map _$RepairProcessModelToJson(RepairProcessModel instance) => + { + 'status': instance.status, + 'create_time': instance.create_time?.toIso8601String(), + 'desc': instance.desc, + 'record_id': instance.record_id, + 'deal_user': instance.deal_user, + }; diff --git a/lib/model/user_data.dart b/lib/model/user_data.dart new file mode 100644 index 0000000..7c4280a --- /dev/null +++ b/lib/model/user_data.dart @@ -0,0 +1,20 @@ +import 'package:json_annotation/json_annotation.dart'; + +part 'user_data.g.dart'; + +@JsonSerializable() +class UserModel { + String? uid; + String? userName; + String? nickName; + String? tel; + String? exp1; + String? head; + String? tmpHead; + String? tmpNickName; + + UserModel(); + static UserModel fromJson(Map json) => + _$UserModelFromJson(json); + Map toJson() => _$UserModelToJson(this); +} diff --git a/lib/model/user_data.g.dart b/lib/model/user_data.g.dart new file mode 100644 index 0000000..40d6732 --- /dev/null +++ b/lib/model/user_data.g.dart @@ -0,0 +1,28 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'user_data.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +UserModel _$UserModelFromJson(Map json) => UserModel() + ..uid = json['uid'] as String? + ..userName = json['userName'] as String? + ..nickName = json['nickName'] as String? + ..tel = json['tel'] as String? + ..exp1 = json['exp1'] as String? + ..head = json['head'] as String? + ..tmpHead = json['tmpHead'] as String? + ..tmpNickName = json['tmpNickName'] as String?; + +Map _$UserModelToJson(UserModel instance) => { + 'uid': instance.uid, + 'userName': instance.userName, + 'nickName': instance.nickName, + 'tel': instance.tel, + 'exp1': instance.exp1, + 'head': instance.head, + 'tmpHead': instance.tmpHead, + 'tmpNickName': instance.tmpNickName, + }; diff --git a/lib/pages/device_bind/device_type.dart b/lib/pages/device_bind/device_type.dart new file mode 100644 index 0000000..d2b1bb4 --- /dev/null +++ b/lib/pages/device_bind/device_type.dart @@ -0,0 +1,366 @@ +import 'package:ef/ef.dart'; +import 'package:flutter/material.dart'; +import 'package:flutterflow_ui/flutterflow_ui.dart'; +import 'package:vbvs_app/common/color/appConstants.dart'; +import 'package:vbvs_app/common/util/FitTool.dart'; +import 'package:vbvs_app/common/util/MyUtils.dart'; +import 'package:vbvs_app/component/tool/CustomCard.dart'; +import 'package:vbvs_app/controller/device/blueteeth_bind_controller.dart'; +import 'package:vbvs_app/controller/main_bottom/global_controller.dart'; +import 'package:vbvs_app/controller/user_info_controller.dart'; + +class DeviceTypePage extends StatefulWidget { + const DeviceTypePage({super.key}); + + @override + State createState() => _EPageState(); +} + +class _EPageState extends State { + GlobalController globalController = Get.find(); + UserInfoController userInfoController = Get.find(); + BlueteethBindController blueteethBindController = Get.find(); + + @override + void initState() { + super.initState(); + // 延迟到 build 完成后执行弹窗逻辑 + WidgetsBinding.instance.addPostFrameCallback((_) { + if (blueteethBindController.model.read == 1) { + showDialog( + context: context, + barrierDismissible: false, + builder: (BuildContext context) { + return Dialog( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(20.0), + ), + backgroundColor: Colors.transparent, + child: Padding( + padding: EdgeInsetsDirectional.fromSTEB(30.rpx, 0, 30.rpx, 0), + child: Container( + width: double.infinity, + constraints: BoxConstraints( + maxHeight: MediaQuery.sizeOf(context).height * 0.656, + ), + child: Column( + mainAxisSize: MainAxisSize.max, + children: [ + Expanded( + child: Container( + width: double.infinity, + child: SingleChildScrollView( + child: Column( + mainAxisSize: MainAxisSize.max, + children: [ + Padding( + padding: EdgeInsetsDirectional.fromSTEB( + 0, 26.rpx, 0, 0), + child: Container( + width: MediaQuery.sizeOf(context).width, + decoration: BoxDecoration( + color: Color(0xFFFBF5D5), + borderRadius: BorderRadius.circular( + AppConstants() + .normal_container_radius), // 圆角半径 + ), + child: Padding( + padding: EdgeInsetsDirectional.fromSTEB( + 25.rpx, 25.rpx, 25.rpx, 25.rpx), + child: Row( + mainAxisSize: MainAxisSize.max, + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Icon( + Icons.volume_mute, + color: + FlutterFlowTheme.of(context) + .primaryText, + size: 30.rpx, + ), + Expanded( + child: Column( + mainAxisSize: MainAxisSize.max, + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Text( + '绑定引导.说明标题'.tr, + style: FlutterFlowTheme.of( + context) + .bodyMedium + .override( + fontFamily: 'Inter', + fontSize: AppConstants() + .normal_text_fontSize, + letterSpacing: 0.0, + fontWeight: + FontWeight.w500, + color: + Colors.orange), + ), + Text( + '绑定引导.说明正文'.tr, + style: FlutterFlowTheme.of( + context) + .bodyMedium + .override( + fontFamily: 'Inter', + fontSize: AppConstants() + .normal_text_fontSize, + letterSpacing: 0.0, + ), + ), + ].divide(SizedBox( + height: AppConstants() + .text_padding_up_dowm_p)), + ), + ), + ].divide(SizedBox(width: 20.rpx)), + ), + ), + ), + ), + Container( + width: double.infinity, + height: MediaQuery.sizeOf(context).height * + 0.26, + constraints: BoxConstraints( + minHeight: 421.rpx, + ), + child: ClipRRect( + borderRadius: + BorderRadius.circular(20.rpx), + child: Image.network( + 'https://picsum.photos/seed/861/600', + fit: BoxFit.cover, + ), + ), + ), + ].divide(SizedBox(height: 25.rpx)), + ), + ), + ), + ), + Flexible( + child: Padding( + padding: EdgeInsetsDirectional.fromSTEB( + 0, 210.rpx, 0, 0), + child: Container( + width: double.infinity, + child: Column( + mainAxisSize: MainAxisSize.max, + children: [ + Container( + width: double.infinity, + child: Row( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: + MainAxisAlignment.center, + children: [ + Icon( + Icons.arrow_back, + color: FlutterFlowTheme.of(context) + .primaryText, + size: 24.rpx, + ), + Text( + '绑定引导.不再提示'.tr, + style: FlutterFlowTheme.of(context) + .bodyMedium + .override( + fontFamily: 'Inter', + fontSize: 26.rpx, + letterSpacing: 0.0, + color: Colors.white), + ), + ].divide(SizedBox(width: 22.rpx)), + ), + ), + CustomCard( + borderRadius: 50.rpx, + onTap: () async { + await Future.delayed( + Duration(seconds: 1)); + Get.back(); // 关闭当前弹窗或页面 + }, + colors: [ + Colors.yellow, + Colors.green + ], // 单色背景也用渐变写法 + title: '', + child: Container( + width: MediaQuery.sizeOf(context).width * + 0.66, + height: + MediaQuery.sizeOf(context).height * + 0.055, + constraints: BoxConstraints( + minWidth: 500.rpx, + minHeight: 90.rpx, + ), + alignment: Alignment.center, // 居中对齐 + child: Text( + '绑定引导.跳过'.tr, + style: FlutterFlowTheme.of(context) + .bodyMedium + .override( + fontFamily: 'Inter', + fontSize: 26.rpx, + letterSpacing: 0.0, + ), + ), + ), + ) + ].divide(SizedBox(height: 42.rpx)), + ), + ), + ), + ), + ], + ), + ), + )); + }, + ); + } + }); + } + + @override + Widget build(BuildContext context) { + int read = blueteethBindController.model.read; + if (blueteethBindController.model.read == 1) { + //需要弹窗显示教程 + } + return LayoutBuilder( + builder: (context, bodySize) => GestureDetector( + onTap: () => FocusScope.of(context).unfocus(), + child: Container( + decoration: BoxDecoration( + image: DecorationImage( + image: AssetImage('assets/img/bgNoImg.png'), // 本地图片 + fit: BoxFit.fill, // 填满整个 Container + ), + ), + child: Scaffold( + backgroundColor: Colors.transparent, // 加上这一行 + appBar: AppBar( + backgroundColor: stringToColor("#242835"), + // backgroundColor: Colors.transparent, + automaticallyImplyLeading: false, + // iconTheme: IconThemeData(color: Colors.white), + titleSpacing: 0, + // leading: returnIconButtom, + title: Container( + // color: Colors.grey, + width: double.infinity, + height: 180.rpx, + child: Stack( + alignment: Alignment.center, + children: [ + /// 居中标题 + Text( + '设备列表', + style: FlutterFlowTheme.of(context).bodyMedium.override( + fontFamily: 'Readex Pro', + color: Colors.white, + letterSpacing: 0, + fontSize: 30.rpx, + ), + ), + + /// 左边返回按钮 + Positioned( + left: 0, + child: returnIconButtom, + ), + ], + ), + ), + + actions: [], + centerTitle: false, + ), + body: SafeArea( + top: true, + child: Padding( + padding: EdgeInsetsDirectional.fromSTEB(30.rpx, 0, 30.rpx, 0), + child: SingleChildScrollView( + child: Column( + mainAxisSize: MainAxisSize.max, + children: [ + _buildDeviceCard( + context, + title: '设备类型.体征监测设备'.tr, + imageUrl: 'assets/img/device.png', + ), + _buildDeviceCard( + context, + title: '设备类型.智能床/床垫'.tr, + imageUrl: 'assets/img/bed.png', + ), + _buildDeviceCard( + context, + title: '设备类型.摄像头'.tr, + imageUrl: 'assets/img/camera.png', + ), + ] + .divide(SizedBox(height: 26.rpx)) + .addToStart(SizedBox(height: 26.rpx)) + .addToEnd(SizedBox(height: 26.rpx)), + ), + ), + ), + ), + ), + ), + ), + ); + } + + Widget _buildDeviceCard(BuildContext context, + {required String title, required String imageUrl}) { + return CustomCard( + borderRadius: 20.rpx, // 圆角大小 + onTap: () { + print('点击了 $title'); + }, + // colors: [Colors.white.withOpacity(0.06)], // 背景色 + colors: [stringToColor("45D989"), stringToColor("00C1AA")], // 背景色 + title: title, + child: Container( + width: double.infinity, + height: MediaQuery.sizeOf(context).height * 0.135, + constraints: BoxConstraints( + minHeight: 220.rpx, + ), + padding: EdgeInsetsDirectional.fromSTEB(77.rpx, 0, 21.rpx, 0), + child: Row( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + title, + style: FlutterFlowTheme.of(context).bodyMedium.override( + fontFamily: 'Inter', + color: const Color(0xFFC2CED7), + fontSize: 30.rpx, + letterSpacing: 0.0, + ), + ), + ClipRRect( + borderRadius: BorderRadius.circular(8.rpx), + child: Image.asset( + imageUrl, + width: 212.rpx, + height: 168.rpx, + ), + ), + ], + ), + ), + ); + } +} diff --git a/lib/pages/login/login.dart b/lib/pages/login/login.dart new file mode 100644 index 0000000..badec00 --- /dev/null +++ b/lib/pages/login/login.dart @@ -0,0 +1,276 @@ +import 'package:ef/ef.dart'; +import 'package:flutter/material.dart'; +import 'package:flutterflow_ui/flutterflow_ui.dart'; +import 'package:vbvs_app/common/util/FitTool.dart'; +import 'package:vbvs_app/controller/main_bottom/global_controller.dart'; +import 'package:vbvs_app/controller/user_info_controller.dart'; + +class LoginPage extends StatefulWidget { + const LoginPage({super.key}); + + @override + State createState() => _EPageState(); +} + +class _EPageState extends State { + GlobalController globalController = Get.find(); + UserInfoController userInfoController = Get.find(); + + @override + Widget build(BuildContext context) { + return LayoutBuilder( + builder: (context, boxConstraints) => GestureDetector( + onTap: () => FocusScope.of(context).unfocus(), + child: Scaffold( + body: SafeArea( + top: true, + child: Column( + mainAxisSize: MainAxisSize.max, + children: [ + Expanded( + child: SingleChildScrollView( + child: Column( + mainAxisSize: MainAxisSize.max, + children: [ + Container( + width: double.infinity, + decoration: BoxDecoration(), + child: Align( + alignment: AlignmentDirectional(-1, 0), + child: Padding( + padding: EdgeInsetsDirectional.fromSTEB( + 35.rpx, 66.rpx, 0, 0), + child: Icon( + Icons.arrow_back, + color: FlutterFlowTheme.of(context).primaryText, + size: 24.rpx, + ), + ), + ), + ), + Align( + alignment: AlignmentDirectional(-1, 0), + child: Padding( + padding: EdgeInsetsDirectional.fromSTEB( + 0, 141.rpx, 0, 0), + child: Container( + width: double.infinity, + decoration: BoxDecoration(), + child: Align( + alignment: AlignmentDirectional(0, 0), + child: Text( + '欢迎使用太和e护', + style: FlutterFlowTheme.of(context) + .bodyMedium + .override( + fontFamily: 'Inter', + fontSize: 48.rpx, + letterSpacing: 0.0, + ), + ), + ), + ), + ), + ), + Align( + alignment: AlignmentDirectional(-1, 0), + child: Padding( + padding: + EdgeInsetsDirectional.fromSTEB(0, 15.rpx, 0, 0), + child: Container( + width: double.infinity, + decoration: BoxDecoration(), + child: Align( + alignment: AlignmentDirectional(0, 0), + child: Text( + '科技睡眠 洞悉万千', + style: FlutterFlowTheme.of(context) + .bodyMedium + .override( + fontFamily: 'Inter', + fontSize: 30.rpx, + letterSpacing: 0.0, + ), + ), + ), + ), + ), + ), + Align( + alignment: AlignmentDirectional(-1, 0), + child: Padding( + padding: + EdgeInsetsDirectional.fromSTEB(0, 95.rpx, 0, 0), + child: Container( + width: double.infinity, + decoration: BoxDecoration(), + child: Align( + alignment: AlignmentDirectional(0, 0), + child: Text( + '139****0733', + style: FlutterFlowTheme.of(context) + .bodyMedium + .override( + fontFamily: 'Inter', + fontSize: 48.rpx, + letterSpacing: 0.0, + ), + ), + ), + ), + ), + ), + Padding( + padding: + EdgeInsetsDirectional.fromSTEB(0, 35.rpx, 0, 0), + child: Container( + width: MediaQuery.sizeOf(context).width * 0.8, + height: MediaQuery.sizeOf(context).height * 0.055, + constraints: BoxConstraints( + minWidth: 500.rpx, + minHeight: 90.rpx, + ), + decoration: BoxDecoration( + color: Color(0xFFF01515), + borderRadius: BorderRadius.circular(50.rpx), + ), + child: Align( + alignment: AlignmentDirectional(0, 0), + child: Text( + '本机号码一键登录/注册', + style: FlutterFlowTheme.of(context) + .bodyMedium + .override( + fontFamily: 'Inter', + fontSize: 26.rpx, + letterSpacing: 0.0, + ), + ), + ), + ), + ), + Align( + alignment: AlignmentDirectional(-1, 0), + child: Padding( + padding: + EdgeInsetsDirectional.fromSTEB(0, 32.rpx, 0, 0), + child: Container( + width: double.infinity, + decoration: BoxDecoration(), + child: Align( + alignment: AlignmentDirectional(0, 0), + child: Text( + '其他手机号码', + style: FlutterFlowTheme.of(context) + .bodyMedium + .override( + fontFamily: 'Inter', + fontSize: 26.rpx, + letterSpacing: 0.0, + ), + ), + ), + ), + ), + ), + Padding( + padding: EdgeInsetsDirectional.fromSTEB( + 110.rpx, 136.rpx, 110.rpx, 0), + child: Container( + width: double.infinity, + decoration: BoxDecoration(), + child: Row( + mainAxisSize: MainAxisSize.max, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Icon( + Icons.arrow_back, + color: + FlutterFlowTheme.of(context).primaryText, + size: 24.rpx, + ), + Expanded( + // 👈 让文本自动换行 + child: Text( + '登录时将自动注册,且代表您同意《用户协议》和 《隐私政策》以及《用户使用条款》', + style: FlutterFlowTheme.of(context) + .bodyMedium + .override( + fontFamily: 'Inter', + letterSpacing: 0.0, + fontSize: 24.rpx, // 可选:字体稍小点更适配 + ), + ), + ), + ].divide(SizedBox(width: 26.rpx)), + ), + ), + ), + ], + ), + ), + ), + Container( + width: double.infinity, + height: MediaQuery.sizeOf(context).height * 0.136, + constraints: BoxConstraints( + minHeight: 220.rpx, + ), + decoration: BoxDecoration(), + child: Column( + mainAxisSize: MainAxisSize.max, + children: [ + Padding( + padding: + EdgeInsetsDirectional.fromSTEB(0, 0, 0, 36.rpx), + child: Text( + '其他登录方式', + style: + FlutterFlowTheme.of(context).bodyMedium.override( + fontFamily: 'Inter', + fontSize: 26.rpx, + letterSpacing: 0.0, + ), + ), + ), + Row( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Container( + width: 91.rpx, + height: 91.rpx, + clipBehavior: Clip.antiAlias, + decoration: BoxDecoration( + shape: BoxShape.circle, + ), + child: Image.network( + 'https://picsum.photos/seed/301/600', + fit: BoxFit.cover, + ), + ), + Container( + width: 91.rpx, + height: 91.rpx, + clipBehavior: Clip.antiAlias, + decoration: BoxDecoration( + shape: BoxShape.circle, + ), + child: Image.network( + 'https://picsum.photos/seed/301/600', + fit: BoxFit.cover, + ), + ), + ].divide(SizedBox(width: 35.rpx)), + ), + ], + ), + ), + ], + ), + ), + ), + ), + ); + } +} diff --git a/lib/pages/main_bottom/e_page.dart b/lib/pages/main_bottom/e_page.dart new file mode 100644 index 0000000..73da0b6 --- /dev/null +++ b/lib/pages/main_bottom/e_page.dart @@ -0,0 +1,85 @@ +import 'package:ef/ef.dart'; +import 'package:flutter/material.dart'; +import 'package:vbvs_app/controller/main_bottom/global_controller.dart'; +import 'package:vbvs_app/controller/user_info_controller.dart'; + +class EPage extends StatefulWidget { + const EPage({super.key}); + + @override + State createState() => _EPageState(); +} + +class _EPageState extends State { + GlobalController globalController = Get.find(); + UserInfoController userInfoController = Get.find(); + @override + Widget build(BuildContext context) { + return LayoutBuilder( + builder: (context, boxConstraints) => GestureDetector( + onTap: () => FocusScope.of(context).unfocus(), + child: Scaffold( + // appBar: AppBar( + // backgroundColor: AppColors.bg_color, + // automaticallyImplyLeading: false, + // title: Container( + // width: double.infinity, + // height: 70.rpx, + // child: Obx( + // () => InkWell( + // onTap: () { + // Get.toNamed("/editUserInfoPage"); + // }, + // child: Row( + // mainAxisSize: MainAxisSize.max, + // mainAxisAlignment: MainAxisAlignment.spaceBetween, + // children: [ + // Row( + // mainAxisSize: MainAxisSize.max, + // children: [ + // Container( + // width: 56.rpx, + // height: 56.rpx, + // clipBehavior: Clip.antiAlias, + // decoration: BoxDecoration( + // shape: BoxShape.circle, + // ), + // ), + // Container( + // width: 20.rpx, + // height: 0, + // decoration: BoxDecoration( + // color: Colors.white, + // shape: BoxShape.rectangle, + // ), + // ), + // Text( + // userInfoController.model.user!.nickName ?? '匿名', + // style: FlutterFlowTheme.of(context) + // .bodyMedium + // .override( + // fontFamily: 'Readex Pro', + // color: Colors.white, + // letterSpacing: 0, + // fontSize: 30.rpx), + // ), + // ], + // ), + // ], + // ), + // ), + // ), + // ), + // actions: [], + // centerTitle: false, + // ), + + body: SafeArea( + top: true, + child: Text("小e"), + ), + ), + ), + ); + } +} diff --git a/lib/pages/main_bottom/home_page.dart b/lib/pages/main_bottom/home_page.dart new file mode 100644 index 0000000..14f5939 --- /dev/null +++ b/lib/pages/main_bottom/home_page.dart @@ -0,0 +1,396 @@ +import 'package:ef/ef.dart'; +import 'package:flutter/material.dart'; +import 'package:flutterflow_ui/flutterflow_ui.dart'; +import 'package:vbvs_app/common/color/appConstants.dart'; +import 'package:vbvs_app/common/util/FitTool.dart'; +import 'package:vbvs_app/common/util/MyUtils.dart'; +import 'package:vbvs_app/component/tool/CustomCard.dart'; +import 'package:vbvs_app/controller/main_bottom/global_controller.dart'; +import 'package:vbvs_app/controller/theme_controller/ThemeController.dart'; +import 'package:vbvs_app/controller/user_info_controller.dart'; + +class HomePage extends StatefulWidget { + const HomePage({super.key}); + + @override + State createState() => _HomePageState(); +} + +class _HomePageState extends State { + GlobalController globalController = Get.find(); + UserInfoController userInfoController = Get.find(); + ThemeController themeController = Get.find(); + @override + Widget build(BuildContext context) { + return LayoutBuilder( + builder: (context, bodySize) => GestureDetector( + onTap: () => FocusScope.of(context).unfocus(), + child: Scaffold( + // appBar: AppBar( + // backgroundColor: AppColors.bg_color, + // automaticallyImplyLeading: false, + // title: Container( + // width: double.infinity, + // height: 70.rpx, + // child: Obx( + // () => InkWell( + // onTap: () { + // Get.toNamed("/editUserInfoPage"); + // }, + // child: Row( + // mainAxisSize: MainAxisSize.max, + // mainAxisAlignment: MainAxisAlignment.spaceBetween, + // children: [ + // Row( + // mainAxisSize: MainAxisSize.max, + // children: [ + // Container( + // width: 56.rpx, + // height: 56.rpx, + // clipBehavior: Clip.antiAlias, + // decoration: BoxDecoration( + // shape: BoxShape.circle, + // ), + // ), + // Container( + // width: 20.rpx, + // height: 0, + // decoration: BoxDecoration( + // color: Colors.white, + // shape: BoxShape.rectangle, + // ), + // ), + // Text( + // userInfoController.model.user!.nickName ?? '匿名', + // style: FlutterFlowTheme.of(context) + // .bodyMedium + // .override( + // fontFamily: 'Readex Pro', + // color: Colors.white, + // letterSpacing: 0, + // fontSize: 30.rpx), + // ), + // ], + // ), + // ], + // ), + // ), + // ), + // ), + // actions: [], + // centerTitle: false, + // ), + body: SafeArea( + top: true, + // child: Text("首页"), + child: Container( + height: bodySize.maxHeight, + decoration: BoxDecoration( + image: DecorationImage( + image: AssetImage('assets/img/bgImage.png'), // 本地图片 + fit: BoxFit.fill, // 填满整个 Container + ), + ), + child: Padding( + padding: EdgeInsetsDirectional.fromSTEB( + AppConstants().main_left_right_padding, + 47.rpx, + AppConstants().main_left_right_padding, + 0), + child: SingleChildScrollView( + child: Column( + mainAxisSize: MainAxisSize.max, + children: [ + Padding( + padding: EdgeInsetsDirectional.fromSTEB( + AppConstants().content_left_right_padding, + 0, + AppConstants().content_left_right_padding, + 0), + child: Container( + width: double.infinity, + child: Row( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + CustomCard( + borderRadius: 20.rpx, + onTap: () async { + Get.toNamed("/loginPage"); + }, + title: '首页.登录' + .tr, // 虽然 title 传入了,但当前组件里没用它(可忽略或用于调试) + colors: [ + stringToColor("#45D989"), + stringToColor("#00C1AA"), + ], + child: Container( + width: 100.rpx, + height: 60.rpx, + alignment: Alignment.center, + padding: EdgeInsetsDirectional.fromSTEB( + 16.rpx, 0, 16.rpx, 0), + child: Text( + '首页.登录'.tr, + style: FlutterFlowTheme.of(context) + .titleSmall + .override( + fontFamily: 'Inter Tight', + color: Colors.white, + letterSpacing: 0.0, + ), + ), + ), + ), + + Icon( + Icons.add_circle_outline_outlined, + color: FlutterFlowTheme.of(context).primaryText, + size: 38.rpx, + ), + // Lottie.asset( + // 'assets/img/loading.json', + // width: 200, + // height: 200, + // fit: BoxFit.contain, + // ) + ], + ), + ), + ), + Padding( + padding: EdgeInsetsDirectional.fromSTEB( + 19.rpx, 13.rpx, 0, 13.rpx), + child: Container( + width: double.infinity, + child: Row( + children: [ + Text( + '首页.已关联体征监测设备'.tr, + style: FlutterFlowTheme.of(context) + .bodyMedium + .override( + fontFamily: 'Inter', + fontSize: + AppConstants().title_text_fontSize, + letterSpacing: 0.0, + ), + ), + Text( + ' 0', + style: FlutterFlowTheme.of(context) + .bodyMedium + .override( + fontFamily: 'Inter', + fontSize: + AppConstants().title_text_fontSize, + letterSpacing: 0.0, + ), + ), + ], + )), + ), + Container( + width: MediaQuery.sizeOf(context).width, + height: MediaQuery.sizeOf(context).height * 0.277, + constraints: BoxConstraints( + minWidth: 690.rpx, + minHeight: 450.rpx, + ), + decoration: BoxDecoration( + color: stringToColor("#242835"), + borderRadius: BorderRadius.circular( + AppConstants().normal_container_radius), // 圆角半径 + ), + child: Column( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Container( + width: MediaQuery.sizeOf(context).width * 0.66, + height: MediaQuery.sizeOf(context).height * 0.055, + constraints: BoxConstraints( + minWidth: 500.rpx, + minHeight: 90.rpx, + ), + decoration: BoxDecoration( + gradient: LinearGradient( + colors: [Colors.red, Colors.orange], // 渐变颜色数组 + begin: Alignment.topLeft, + end: Alignment.bottomRight, + ), + borderRadius: BorderRadius.circular( + AppConstants() + .button_container_radius), // 圆角半径 + ), + child: Row( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Icon( + Icons.arrow_back, + color: FlutterFlowTheme.of(context) + .primaryText, + size: 28.rpx, + ), + Text( + '首页.扫一扫绑定'.tr, + style: FlutterFlowTheme.of(context) + .bodyMedium + .override( + fontFamily: 'Inter', + fontSize: AppConstants() + .normal_text_fontSize, + letterSpacing: 0.0, + ), + ), + ].divide(SizedBox( + width: 17.rpx, + )), + ), + ), + CustomCard( + borderRadius: AppConstants() + .button_container_radius, // 圆角半径 + onTap: () { + print('Button pressed ...'); + Get.toNamed("/deviceType"); + }, + colors: [ + stringToColor("45D989"), + stringToColor("00C1AA") + ], // 渐变色是同一个色,也可以根据需要调整 + title: '首页.蓝牙绑定'.tr, // 可选,虽然这个 title 没用,但可以作为调试用 + child: Container( + width: MediaQuery.sizeOf(context).width * 0.66, + height: + MediaQuery.sizeOf(context).height * 0.055, + constraints: BoxConstraints( + minWidth: 500.rpx, + minHeight: 90.rpx, + ), + child: Row( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Icon( + Icons.arrow_back, + color: FlutterFlowTheme.of(context) + .primaryText, + size: 28.rpx, + ), + Text( + '首页.蓝牙绑定'.tr, + style: FlutterFlowTheme.of(context) + .bodyMedium + .override( + fontFamily: 'Inter', + fontSize: AppConstants() + .normal_text_fontSize, + letterSpacing: 0.0, + ), + ), + ].divide(SizedBox( + width: 17.rpx, + )), + ), + ), + ) + ], + ), + ), + Padding( + padding: + EdgeInsetsDirectional.fromSTEB(0, 26.rpx, 0, 0), + child: Container( + width: MediaQuery.sizeOf(context).width, + decoration: BoxDecoration( + color: Color(0xFFFBF5D5), + borderRadius: BorderRadius.circular( + AppConstants().normal_container_radius), // 圆角半径 + ), + child: Padding( + padding: EdgeInsetsDirectional.fromSTEB( + 25.rpx, 25.rpx, 25.rpx, 25.rpx), + child: Row( + mainAxisSize: MainAxisSize.max, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Icon( + Icons.volume_mute, + color: + FlutterFlowTheme.of(context).primaryText, + size: 30.rpx, + ), + Expanded( + child: Column( + mainAxisSize: MainAxisSize.max, + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Text( + '首页.提示标题'.tr, + style: FlutterFlowTheme.of(context) + .bodyMedium + .override( + fontFamily: 'Inter', + fontSize: AppConstants() + .normal_text_fontSize, + letterSpacing: 0.0, + fontWeight: FontWeight.w500, + color: Colors.orange), + ), + Text( + '首页.提示内容1'.tr, + style: FlutterFlowTheme.of(context) + .bodyMedium + .override( + fontFamily: 'Inter', + fontSize: AppConstants() + .normal_text_fontSize, + letterSpacing: 0.0, + ), + ), + Text( + '首页.提示内容2'.tr, + style: FlutterFlowTheme.of(context) + .bodyMedium + .override( + fontFamily: 'Inter', + fontSize: AppConstants() + .normal_text_fontSize, + letterSpacing: 0.0, + ), + ), + Text( + '首页.提示内容3'.tr, + style: FlutterFlowTheme.of(context) + .bodyMedium + .override( + fontFamily: 'Inter', + fontSize: AppConstants() + .normal_text_fontSize, + letterSpacing: 0.0, + ), + ), + ].divide(SizedBox( + height: AppConstants() + .text_padding_up_dowm_p)), + ), + ) + ].divide(SizedBox(width: 20.rpx)), + ), + ), + ), + ), + ], + ), + ), + ), + ), + ), + ), + ), + ); + } +} diff --git a/lib/pages/main_bottom/main_page_bottom_change.dart b/lib/pages/main_bottom/main_page_bottom_change.dart new file mode 100644 index 0000000..281136d --- /dev/null +++ b/lib/pages/main_bottom/main_page_bottom_change.dart @@ -0,0 +1,192 @@ +import 'dart:async'; +import 'dart:io'; + +import 'package:ef/ef.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; +import 'package:flutter_svg/svg.dart'; +import 'package:vbvs_app/common/util/FitTool.dart'; +import 'package:vbvs_app/common/util/MyUtils.dart'; +import 'package:vbvs_app/controller/main_bottom/global_controller.dart'; +import 'package:vbvs_app/controller/main_bottom/main_page_controller.dart'; +import 'package:vbvs_app/controller/theme_controller/ThemeController.dart'; +import 'package:vbvs_app/pages/main_bottom/e_page.dart'; +import 'package:vbvs_app/pages/main_bottom/home_page.dart'; +import 'package:vbvs_app/pages/main_bottom/message_page.dart'; +import 'package:vbvs_app/pages/main_bottom/mine_page.dart'; +import 'package:vbvs_app/pages/main_bottom/sleep_report_page.dart'; + +class MainPageBottomChange extends GetView { + GlobalController globalController = Get.find(); + ThemeController themeController = Get.find(); + getBottomNavigationBarItem(String svgPath, String actSvgPath, String label, + {double size = 0, bool isEmpty = false}) { + if (size == 0) { + size = 36.rpx; + } + return BottomNavigationBarItem( + icon: Padding( + padding: EdgeInsets.only(bottom: 6.rpx), + child: isEmpty + ? Container() + : SvgPicture.asset( + actSvgPath, + width: size, + height: size, + ), + ), + // activeIcon: Padding( + // padding: EdgeInsets.only(bottom: 6.rpx), + // child: isEmpty + // ? Container() + // : SvgPicture.asset( + // svgPath, + // color: stringToColor("#D3B684"), + // width: size, + // height: size, + // ), + // ), + activeIcon: Padding( + padding: EdgeInsets.only(bottom: 6.rpx), + child: isEmpty + ? Container() + : SvgPicture.asset( + svgPath, + width: size, + height: size, + ), + ), + label: label); + } + + List arr = [ + HomePage(), + SleepReportPage(), + EPage(), + MessagePage(), + MinePage(), + ]; + + DateTime? _lastBackPressedTime; // 记录上一次返回的时间 + @override + Widget build(BuildContext context) { + return PopScope( + canPop: false, + onPopInvokedWithResult: (disposition, result) async { + if (Platform.isAndroid) { + var flag = await _handleBackPressed(context); // 自定义返回逻辑 + if (flag) { + SystemNavigator.pop(); + } + } + }, + child: Obx( + () { + if (globalController.model.hideBottomNavigationBar == true) { + return Scaffold( + body: arr[controller.model.currentIndex], + floatingActionButtonAnimator: + FloatingActionButtonAnimator.noAnimation, + floatingActionButton: Container(), + ); + } else { + return Scaffold( + body: arr[controller.model.currentIndex], + floatingActionButtonAnimator: + FloatingActionButtonAnimator.noAnimation, + // floatingActionButton: Stack( + // alignment: Alignment.center, + // children: [ + // Positioned( + // bottom: 10.rpx, + // child: InkWell( + // onTap: () { + // print("index 3"); + // if (globalController.model.deviceList.length == 0) { + // showToast("请先绑定设备"); + // return; + // } + // if (globalController.model.deviceMain == null || + // globalController.model.deviceMain["mac"] == null) { + // globalController.model.deviceMain = + // globalController.model.deviceList[0]; + // globalController.updateAll(); + // } + + // controller.model.currentIndex = 2; + // controller.updateAll(); + // }, + // child: Image.asset( + // gaplessPlayback: true, + // excludeFromSemantics: true, + // controller.model.currentIndex == 2 + // ? "assets/images/icon_sleep_light.png" + // : "assets/images/icon_sleep_dark.png", + // width: 120.rpx, + // height: 120.rpx, + // ), + // )), + // ], + // ), + floatingActionButtonLocation: + FloatingActionButtonLocation.centerDocked, + bottomNavigationBar: Theme( + data: ThemeData( + splashFactory: NoSplash.splashFactory, + highlightColor: Colors.transparent), + child: BottomNavigationBar( + unselectedItemColor: Colors.white, + selectedItemColor: stringToColor("#D3B684"), + backgroundColor: themeController.currentColor.sc5, + selectedFontSize: 26.rpx, + unselectedFontSize: 26.rpx, + type: BottomNavigationBarType.fixed, + currentIndex: controller.model.currentIndex, + onTap: (index) { + // if(controller.model.currentIndex == 2) { + // arr[2].closeBefore(); + // } + Future.delayed(const Duration(milliseconds: 500), () { + if (controller.model.currentIndex != 1) { + globalController.model.hideBottomNavigationBar = false; + globalController.updateAll(); + } + }); + controller.model.currentIndex = index; + controller.updateAll(); + }, + items: [ + getBottomNavigationBarItem("assets/img/menu/home.svg", + "assets/img/menu/n_home.svg", "菜单.首页".tr), + getBottomNavigationBarItem("assets/img/menu/report.svg", + "assets/img/menu/n_report.svg", "菜单.报告".tr), + getBottomNavigationBarItem("assets/img/menu/e.svg", + "assets/img/menu/n_e.svg", "菜单.小e".tr), + getBottomNavigationBarItem("assets/img/menu/message.svg", + "assets/img/menu/n_message.svg", "菜单.消息".tr), + getBottomNavigationBarItem("assets/img/menu/mine.svg", + "assets/img/menu/n_mine.svg", "菜单.我的".tr), + ], + ), + ), + ); + } + }, + ), + ); + } + + Future _handleBackPressed(BuildContext context) async { + final currentTime = DateTime.now(); + + // 如果上次点击返回键时间为空,或者间隔超过 1 秒 + if (_lastBackPressedTime == null || + currentTime.difference(_lastBackPressedTime!) > Duration(seconds: 2)) { + _lastBackPressedTime = currentTime; + showToast("再按一次退出程序", color: color_warning, closeTime: 2); + return false; // 阻止退出程序 + } else { + return true; // 允许退出程序 + } + } +} diff --git a/lib/pages/main_bottom/message_page.dart b/lib/pages/main_bottom/message_page.dart new file mode 100644 index 0000000..5f236f0 --- /dev/null +++ b/lib/pages/main_bottom/message_page.dart @@ -0,0 +1,85 @@ +import 'package:ef/ef.dart'; +import 'package:flutter/material.dart'; +import 'package:vbvs_app/controller/main_bottom/global_controller.dart'; +import 'package:vbvs_app/controller/user_info_controller.dart'; + +class MessagePage extends StatefulWidget { + const MessagePage({super.key}); + + @override + State createState() => _MessagePageState(); +} + +class _MessagePageState extends State { + GlobalController globalController = Get.find(); + UserInfoController userInfoController = Get.find(); + @override + Widget build(BuildContext context) { + return LayoutBuilder( + builder: (context, boxConstraints) => GestureDetector( + onTap: () => FocusScope.of(context).unfocus(), + child: Scaffold( + // appBar: AppBar( + // backgroundColor: AppColors.bg_color, + // automaticallyImplyLeading: false, + // title: Container( + // width: double.infinity, + // height: 70.rpx, + // child: Obx( + // () => InkWell( + // onTap: () { + // Get.toNamed("/editUserInfoPage"); + // }, + // child: Row( + // mainAxisSize: MainAxisSize.max, + // mainAxisAlignment: MainAxisAlignment.spaceBetween, + // children: [ + // Row( + // mainAxisSize: MainAxisSize.max, + // children: [ + // Container( + // width: 56.rpx, + // height: 56.rpx, + // clipBehavior: Clip.antiAlias, + // decoration: BoxDecoration( + // shape: BoxShape.circle, + // ), + // ), + // Container( + // width: 20.rpx, + // height: 0, + // decoration: BoxDecoration( + // color: Colors.white, + // shape: BoxShape.rectangle, + // ), + // ), + // Text( + // userInfoController.model.user!.nickName ?? '匿名', + // style: FlutterFlowTheme.of(context) + // .bodyMedium + // .override( + // fontFamily: 'Readex Pro', + // color: Colors.white, + // letterSpacing: 0, + // fontSize: 30.rpx), + // ), + // ], + // ), + // ], + // ), + // ), + // ), + // ), + // actions: [], + // centerTitle: false, + // ), + + body: SafeArea( + top: true, + child: Text("消息"), + ), + ), + ), + ); + } +} diff --git a/lib/pages/main_bottom/mine_page.dart b/lib/pages/main_bottom/mine_page.dart new file mode 100644 index 0000000..dc5c505 --- /dev/null +++ b/lib/pages/main_bottom/mine_page.dart @@ -0,0 +1,374 @@ +import 'package:ef/ef.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/svg.dart'; +import 'package:flutterflow_ui/flutterflow_ui.dart'; +import 'package:vbvs_app/common/color/appConstants.dart'; +import 'package:vbvs_app/common/util/FitTool.dart'; +import 'package:vbvs_app/controller/main_bottom/global_controller.dart'; +import 'package:vbvs_app/controller/user_info_controller.dart'; + +class MinePage extends StatefulWidget { + const MinePage({super.key}); + + @override + State createState() => _MinePageState(); +} + +class _MinePageState extends State { + GlobalController globalController = Get.find(); + UserInfoController userInfoController = Get.find(); + + @override + Widget build(BuildContext context) { + return LayoutBuilder( + builder: (context, bodySize) => GestureDetector( + onTap: () => FocusScope.of(context).unfocus(), + child: Scaffold( + body: SafeArea( + top: true, + child: Container( + height: bodySize.maxHeight, + decoration: BoxDecoration( + image: DecorationImage( + image: AssetImage('assets/img/bgImage.png'), // 本地图片 + fit: BoxFit.fill, // 填满整个 Container + ), + ), + child: Column( + mainAxisSize: MainAxisSize.max, + children: [ + Container( + width: double.infinity, + decoration: BoxDecoration( + color: Color(0xFF242835), + borderRadius: BorderRadius.only( + bottomLeft: Radius.circular( + AppConstants().normal_container_radius), + bottomRight: Radius.circular( + AppConstants().normal_container_radius), + topLeft: Radius.circular(0.rpx), + topRight: Radius.circular(0.rpx), + ), + ), + child: Padding( + padding: + EdgeInsetsDirectional.fromSTEB(64.rpx, 0, 37.rpx, 0), + child: Column( + mainAxisSize: MainAxisSize.max, + children: [ + Padding( + padding: + EdgeInsetsDirectional.fromSTEB(0, 65.rpx, 0, 0), + child: Row( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.end, + children: [ + SvgPicture.asset( + 'assets/img/icon/earphone.svg', + width: 29.rpx, + height: 29.rpx, // 如果 SVG 中没有固定颜色,可以这样设置 + ), + SvgPicture.asset( + 'assets/img/icon/setting.svg', + width: 29.rpx, + height: 29.rpx, // 如果 SVG 中没有固定颜色,可以这样设置 + ), + ].divide(SizedBox(width: 60.rpx)), + ), + ), + Padding( + padding: EdgeInsetsDirectional.fromSTEB( + 0, 50.rpx, 0, 66.rpx), + child: Row( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Row( + mainAxisSize: MainAxisSize.max, + children: [ + Container( + width: 120.rpx, + height: 120.rpx, + clipBehavior: Clip.antiAlias, + decoration: BoxDecoration( + shape: BoxShape.circle, + ), + child: Image.network( + 'https://picsum.photos/seed/270/600', + fit: BoxFit.cover, + ), + ), + Column( + mainAxisSize: MainAxisSize.max, + children: [ + Text( + 'Hello World', + style: FlutterFlowTheme.of(context) + .bodyMedium + .override( + fontFamily: 'Inter', + color: Color(0xFFEFF3F8), + fontSize: AppConstants() + .normal_text_fontSize, + letterSpacing: 0.0, + ), + ), + Text( + 'Hello World', + style: FlutterFlowTheme.of(context) + .bodyMedium + .override( + fontFamily: 'Inter', + color: Color(0xFFEAEFF3), + fontSize: AppConstants() + .normal_text_fontSize, + letterSpacing: 0.0, + ), + ), + ].divide(SizedBox(height: 20.rpx)), + ), + ].divide(SizedBox(width: 35.rpx)), + ), + Row( + mainAxisSize: MainAxisSize.max, + children: [ + Text( + '我的.个人信息'.tr, + style: FlutterFlowTheme.of(context) + .bodyMedium + .override( + fontFamily: 'Inter', + color: Color(0xFFE0E4E6), + fontSize: AppConstants() + .normal_text_fontSize, + letterSpacing: 0.0, + ), + ), + SvgPicture.asset( + 'assets/img/icon/arrow_right.svg', + width: 8.rpx, + height: 14.rpx, // 如果 SVG 中没有固定颜色,可以这样设置 + ), + ].divide(SizedBox(width: 16.rpx)), + ), + ], + ), + ), + ], + ), + ), + ), + Padding( + padding: EdgeInsetsDirectional.fromSTEB( + 30.rpx, 25.rpx, 30.rpx, 0), + child: Container( + width: double.infinity, + decoration: BoxDecoration( + color: Color(0xFF242835), + borderRadius: BorderRadius.circular( + AppConstants().normal_container_radius), + ), + child: Padding( + padding: EdgeInsetsDirectional.fromSTEB( + 40.rpx, 0, 40.rpx, 0), + child: Column( + mainAxisSize: MainAxisSize.max, + children: [ + Row( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Row( + mainAxisSize: MainAxisSize.max, + children: [ + SvgPicture.asset( + 'assets/img/icon/my_device.svg', + width: 25.rpx, + height: 25.rpx, // 如果 SVG 中没有固定颜色,可以这样设置 + ), + Text( + '我的.我的设备'.tr, + style: FlutterFlowTheme.of(context) + .bodyMedium + .override( + fontFamily: 'Inter', + color: Color(0xFFE0E2E4), + fontSize: AppConstants() + .title_text_fontSize, + letterSpacing: 0.0, + ), + ), + ].divide(SizedBox(width: 22.rpx)), + ), + SvgPicture.asset( + 'assets/img/icon/arrow_right.svg', + width: 8.rpx, + height: 15.rpx, // 如果 SVG 中没有固定颜色,可以这样设置 + ), + ], + ), + Row( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Row( + mainAxisSize: MainAxisSize.max, + children: [ + SvgPicture.asset( + 'assets/img/icon/device_repair.svg', + width: 25.rpx, + height: 25.rpx, // 如果 SVG 中没有固定颜色,可以这样设置 + ), + Text( + '我的.设备报修'.tr, + style: FlutterFlowTheme.of(context) + .bodyMedium + .override( + fontFamily: 'Inter', + color: Color(0xFFE0E2E4), + fontSize: AppConstants() + .title_text_fontSize, + letterSpacing: 0.0, + ), + ), + ].divide(SizedBox(width: 22.rpx)), + ), + SvgPicture.asset( + 'assets/img/icon/arrow_right.svg', + width: 8.rpx, + height: 15.rpx, // 如果 SVG 中没有固定颜色,可以这样设置 + ), + ], + ), + Row( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Row( + mainAxisSize: MainAxisSize.max, + children: [ + SvgPicture.asset( + 'assets/img/icon/op_ex.svg', + width: 25.rpx, + height: 25.rpx, // 如果 SVG 中没有固定颜色,可以这样设置 + ), + Text( + '我的.操作说明'.tr, + style: FlutterFlowTheme.of(context) + .bodyMedium + .override( + fontFamily: 'Inter', + color: Color(0xFFE0E2E4), + fontSize: AppConstants() + .title_text_fontSize, + letterSpacing: 0.0, + ), + ), + ].divide(SizedBox(width: 22.rpx)), + ), + SvgPicture.asset( + 'assets/img/icon/arrow_right.svg', + width: 8.rpx, + height: 14.rpx, // 如果 SVG 中没有固定颜色,可以这样设置 + ), + ], + ), + Row( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Row( + mainAxisSize: MainAxisSize.max, + children: [ + SvgPicture.asset( + 'assets/img/icon/like.svg', + width: 25.rpx, + height: 25.rpx, // 如果 SVG 中没有固定颜色,可以这样设置 + ), + Text( + '关注我们'.tr, + style: FlutterFlowTheme.of(context) + .bodyMedium + .override( + fontFamily: 'Inter', + color: Color(0xFFE0E2E4), + fontSize: AppConstants() + .title_text_fontSize, + letterSpacing: 0.0, + ), + ), + ].divide(SizedBox(width: 22.rpx)), + ), + SvgPicture.asset( + 'assets/img/icon/arrow_right.svg', + width: 8.rpx, + height: 15.rpx, // 如果 SVG 中没有固定颜色,可以这样设置 + ), + ], + ), + Row( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Row( + mainAxisSize: MainAxisSize.max, + children: [ + SvgPicture.asset( + 'assets/img/icon/version.svg', + width: 25.rpx, + height: 25.rpx, // 如果 SVG 中没有固定颜色,可以这样设置 + ), + Text( + '我的.当前版本'.tr, + style: FlutterFlowTheme.of(context) + .bodyMedium + .override( + fontFamily: 'Inter', + color: Color(0xFFE0E2E4), + fontSize: AppConstants() + .title_text_fontSize, + letterSpacing: 0.0, + ), + ), + ].divide(SizedBox(width: 22.rpx)), + ), + Row( + mainAxisSize: MainAxisSize.max, + children: [ + Text( + '3.61.0', + style: FlutterFlowTheme.of(context) + .bodyMedium + .override( + fontFamily: 'Inter', + color: Color(0xFFD9E3EB), + fontSize: 26.rpx, + letterSpacing: 0.0, + ), + ), + SvgPicture.asset( + 'assets/img/icon/arrow_right.svg', + width: 8.rpx, + height: 15.rpx, // 如果 SVG 中没有固定颜色,可以这样设置 + ), + ].divide(SizedBox(width: 28.rpx)), + ), + ], + ), + ] + .divide(SizedBox(height: 60.rpx)) + .addToStart(SizedBox(height: 60.rpx)) + .addToEnd(SizedBox(height: 60.rpx)), + ), + ), + ), + ), + ], + ), + ), + ), + ), + ), + ); + } +} diff --git a/lib/pages/main_bottom/sleep_report_page.dart b/lib/pages/main_bottom/sleep_report_page.dart new file mode 100644 index 0000000..6033745 --- /dev/null +++ b/lib/pages/main_bottom/sleep_report_page.dart @@ -0,0 +1,85 @@ +import 'package:ef/ef.dart'; +import 'package:flutter/material.dart'; +import 'package:vbvs_app/controller/main_bottom/global_controller.dart'; +import 'package:vbvs_app/controller/user_info_controller.dart'; + +class SleepReportPage extends StatefulWidget { + const SleepReportPage({super.key}); + + @override + State createState() => _SleepReportPageState(); +} + +class _SleepReportPageState extends State { + GlobalController globalController = Get.find(); + UserInfoController userInfoController = Get.find(); + @override + Widget build(BuildContext context) { + return LayoutBuilder( + builder: (context, boxConstraints) => GestureDetector( + onTap: () => FocusScope.of(context).unfocus(), + child: Scaffold( + // appBar: AppBar( + // backgroundColor: AppColors.bg_color, + // automaticallyImplyLeading: false, + // title: Container( + // width: double.infinity, + // height: 70.rpx, + // child: Obx( + // () => InkWell( + // onTap: () { + // Get.toNamed("/editUserInfoPage"); + // }, + // child: Row( + // mainAxisSize: MainAxisSize.max, + // mainAxisAlignment: MainAxisAlignment.spaceBetween, + // children: [ + // Row( + // mainAxisSize: MainAxisSize.max, + // children: [ + // Container( + // width: 56.rpx, + // height: 56.rpx, + // clipBehavior: Clip.antiAlias, + // decoration: BoxDecoration( + // shape: BoxShape.circle, + // ), + // ), + // Container( + // width: 20.rpx, + // height: 0, + // decoration: BoxDecoration( + // color: Colors.white, + // shape: BoxShape.rectangle, + // ), + // ), + // Text( + // userInfoController.model.user!.nickName ?? '匿名', + // style: FlutterFlowTheme.of(context) + // .bodyMedium + // .override( + // fontFamily: 'Readex Pro', + // color: Colors.white, + // letterSpacing: 0, + // fontSize: 30.rpx), + // ), + // ], + // ), + // ], + // ), + // ), + // ), + // ), + // actions: [], + // centerTitle: false, + // ), + + body: SafeArea( + top: true, + child: Text("睡眠报告"), + ), + ), + ), + ); + } +} diff --git a/lib/repository/help_repository.dart b/lib/repository/help_repository.dart new file mode 100644 index 0000000..cf637b9 --- /dev/null +++ b/lib/repository/help_repository.dart @@ -0,0 +1,21 @@ +import 'package:ef/ef.dart'; + +//问题与帮助 +class HelpRepository { + //查询记录 + Future findHelpInfos({int limit = 10, int offset = 0}) async { + try { + var response = await ef.client + .from('app_help_list') + .select() + // .eq('deleted', 0) + .eq('status', 1) + .order("priority", ascending: true) + .order("created_at", ascending: false); + return response as List; + } catch (e) { + print('Error fetching repairs: $e'); + return []; + } + } +} diff --git a/lib/routers/routers.dart b/lib/routers/routers.dart new file mode 100644 index 0000000..b317654 --- /dev/null +++ b/lib/routers/routers.dart @@ -0,0 +1,47 @@ +import 'package:flutter/cupertino.dart'; +import 'package:vbvs_app/pages/device_bind/device_type.dart'; +import 'package:vbvs_app/pages/login/login.dart'; +import 'package:vbvs_app/pages/main_bottom/e_page.dart'; +import 'package:vbvs_app/pages/main_bottom/home_page.dart'; +import 'package:vbvs_app/pages/main_bottom/main_page_bottom_change.dart'; +import 'package:vbvs_app/pages/main_bottom/message_page.dart'; +import 'package:vbvs_app/pages/main_bottom/mine_page.dart'; +import 'package:vbvs_app/pages/main_bottom/sleep_report_page.dart'; + + + + +var routes = { + "/homePage": (contxt) => HomePage(), + "/sleepReportPage": (contxt) => SleepReportPage(), + "/ePage": (contxt) => EPage(), + "/messagePage": (contxt) => MessagePage(), + "/minePage": (contxt) => MinePage(), + "/mianPageBottomChange": (contxt) => MainPageBottomChange(), + "/loginPage": (contxt) => LoginPage(), + "/deviceType": (contxt) => DeviceTypePage(), +}; + +//2、配置onGenerateRoute 固定写法 这个方法也相当于一个中间件,这里可以做权限判断 +var onGenerateRoute = (RouteSettings settings) { + final String? name = settings.name; // /news 或者 /search + final Function? pageContentBuilder = + routes[name]; // Function = (contxt) { return const NewsPage()} + + if (pageContentBuilder != null) { + if (settings.arguments != null) { + final Route route = CupertinoPageRoute( + settings: settings, + builder: (context) => + pageContentBuilder(context, arguments: settings.arguments)); + return route; + } else { + final Route route = CupertinoPageRoute( + settings: settings, + builder: (context) => pageContentBuilder(context)); + + return route; + } + } + return null; +}; diff --git a/linux/flutter/generated_plugin_registrant.cc b/linux/flutter/generated_plugin_registrant.cc index e71a16d..4695b6b 100644 --- a/linux/flutter/generated_plugin_registrant.cc +++ b/linux/flutter/generated_plugin_registrant.cc @@ -6,6 +6,22 @@ #include "generated_plugin_registrant.h" +#include +#include +#include +#include void fl_register_plugins(FlPluginRegistry* registry) { + g_autoptr(FlPluginRegistrar) flutter_localization_registrar = + fl_plugin_registry_get_registrar_for_plugin(registry, "FlutterLocalizationPlugin"); + flutter_localization_plugin_register_with_registrar(flutter_localization_registrar); + g_autoptr(FlPluginRegistrar) gtk_registrar = + fl_plugin_registry_get_registrar_for_plugin(registry, "GtkPlugin"); + gtk_plugin_register_with_registrar(gtk_registrar); + g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar = + fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin"); + url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar); + g_autoptr(FlPluginRegistrar) window_to_front_registrar = + fl_plugin_registry_get_registrar_for_plugin(registry, "WindowToFrontPlugin"); + window_to_front_plugin_register_with_registrar(window_to_front_registrar); } diff --git a/linux/flutter/generated_plugins.cmake b/linux/flutter/generated_plugins.cmake index 2e1de87..50b4fcf 100644 --- a/linux/flutter/generated_plugins.cmake +++ b/linux/flutter/generated_plugins.cmake @@ -3,6 +3,10 @@ # list(APPEND FLUTTER_PLUGIN_LIST + flutter_localization + gtk + url_launcher_linux + window_to_front ) list(APPEND FLUTTER_FFI_PLUGIN_LIST diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift index cccf817..23366f7 100644 --- a/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/macos/Flutter/GeneratedPluginRegistrant.swift @@ -5,6 +5,32 @@ import FlutterMacOS import Foundation +import app_links +import device_info_plus +import file_picker +import flutter_localization +import flutter_web_auth_2 +import package_info_plus +import path_provider_foundation +import rive_common +import shared_preferences_foundation +import sqflite_darwin +import url_launcher_macos +import webview_flutter_wkwebview +import window_to_front func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { + AppLinksMacosPlugin.register(with: registry.registrar(forPlugin: "AppLinksMacosPlugin")) + DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin")) + FilePickerPlugin.register(with: registry.registrar(forPlugin: "FilePickerPlugin")) + FlutterLocalizationPlugin.register(with: registry.registrar(forPlugin: "FlutterLocalizationPlugin")) + FlutterWebAuth2Plugin.register(with: registry.registrar(forPlugin: "FlutterWebAuth2Plugin")) + FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin")) + PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) + RivePlugin.register(with: registry.registrar(forPlugin: "RivePlugin")) + SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin")) + SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin")) + UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin")) + WebViewFlutterPlugin.register(with: registry.registrar(forPlugin: "WebViewFlutterPlugin")) + WindowToFrontPlugin.register(with: registry.registrar(forPlugin: "WindowToFrontPlugin")) } diff --git a/pubspec.lock b/pubspec.lock index b584c4e..c697319 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1,6 +1,124 @@ # Generated by pub # See https://dart.dev/tools/pub/glossary#lockfile packages: + EasyDartModule: + dependency: "direct main" + description: + path: "." + ref: master + resolved-ref: "491165184a7d090657e91be2fe749a9b0fccccfc" + url: "http://git.real.he-info.cn:8080/r/~qmqz/EasyDartModule.git" + source: git + version: "1.0.0" + _fe_analyzer_shared: + dependency: transitive + description: + name: _fe_analyzer_shared + sha256: "45cfa8471b89fb6643fe9bf51bd7931a76b8f5ec2d65de4fb176dba8d4f22c77" + url: "https://pub.flutter-io.cn" + source: hosted + version: "73.0.0" + _macros: + dependency: transitive + description: dart + source: sdk + version: "0.3.2" + adaptive_number: + dependency: transitive + description: + name: adaptive_number + sha256: "3a567544e9b5c9c803006f51140ad544aedc79604fd4f3f2c1380003f97c1d77" + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.0.0" + aligned_dialog: + dependency: transitive + description: + name: aligned_dialog + sha256: "5d227d0e9d96bfa06699656b05f2cfba2f45645ccc52c43272e33ae307b26be8" + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.0.7" + aligned_tooltip: + dependency: transitive + description: + name: aligned_tooltip + sha256: "1f8d69cc560e693905f8d9e2e7b85312c854c91a447b818bac02a8d0c73adf72" + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.0.1" + analyzer: + dependency: transitive + description: + name: analyzer + sha256: "4959fec185fe70cce007c57e9ab6983101dbe593d2bf8bbfb4453aaec0cf470a" + url: "https://pub.flutter-io.cn" + source: hosted + version: "6.8.0" + apivideo_live_stream: + dependency: transitive + description: + name: apivideo_live_stream + sha256: "87f4d8791e25d9c1db063d21003e7d0c4cf9e7be492ac1ecd79bfe22541a319b" + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.0.7" + app_links: + dependency: transitive + description: + name: app_links + sha256: "85ed8fc1d25a76475914fff28cc994653bd900bc2c26e4b57a49e097febb54ba" + url: "https://pub.flutter-io.cn" + source: hosted + version: "6.4.0" + app_links_linux: + dependency: transitive + description: + name: app_links_linux + sha256: f5f7173a78609f3dfd4c2ff2c95bd559ab43c80a87dc6a095921d96c05688c81 + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.0.3" + app_links_platform_interface: + dependency: transitive + description: + name: app_links_platform_interface + sha256: "05f5379577c513b534a29ddea68176a4d4802c46180ee8e2e966257158772a3f" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.0.2" + app_links_web: + dependency: transitive + description: + name: app_links_web + sha256: af060ed76183f9e2b87510a9480e56a5352b6c249778d07bd2c95fc35632a555 + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.0.4" + appwrite: + dependency: transitive + description: + name: appwrite + sha256: f5b8a4bfceb9c7b1cd380346863840fa6799eb515830bf04a9557424fdf92b23 + url: "https://pub.flutter-io.cn" + source: hosted + version: "13.1.1" + archive: + dependency: transitive + description: + name: archive + sha256: cb6a278ef2dbb298455e1a713bda08524a175630ec643a242c399c932a0a1f7d + url: "https://pub.flutter-io.cn" + source: hosted + version: "3.6.1" + args: + dependency: transitive + description: + name: args + sha256: d0481093c50b1da8910eb0bb301626d4d8eb7284aa739614d2b394ee09e3ea04 + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.7.0" async: dependency: transitive description: @@ -9,6 +127,38 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "2.11.0" + auto_size_text: + dependency: transitive + description: + name: auto_size_text + sha256: "3f5261cd3fb5f2a9ab4e2fc3fba84fd9fcaac8821f20a1d4e71f557521b22599" + url: "https://pub.flutter-io.cn" + source: hosted + version: "3.0.0" + barcode: + dependency: transitive + description: + name: barcode + sha256: "7b6729c37e3b7f34233e2318d866e8c48ddb46c1f7ad01ff7bb2a8de1da2b9f4" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.2.9" + barcode_widget: + dependency: transitive + description: + name: barcode_widget + sha256: "6f2c5b08659b1a5f4d88d183e6007133ea2f96e50e7b8bb628f03266c3931427" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.0.4" + basic_utils: + dependency: transitive + description: + name: basic_utils + sha256: "2064b21d3c41ed7654bc82cc476fd65542e04d60059b74d5eed490a4da08fc6c" + url: "https://pub.flutter-io.cn" + source: hosted + version: "5.7.0" boolean_selector: dependency: transitive description: @@ -17,6 +167,118 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "2.1.1" + bson: + dependency: transitive + description: + name: bson + sha256: "5a286c4cb9944ab21287579d1f664eb8300daa91d80938349b1a244d165a6ba5" + url: "https://pub.flutter-io.cn" + source: hosted + version: "5.0.4" + buffer: + dependency: transitive + description: + name: buffer + sha256: "389da2ec2c16283c8787e0adaede82b1842102f8c8aae2f49003a766c5c6b3d1" + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.2.3" + build: + dependency: transitive + description: + name: build + sha256: "80184af8b6cb3e5c1c4ec6d8544d27711700bc3e6d2efad04238c7b5290889f0" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.4.1" + build_config: + dependency: transitive + description: + name: build_config + sha256: bf80fcfb46a29945b423bd9aad884590fb1dc69b330a4d4700cac476af1708d1 + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.1.1" + build_daemon: + dependency: transitive + description: + name: build_daemon + sha256: "79b2aef6ac2ed00046867ed354c88778c9c0f029df8a20fe10b5436826721ef9" + url: "https://pub.flutter-io.cn" + source: hosted + version: "4.0.2" + build_resolvers: + dependency: transitive + description: + name: build_resolvers + sha256: "339086358431fa15d7eca8b6a36e5d783728cf025e559b834f4609a1fcfb7b0a" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.4.2" + build_runner: + dependency: "direct dev" + description: + name: build_runner + sha256: "028819cfb90051c6b5440c7e574d1896f8037e3c96cf17aaeb054c9311cfbf4d" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.4.13" + build_runner_core: + dependency: transitive + description: + name: build_runner_core + sha256: f8126682b87a7282a339b871298cc12009cb67109cfa1614d6436fb0289193e0 + url: "https://pub.flutter-io.cn" + source: hosted + version: "7.3.2" + built_collection: + dependency: transitive + description: + name: built_collection + sha256: "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100" + url: "https://pub.flutter-io.cn" + source: hosted + version: "5.1.1" + built_value: + dependency: transitive + description: + name: built_value + sha256: ea90e81dc4a25a043d9bee692d20ed6d1c4a1662a28c03a96417446c093ed6b4 + url: "https://pub.flutter-io.cn" + source: hosted + version: "8.9.5" + cached_network_image: + dependency: transitive + description: + name: cached_network_image + sha256: "7c1183e361e5c8b0a0f21a28401eecdbde252441106a9816400dd4c2b2424916" + url: "https://pub.flutter-io.cn" + source: hosted + version: "3.4.1" + cached_network_image_platform_interface: + dependency: transitive + description: + name: cached_network_image_platform_interface + sha256: "35814b016e37fbdc91f7ae18c8caf49ba5c88501813f73ce8a07027a395e2829" + url: "https://pub.flutter-io.cn" + source: hosted + version: "4.1.1" + cached_network_image_web: + dependency: transitive + description: + name: cached_network_image_web + sha256: "980842f4e8e2535b8dbd3d5ca0b1f0ba66bf61d14cc3a17a9b4788a3685ba062" + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.3.1" + carousel_slider: + dependency: transitive + description: + name: carousel_slider + sha256: "9c695cc963bf1d04a47bd6021f68befce8970bcd61d24938e1fb0918cf5d9c42" + url: "https://pub.flutter-io.cn" + source: hosted + version: "4.2.1" characters: dependency: transitive description: @@ -25,6 +287,22 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "1.3.0" + charcode: + dependency: transitive + description: + name: charcode + sha256: fb0f1107cac15a5ea6ef0a6ef71a807b9e4267c713bb93e00e92d737cc8dbd8a + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.4.0" + checked_yaml: + dependency: transitive + description: + name: checked_yaml + sha256: feb6bed21949061731a7a75fc5d2aa727cf160b91af9a3e464c5e3a32e28b5ff + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.0.3" clock: dependency: transitive description: @@ -33,14 +311,70 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "1.1.1" - collection: + code_builder: dependency: transitive description: - name: collection - sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a + name: code_builder + sha256: "0ec10bf4a89e4c613960bf1e8b42c64127021740fb21640c29c909826a5eea3e" url: "https://pub.flutter-io.cn" source: hosted - version: "1.18.0" + version: "4.10.1" + collection: + dependency: "direct overridden" + description: + name: collection + sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76" + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.19.1" + color: + dependency: transitive + description: + name: color + sha256: ddcdf1b3badd7008233f5acffaf20ca9f5dc2cd0172b75f68f24526a5f5725cb + url: "https://pub.flutter-io.cn" + source: hosted + version: "3.0.0" + convert: + dependency: transitive + description: + name: convert + sha256: b30acd5944035672bc15c6b7a8b47d773e41e2f17de064350988c5d02adb1c68 + url: "https://pub.flutter-io.cn" + source: hosted + version: "3.1.2" + cookie_jar: + dependency: transitive + description: + name: cookie_jar + sha256: a6ac027d3ed6ed756bfce8f3ff60cb479e266f3b0fdabd6242b804b6765e52de + url: "https://pub.flutter-io.cn" + source: hosted + version: "4.0.8" + cross_file: + dependency: transitive + description: + name: cross_file + sha256: "7caf6a750a0c04effbb52a676dce9a4a592e10ad35c34d6d2d0e4811160d5670" + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.3.4+2" + crypto: + dependency: transitive + description: + name: crypto + sha256: "1e445881f28f22d6140f181e07737b22f1e099a5e1ff94b0af2f9e4a463f4855" + url: "https://pub.flutter-io.cn" + source: hosted + version: "3.0.6" + csslib: + dependency: transitive + description: + name: csslib + sha256: "09bad715f418841f976c77db72d5398dc1253c21fb9c0c7f0b0b985860b2d58e" + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.0.2" cupertino_icons: dependency: "direct main" description: @@ -49,6 +383,135 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "1.0.8" + dart_jsonwebtoken: + dependency: transitive + description: + name: dart_jsonwebtoken + sha256: "00a0812d2aeaeb0d30bcbc4dd3cee57971dbc0ab2216adf4f0247f37793f15ef" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.17.0" + dart_style: + dependency: transitive + description: + name: dart_style + sha256: "7856d364b589d1f08986e140938578ed36ed948581fbc3bc9aef1805039ac5ab" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.3.7" + data_table_2: + dependency: "direct overridden" + description: + name: data_table_2 + sha256: "3b4ffb66ab20f238bf5f89af37e3bedfc9bef456c1fe24a79487ec1864574c84" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.5.16" + decimal: + dependency: transitive + description: + name: decimal + sha256: "24a261d5d5c87e86c7651c417a5dbdf8bcd7080dd592533910e8d0505a279f21" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.3.3" + device_info_plus: + dependency: transitive + description: + name: device_info_plus + sha256: a7fd703482b391a87d60b6061d04dfdeab07826b96f9abd8f5ed98068acc0074 + url: "https://pub.flutter-io.cn" + source: hosted + version: "10.1.2" + device_info_plus_platform_interface: + dependency: transitive + description: + name: device_info_plus_platform_interface + sha256: "0b04e02b30791224b31969eb1b50d723498f402971bff3630bca2ba839bd1ed2" + url: "https://pub.flutter-io.cn" + source: hosted + version: "7.0.2" + dio: + dependency: transitive + description: + name: dio + sha256: "253a18bbd4851fecba42f7343a1df3a9a4c1d31a2c1b37e221086b4fa8c8dbc9" + url: "https://pub.flutter-io.cn" + source: hosted + version: "5.8.0+1" + dio_web_adapter: + dependency: transitive + description: + name: dio_web_adapter + sha256: "7586e476d70caecaf1686d21eee7247ea43ef5c345eab9e0cc3583ff13378d78" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.1.1" + dropdown_button2: + dependency: transitive + description: + name: dropdown_button2 + sha256: b0fe8d49a030315e9eef6c7ac84ca964250155a6224d491c1365061bc974a9e1 + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.3.9" + easy_debounce: + dependency: transitive + description: + name: easy_debounce + sha256: f082609cfb8f37defb9e37fc28bc978c6712dedf08d4c5a26f820fa10165a236 + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.0.3" + ed25519_edwards: + dependency: transitive + description: + name: ed25519_edwards + sha256: "6ce0112d131327ec6d42beede1e5dfd526069b18ad45dcf654f15074ad9276cd" + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.3.1" + ef: + dependency: "direct main" + description: + path: "." + ref: main + resolved-ref: d0019caff020ccfda92c337d0d9a4e4670eecc54 + url: "http://admin@git.real.he-info.cn:8080/r/ef.git" + source: git + version: "0.0.1" + emoji_flag_converter: + dependency: transitive + description: + name: emoji_flag_converter + sha256: "3be8a0d1b0efbc7713113369ca9671ed73c04dfe80159562b1b725c4259d3e35" + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.1.0" + equatable: + dependency: transitive + description: + name: equatable + sha256: "567c64b3cb4cf82397aac55f4f0cbd3ca20d77c6c03bedbc4ceaddc08904aef7" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.0.7" + event_bus: + dependency: transitive + description: + name: event_bus + sha256: "1a55e97923769c286d295240048fc180e7b0768902c3c2e869fe059aafa15304" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.0.1" + expandable: + dependency: transitive + description: + name: expandable + sha256: "9604d612d4d1146dafa96c6d8eec9c2ff0994658d6d09fed720ab788c7f5afc2" + url: "https://pub.flutter-io.cn" + source: hosted + version: "5.0.1" fake_async: dependency: transitive description: @@ -57,11 +520,99 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "1.3.1" + ffi: + dependency: transitive + description: + name: ffi + sha256: "16ed7b077ef01ad6170a3d0c57caa4a112a38d7a2ed5602e0aca9ca6f3d98da6" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.1.3" + file: + dependency: transitive + description: + name: file + sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4 + url: "https://pub.flutter-io.cn" + source: hosted + version: "7.0.1" + file_picker: + dependency: transitive + description: + name: file_picker + sha256: ab13ae8ef5580a411c458d6207b6774a6c237d77ac37011b13994879f68a8810 + url: "https://pub.flutter-io.cn" + source: hosted + version: "8.3.7" + fixnum: + dependency: transitive + description: + name: fixnum + sha256: b6dc7065e46c974bc7c5f143080a6764ec7a4be6da1285ececdc37be96de53be + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.1.1" + fl_chart: + dependency: transitive + description: + name: fl_chart + sha256: d0f0d49112f2f4b192481c16d05b6418bd7820e021e265a3c22db98acf7ed7fb + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.68.0" + flip_card: + dependency: transitive + description: + name: flip_card + sha256: "5d4aa58f3983cced0782f4ce45826b7eea36e8e464964d9209dcbc7a87b2292f" + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.7.0" + floating_bottom_navigation_bar: + dependency: transitive + description: + name: floating_bottom_navigation_bar + sha256: "2ecffcb10841c8bf1a084adaef544ecd5451577b31bd80767e6bab1875c941a6" + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.5.2" flutter: dependency: "direct main" description: flutter source: sdk version: "0.0.0" + flutter_animate: + dependency: transitive + description: + name: flutter_animate + sha256: "7befe2d3252728afb77aecaaea1dec88a89d35b9b1d2eea6d04479e8af9117b5" + url: "https://pub.flutter-io.cn" + source: hosted + version: "4.5.2" + flutter_cache_manager: + dependency: transitive + description: + name: flutter_cache_manager + sha256: "400b6592f16a4409a7f2bb929a9a7e38c72cceb8ffb99ee57bbf2cb2cecf8386" + url: "https://pub.flutter-io.cn" + source: hosted + version: "3.4.1" + flutter_card_swiper: + dependency: transitive + description: + name: flutter_card_swiper + sha256: "024ba0fbce670eb7f71fa5aaf137de32017f2503fa05260a8e0a872e075a88c6" + url: "https://pub.flutter-io.cn" + source: hosted + version: "6.1.0" + flutter_credit_card: + dependency: transitive + description: + name: flutter_credit_card + sha256: a31154e62667e6e1f089ea357941e9285e4b42b9cb699392e55c978e19f864a0 + url: "https://pub.flutter-io.cn" + source: hosted + version: "4.1.0" flutter_lints: dependency: "direct dev" description: @@ -70,11 +621,310 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "4.0.0" + flutter_localization: + dependency: "direct main" + description: + name: flutter_localization + sha256: "987faf0a6c13a267202b28d3ed680647e234245ead1a1c1f95f87e86c6f12490" + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.3.2" + flutter_localizations: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + flutter_plugin_android_lifecycle: + dependency: transitive + description: + name: flutter_plugin_android_lifecycle + sha256: "1c2b787f99bdca1f3718543f81d38aa1b124817dfeb9fb196201bea85b6134bf" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.0.26" + flutter_shaders: + dependency: transitive + description: + name: flutter_shaders + sha256: "34794acadd8275d971e02df03afee3dee0f98dbfb8c4837082ad0034f612a3e2" + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.1.3" + flutter_staggered_grid_view: + dependency: transitive + description: + name: flutter_staggered_grid_view + sha256: "19e7abb550c96fbfeb546b23f3ff356ee7c59a019a651f8f102a4ba9b7349395" + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.7.0" + flutter_svg: + dependency: "direct main" + description: + name: flutter_svg + sha256: c200fd79c918a40c5cd50ea0877fa13f81bdaf6f0a5d3dbcc2a13e3285d6aa1b + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.0.17" flutter_test: dependency: "direct dev" description: flutter source: sdk version: "0.0.0" + flutter_web_auth_2: + dependency: transitive + description: + name: flutter_web_auth_2 + sha256: "4d3d2fd3d26bf1a26b3beafd4b4b899c0ffe10dc99af25abc58ffe24e991133c" + url: "https://pub.flutter-io.cn" + source: hosted + version: "3.1.2" + flutter_web_auth_2_platform_interface: + dependency: transitive + description: + name: flutter_web_auth_2_platform_interface + sha256: e8669e262005a8354389ba2971f0fc1c36188481234ff50d013aaf993f30f739 + url: "https://pub.flutter-io.cn" + source: hosted + version: "3.1.0" + flutter_web_plugins: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + flutterflow_ui: + dependency: "direct main" + description: + path: "." + ref: master + resolved-ref: e9197e14baad5750151562312bc9d83e52b48235 + url: "http://admin@git.real.he-info.cn:8080/r/~lu/flutterflow-ui.git" + source: git + version: "0.3.1" + font_awesome_flutter: + dependency: transitive + description: + name: font_awesome_flutter + sha256: d3a89184101baec7f4600d58840a764d2ef760fe1c5a20ef9e6b0e9b24a07a3a + url: "https://pub.flutter-io.cn" + source: hosted + version: "10.8.0" + from_css_color: + dependency: transitive + description: + name: from_css_color + sha256: "5e4d1795c8d10af94e51dd97636b2a29170a132be1aceba103e9866028d20823" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.0.0" + frontend_server_client: + dependency: transitive + description: + name: frontend_server_client + sha256: f64a0333a82f30b0cca061bc3d143813a486dc086b574bfb233b7c1372427694 + url: "https://pub.flutter-io.cn" + source: hosted + version: "4.0.0" + functions_client: + dependency: transitive + description: + name: functions_client + sha256: a49876ebae32a50eb62483c5c5ac80ed0d8da34f98ccc23986b03a8d28cee07c + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.4.1" + get: + dependency: transitive + description: + name: get + sha256: c79eeb4339f1f3deffd9ec912f8a923834bec55f7b49c9e882b8fef2c139d425 + url: "https://pub.flutter-io.cn" + source: hosted + version: "4.7.2" + get_storage: + dependency: "direct main" + description: + name: get_storage + sha256: "39db1fffe779d0c22b3a744376e86febe4ade43bf65e06eab5af707dc84185a2" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.1.1" + glob: + dependency: transitive + description: + name: glob + sha256: c3f1ee72c96f8f78935e18aa8cecced9ab132419e8625dc187e1c2408efc20de + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.1.3" + google_fonts: + dependency: transitive + description: + name: google_fonts + sha256: b1ac0fe2832c9cc95e5e88b57d627c5e68c223b9657f4b96e1487aa9098c7b82 + url: "https://pub.flutter-io.cn" + source: hosted + version: "6.2.1" + google_identity_services_web: + dependency: transitive + description: + name: google_identity_services_web + sha256: "55580f436822d64c8ff9a77e37d61f5fb1e6c7ec9d632a43ee324e2a05c3c6c9" + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.3.3" + googleapis_auth: + dependency: transitive + description: + name: googleapis_auth + sha256: befd71383a955535060acde8792e7efc11d2fccd03dd1d3ec434e85b68775938 + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.6.0" + gotrue: + dependency: transitive + description: + name: gotrue + sha256: d6362dff9a54f8c1c372bb137c858b4024c16407324d34e6473e59623c9b9f50 + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.11.1" + graphs: + dependency: transitive + description: + name: graphs + sha256: "741bbf84165310a68ff28fe9e727332eef1407342fca52759cb21ad8177bb8d0" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.3.2" + grpc: + dependency: transitive + description: + name: grpc + sha256: "30e1edae6846b163a64f6d8716e3443980fe1f7d2d1f086f011d24ea186f2582" + url: "https://pub.flutter-io.cn" + source: hosted + version: "4.0.4" + gtk: + dependency: transitive + description: + name: gtk + sha256: e8ce9ca4b1df106e4d72dad201d345ea1a036cc12c360f1a7d5a758f78ffa42c + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.1.0" + html: + dependency: transitive + description: + name: html + sha256: "1fc58edeaec4307368c60d59b7e15b9d658b57d7f3125098b6294153c75337ec" + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.15.5" + http: + dependency: transitive + description: + name: http + sha256: fe7ab022b76f3034adc518fb6ea04a82387620e19977665ea18d30a1cf43442f + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.3.0" + http2: + dependency: transitive + description: + name: http2 + sha256: "382d3aefc5bd6dc68c6b892d7664f29b5beb3251611ae946a98d35158a82bbfa" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.3.1" + http_methods: + dependency: transitive + description: + name: http_methods + sha256: "6bccce8f1ec7b5d701e7921dca35e202d425b57e317ba1a37f2638590e29e566" + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.1.1" + http_multi_server: + dependency: transitive + description: + name: http_multi_server + sha256: aa6199f908078bb1c5efb8d8638d4ae191aac11b311132c3ef48ce352fb52ef8 + url: "https://pub.flutter-io.cn" + source: hosted + version: "3.2.2" + http_parser: + dependency: "direct overridden" + description: + name: http_parser + sha256: "178d74305e7866013777bab2c3d8726205dc5a4dd935297175b19a23a2e66571" + url: "https://pub.flutter-io.cn" + source: hosted + version: "4.1.2" + intl: + dependency: transitive + description: + name: intl + sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.19.0" + io: + dependency: transitive + description: + name: io + sha256: dfd5a80599cf0165756e3181807ed3e77daf6dd4137caaad72d0b7931597650b + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.0.5" + iregexp: + dependency: transitive + description: + name: iregexp + sha256: "143859dcaeecf6f683102786762d70a47ef8441a0d2287a158172d32d38799cf" + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.1.2" + js: + dependency: transitive + description: + name: js + sha256: c1b2e9b5ea78c45e1a0788d29606ba27dc5f71f019f32ca5140f61ef071838cf + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.7.1" + json_annotation: + dependency: transitive + description: + name: json_annotation + sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1" + url: "https://pub.flutter-io.cn" + source: hosted + version: "4.9.0" + json_path: + dependency: transitive + description: + name: json_path + sha256: a3a06eb005f2e93d0df7f263cdf76bbd02c7602f5c4bed9be94fcca4c36be03e + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.7.5" + json_serializable: + dependency: "direct dev" + description: + name: json_serializable + sha256: c2fcb3920cf2b6ae6845954186420fca40bc0a8abcc84903b7801f17d7050d7c + url: "https://pub.flutter-io.cn" + source: hosted + version: "6.9.0" + jwt_decode: + dependency: transitive + description: + name: jwt_decode + sha256: d2e9f68c052b2225130977429d30f187aa1981d789c76ad104a32243cfdebfbb + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.3.1" leak_tracker: dependency: transitive description: @@ -107,6 +957,38 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "4.0.0" + logging: + dependency: transitive + description: + name: logging + sha256: c8245ada5f1717ed44271ed1c26b8ce85ca3228fd2ffdb75468ab01979309d61 + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.3.0" + lottie: + dependency: "direct main" + description: + name: lottie + sha256: fa39707f36786707b01eca7626d2c16c32aa603b3f3a146518518458847dc127 + url: "https://pub.flutter-io.cn" + source: hosted + version: "3.2.0" + macros: + dependency: transitive + description: + name: macros + sha256: "0acaed5d6b7eab89f63350bccd82119e6c602df0f391260d0e32b5e23db79536" + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.1.2-main.4" + mapbox_search: + dependency: transitive + description: + name: mapbox_search + sha256: "5e1237301a5485443a675eb65fb709e319f25fbf91fb1de4dcdb5ac5d59a33a5" + url: "https://pub.flutter-io.cn" + source: hosted + version: "4.3.1" matcher: dependency: transitive description: @@ -123,6 +1005,14 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "0.11.1" + maybe_just_nothing: + dependency: transitive + description: + name: maybe_just_nothing + sha256: "0c06326e26d08f6ed43247404376366dc4d756cef23a4f1db765f546224c35e0" + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.5.3" meta: dependency: transitive description: @@ -131,6 +1021,127 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "1.15.0" + mime: + dependency: transitive + description: + name: mime + sha256: "41a20518f0cb1256669420fdba0cd90d21561e560ac240f26ef8322e45bb7ed6" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.0.0" + mime_type: + dependency: transitive + description: + name: mime_type + sha256: d652b613e84dac1af28030a9fba82c0999be05b98163f9e18a0849c6e63838bb + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.0.1" + minio: + dependency: transitive + description: + name: minio + sha256: "9fa3d041237d3a0dabfd14c11f6adbefe71f6973d64192f6f1fc3e174013001e" + url: "https://pub.flutter-io.cn" + source: hosted + version: "3.5.7" + mongo_dart: + dependency: transitive + description: + name: mongo_dart + sha256: b0078dd433ecad7d250abaa6437cb720dd16cbfa9b8cc020460698e0703d7bc9 + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.10.3" + mongo_dart_query: + dependency: transitive + description: + name: mongo_dart_query + sha256: "7a0f3981c3d1df467040e5654696cb0bfde6ec6db86ba313118fb3e873cee657" + url: "https://pub.flutter-io.cn" + source: hosted + version: "5.0.2" + mongows: + dependency: transitive + description: + path: "." + ref: main + resolved-ref: "7302210bd91f839b7ed63c6aa94af6c75f25c67a" + url: "https://git.wslpc.real.he-info.cn:94/r/mongows.git" + source: git + version: "0.10.3" + mqtt5_client: + dependency: transitive + description: + name: mqtt5_client + sha256: "9e15d1cd888035bcd5b204325c6678b32858ea3fc94bc1e41d5aa99d3a43f49f" + url: "https://pub.flutter-io.cn" + source: hosted + version: "4.11.0" + native_device_orientation: + dependency: transitive + description: + name: native_device_orientation + sha256: "744a03030fad5a332a54833cd34f1e2ee51ae9acf477b4ef85bacc8823af9937" + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.2.1" + nested: + dependency: transitive + description: + name: nested + sha256: "03bac4c528c64c95c722ec99280375a6f2fc708eec17c7b3f07253b626cd2a20" + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.0.0" + octo_image: + dependency: transitive + description: + name: octo_image + sha256: "34faa6639a78c7e3cbe79be6f9f96535867e879748ade7d17c9b1ae7536293bd" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.1.0" + package_config: + dependency: transitive + description: + name: package_config + sha256: f096c55ebb7deb7e384101542bfba8c52696c1b56fca2eb62827989ef2353bbc + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.2.0" + package_info_plus: + dependency: transitive + description: + name: package_info_plus + sha256: "7976bfe4c583170d6cdc7077e3237560b364149fcd268b5f53d95a991963b191" + url: "https://pub.flutter-io.cn" + source: hosted + version: "8.3.0" + package_info_plus_platform_interface: + dependency: transitive + description: + name: package_info_plus_platform_interface + sha256: "6c935fb612dff8e3cc9632c2b301720c77450a126114126ffaafe28d2e87956c" + url: "https://pub.flutter-io.cn" + source: hosted + version: "3.2.0" + packages_extensions: + dependency: transitive + description: + name: packages_extensions + sha256: "268108a92be955e33a58cf6492e289e43ef55a50c89fa64947f032f5cefeb3fc" + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.1.0" + page_transition: + dependency: transitive + description: + name: page_transition + sha256: "9d2a780d7d68b53ae82fbcc43e06a16195e6775e9aae40e55dc0cbb593460f9d" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.2.1" path: dependency: transitive description: @@ -139,11 +1150,403 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "1.9.0" + path_parsing: + dependency: transitive + description: + name: path_parsing + sha256: "883402936929eac138ee0a45da5b0f2c80f89913e6dc3bf77eb65b84b409c6ca" + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.1.0" + path_provider: + dependency: transitive + description: + name: path_provider + sha256: "50c5dd5b6e1aaf6fb3a78b33f6aa3afca52bf903a8a5298f53101fdaee55bbcd" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.1.5" + path_provider_android: + dependency: transitive + description: + name: path_provider_android + sha256: "4adf4fd5423ec60a29506c76581bc05854c55e3a0b72d35bb28d661c9686edf2" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.2.15" + path_provider_foundation: + dependency: transitive + description: + name: path_provider_foundation + sha256: "4843174df4d288f5e29185bd6e72a6fbdf5a4a4602717eed565497429f179942" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.4.1" + path_provider_linux: + dependency: transitive + description: + name: path_provider_linux + sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279 + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.2.1" + path_provider_platform_interface: + dependency: transitive + description: + name: path_provider_platform_interface + sha256: "88f5779f72ba699763fa3a3b06aa4bf6de76c8e5de842cf6f29e2e06476c2334" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.1.2" + path_provider_windows: + dependency: transitive + description: + name: path_provider_windows + sha256: bd6f00dbd873bfb70d0761682da2b3a2c2fccc2b9e84c495821639601d81afe7 + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.3.0" + percent_indicator: + dependency: transitive + description: + name: percent_indicator + sha256: "157d29133bbc6ecb11f923d36e7960a96a3f28837549a20b65e5135729f0f9fd" + url: "https://pub.flutter-io.cn" + source: hosted + version: "4.2.5" + petitparser: + dependency: transitive + description: + name: petitparser + sha256: c15605cd28af66339f8eb6fbe0e541bfe2d1b72d5825efc6598f3e0a31b9ad27 + url: "https://pub.flutter-io.cn" + source: hosted + version: "6.0.2" + photo_view: + dependency: transitive + description: + name: photo_view + sha256: "8036802a00bae2a78fc197af8a158e3e2f7b500561ed23b4c458107685e645bb" + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.14.0" + platform: + dependency: transitive + description: + name: platform + sha256: "5d6b1b0036a5f331ebc77c850ebc8506cbc1e9416c27e59b439f917a902a4984" + url: "https://pub.flutter-io.cn" + source: hosted + version: "3.1.6" + plugin_platform_interface: + dependency: transitive + description: + name: plugin_platform_interface + sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.1.8" + pointer_interceptor: + dependency: transitive + description: + name: pointer_interceptor + sha256: "57210410680379aea8b1b7ed6ae0c3ad349bfd56fe845b8ea934a53344b9d523" + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.10.1+2" + pointer_interceptor_ios: + dependency: transitive + description: + name: pointer_interceptor_ios + sha256: a6906772b3205b42c44614fcea28f818b1e5fdad73a4ca742a7bd49818d9c917 + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.10.1" + pointer_interceptor_platform_interface: + dependency: transitive + description: + name: pointer_interceptor_platform_interface + sha256: "0597b0560e14354baeb23f8375cd612e8bd4841bf8306ecb71fcd0bb78552506" + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.10.0+1" + pointer_interceptor_web: + dependency: transitive + description: + name: pointer_interceptor_web + sha256: "7a7087782110f8c1827170660b09f8aa893e0e9a61431dbbe2ac3fc482e8c044" + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.10.2+1" + pointycastle: + dependency: transitive + description: + name: pointycastle + sha256: "4be0097fcf3fd3e8449e53730c631200ebc7b88016acecab2b0da2f0149222fe" + url: "https://pub.flutter-io.cn" + source: hosted + version: "3.9.1" + pool: + dependency: transitive + description: + name: pool + sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a" + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.5.1" + postgrest: + dependency: transitive + description: + name: postgrest + sha256: b74dc0f57b5dca5ce9f57a54b08110bf41d6fc8a0483c0fec10c79e9aa0fb2bb + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.4.1" + power_extensions: + dependency: transitive + description: + name: power_extensions + sha256: ad0e8b2420090d996fe8b7fd32cdf02b9b924b6d4fc0fb0b559ff6aa5e24d5b0 + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.2.3" + protobuf: + dependency: transitive + description: + name: protobuf + sha256: fbb0c37d435641d0b84813c1dad41e6fa61ddc880a320bce16b3063ecec35aa6 + url: "https://pub.flutter-io.cn" + source: hosted + version: "4.0.0" + provider: + dependency: transitive + description: + name: provider + sha256: "489024f942069c2920c844ee18bb3d467c69e48955a4f32d1677f71be103e310" + url: "https://pub.flutter-io.cn" + source: hosted + version: "6.1.4" + pub_semver: + dependency: transitive + description: + name: pub_semver + sha256: "5bfcf68ca79ef689f8990d1160781b4bad40a3bd5e5218ad4076ddb7f4081585" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.2.0" + pubspec_parse: + dependency: transitive + description: + name: pubspec_parse + sha256: "81876843eb50dc2e1e5b151792c9a985c5ed2536914115ed04e9c8528f6647b0" + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.4.0" + qr: + dependency: transitive + description: + name: qr + sha256: "5a1d2586170e172b8a8c8470bbbffd5eb0cd38a66c0d77155ea138d3af3a4445" + url: "https://pub.flutter-io.cn" + source: hosted + version: "3.0.2" + rational: + dependency: transitive + description: + name: rational + sha256: cb808fb6f1a839e6fc5f7d8cb3b0a10e1db48b3be102de73938c627f0b636336 + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.2.3" + realtime_client: + dependency: transitive + description: + name: realtime_client + sha256: e3089dac2121917cc0c72d42ab056fea0abbaf3c2229048fc50e64bafc731adf + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.4.2" + redis: + dependency: transitive + description: + name: redis + sha256: "4a8218ef7b0642ff499147c7a105591208259e2f55f07db0101ace7f82f66cf9" + url: "https://pub.flutter-io.cn" + source: hosted + version: "4.0.0" + retry: + dependency: transitive + description: + name: retry + sha256: "822e118d5b3aafed083109c72d5f484c6dc66707885e07c0fbcb8b986bba7efc" + url: "https://pub.flutter-io.cn" + source: hosted + version: "3.1.2" + rfc_6901: + dependency: transitive + description: + name: rfc_6901 + sha256: df1bbfa3d023009598f19636d6114c6ac1e0b7bb7bf6a260f0e6e6ce91416820 + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.2.0" + rive: + dependency: transitive + description: + name: rive + sha256: ae75a6e9cfbf146630bfb1feba97ee582d935508be6b362e4bd197b9c55a6dd3 + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.12.4" + rive_common: + dependency: transitive + description: + name: rive_common + sha256: f4e20d0a99c5040c85624a3eb2b0b6b19e614d93a693c3bb25cf6e7bb2d3d6d3 + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.2.8" + rxdart: + dependency: transitive + description: + name: rxdart + sha256: "5c3004a4a8dbb94bd4bf5412a4def4acdaa12e12f269737a5751369e12d1a962" + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.28.0" + sasl_scram: + dependency: transitive + description: + name: sasl_scram + sha256: a47207a436eb650f8fdcf54a2e2587b850dc3caef9973ce01f332b07a6fc9cb9 + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.1.1" + saslprep: + dependency: transitive + description: + name: saslprep + sha256: "3d421d10be9513bf4459c17c5e70e7b8bc718c9fc5ad4ba5eb4f5fd27396f740" + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.0.3" + shared_preferences: + dependency: transitive + description: + name: shared_preferences + sha256: "6e8bf70b7fef813df4e9a36f658ac46d107db4b4cfe1048b477d4e453a8159f5" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.5.3" + shared_preferences_android: + dependency: transitive + description: + name: shared_preferences_android + sha256: "9f9f3d372d4304723e6136663bb291c0b93f5e4c8a4a6314347f481a33bda2b1" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.4.7" + shared_preferences_foundation: + dependency: transitive + description: + name: shared_preferences_foundation + sha256: "6a52cfcdaeac77cad8c97b539ff688ccfc458c007b4db12be584fbe5c0e49e03" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.5.4" + shared_preferences_linux: + dependency: transitive + description: + name: shared_preferences_linux + sha256: "580abfd40f415611503cae30adf626e6656dfb2f0cee8f465ece7b6defb40f2f" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.4.1" + shared_preferences_platform_interface: + dependency: transitive + description: + name: shared_preferences_platform_interface + sha256: "57cbf196c486bc2cf1f02b85784932c6094376284b3ad5779d1b1c6c6a816b80" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.4.1" + shared_preferences_web: + dependency: transitive + description: + name: shared_preferences_web + sha256: c49bd060261c9a3f0ff445892695d6212ff603ef3115edbb448509d407600019 + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.4.3" + shared_preferences_windows: + dependency: transitive + description: + name: shared_preferences_windows + sha256: "94ef0f72b2d71bc3e700e025db3710911bd51a71cefb65cc609dd0d9a982e3c1" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.4.1" + shelf: + dependency: transitive + description: + name: shelf + sha256: e7dd780a7ffb623c57850b33f43309312fc863fb6aa3d276a754bb299839ef12 + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.4.2" + shelf_router: + dependency: transitive + description: + name: shelf_router + sha256: f5e5d492440a7fb165fe1e2e1a623f31f734d3370900070b2b1e0d0428d59864 + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.1.4" + shelf_web_socket: + dependency: transitive + description: + name: shelf_web_socket + sha256: cc36c297b52866d203dbf9332263c94becc2fe0ceaa9681d07b6ef9807023b67 + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.0.1" + simple_gesture_detector: + dependency: transitive + description: + name: simple_gesture_detector + sha256: ba2cd5af24ff20a0b8d609cec3f40e5b0744d2a71804a2616ae086b9c19d19a3 + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.2.1" sky_engine: dependency: transitive description: flutter source: sdk version: "0.0.99" + smooth_page_indicator: + dependency: transitive + description: + name: smooth_page_indicator + sha256: b21ebb8bc39cf72d11c7cfd809162a48c3800668ced1c9da3aade13a32cf6c1c + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.2.1" + source_gen: + dependency: transitive + description: + name: source_gen + sha256: "14658ba5f669685cd3d63701d01b31ea748310f7ab854e471962670abcf57832" + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.5.0" + source_helper: + dependency: transitive + description: + name: source_helper + sha256: "86d247119aedce8e63f4751bd9626fc9613255935558447569ad42f9f5b48b3c" + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.3.5" source_span: dependency: transitive description: @@ -152,6 +1555,54 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "1.10.0" + sprintf: + dependency: transitive + description: + name: sprintf + sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23" + url: "https://pub.flutter-io.cn" + source: hosted + version: "7.0.0" + sqflite: + dependency: transitive + description: + name: sqflite + sha256: "2d7299468485dca85efeeadf5d38986909c5eb0cd71fd3db2c2f000e6c9454bb" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.4.1" + sqflite_android: + dependency: transitive + description: + name: sqflite_android + sha256: "78f489aab276260cdd26676d2169446c7ecd3484bbd5fead4ca14f3ed4dd9ee3" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.4.0" + sqflite_common: + dependency: transitive + description: + name: sqflite_common + sha256: "761b9740ecbd4d3e66b8916d784e581861fd3c3553eda85e167bc49fdb68f709" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.5.4+6" + sqflite_darwin: + dependency: transitive + description: + name: sqflite_darwin + sha256: "22adfd9a2c7d634041e96d6241e6e1c8138ca6817018afc5d443fef91dcefa9c" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.4.1+1" + sqflite_platform_interface: + dependency: transitive + description: + name: sqflite_platform_interface + sha256: "8dd4515c7bdcae0a785b0062859336de775e8c65db81ae33dd5445f35be61920" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.4.0" stack_trace: dependency: transitive description: @@ -160,6 +1611,22 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "1.11.1" + stop_watch_timer: + dependency: transitive + description: + name: stop_watch_timer + sha256: "86482d05a58bba03909781cd97683b91def80273e071a8cde6f9f423f59e291d" + url: "https://pub.flutter-io.cn" + source: hosted + version: "3.2.1" + storage_client: + dependency: transitive + description: + name: storage_client + sha256: "9f9ed283943313b23a1b27139bb18986e9b152a6d34530232c702c468d98e91a" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.3.1" stream_channel: dependency: transitive description: @@ -168,6 +1635,14 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "2.1.2" + stream_transform: + dependency: transitive + description: + name: stream_transform + sha256: ad47125e588cfd37a9a7f86c7d6356dde8dfe89d071d293f80ca9e9273a33871 + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.1.1" string_scanner: dependency: transitive description: @@ -176,6 +1651,62 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "1.2.0" + substring_highlight: + dependency: transitive + description: + name: substring_highlight + sha256: "96c61e8316098831f6bee87d2386617e4be6aaf87fbc89402dc049d371b67efb" + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.0.33" + supabase: + dependency: transitive + description: + name: supabase + sha256: c3ebddba69ddcf16d8b78e8c44c4538b0193d1cf944fde3b72eb5b279892a370 + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.6.3" + supabase_flutter: + dependency: transitive + description: + name: supabase_flutter + sha256: "3b5b5b492e342f63f301605d0c66f6528add285b5744f53c9fd9abd5ffdbce5b" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.8.4" + syncfusion_flutter_core: + dependency: transitive + description: + name: syncfusion_flutter_core + sha256: "325f519ce4ad8edd81811c21b853d72018529e353584490824da0555156ba076" + url: "https://pub.flutter-io.cn" + source: hosted + version: "27.2.5" + syncfusion_localizations: + dependency: "direct main" + description: + name: syncfusion_localizations + sha256: c08ffb408a7425b911538be8d607a00bac82cb3be8d24a1a6af7a531bd889db0 + url: "https://pub.flutter-io.cn" + source: hosted + version: "27.2.5" + synchronized: + dependency: transitive + description: + name: synchronized + sha256: "69fe30f3a8b04a0be0c15ae6490fc859a78ef4c43ae2dd5e8a623d45bfcf9225" + url: "https://pub.flutter-io.cn" + source: hosted + version: "3.3.0+3" + table_calendar: + dependency: transitive + description: + name: table_calendar + sha256: b2896b7c86adf3a4d9c911d860120fe3dbe03c85db43b22fd61f14ee78cdbb63 + url: "https://pub.flutter-io.cn" + source: hosted + version: "3.1.3" term_glyph: dependency: transitive description: @@ -192,6 +1723,150 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "0.7.2" + timeago: + dependency: transitive + description: + name: timeago + sha256: "054cedf68706bb142839ba0ae6b135f6b68039f0b8301cbe8784ae653d5ff8de" + url: "https://pub.flutter-io.cn" + source: hosted + version: "3.7.0" + timing: + dependency: transitive + description: + name: timing + sha256: "62ee18aca144e4a9f29d212f5a4c6a053be252b895ab14b5821996cff4ed90fe" + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.0.2" + typed_data: + dependency: transitive + description: + name: typed_data + sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006 + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.4.0" + universal_html: + dependency: transitive + description: + name: universal_html + sha256: "56536254004e24d9d8cfdb7dbbf09b74cf8df96729f38a2f5c238163e3d58971" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.2.4" + universal_io: + dependency: transitive + description: + name: universal_io + sha256: "1722b2dcc462b4b2f3ee7d188dad008b6eb4c40bbd03a3de451d82c78bba9aad" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.2.2" + unorm_dart: + dependency: transitive + description: + name: unorm_dart + sha256: "23d8bf65605401a6a32cff99435fed66ef3dab3ddcad3454059165df46496a3b" + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.3.0" + url_launcher: + dependency: transitive + description: + name: url_launcher + sha256: "9d06212b1362abc2f0f0d78e6f09f726608c74e3b9462e8368bb03314aa8d603" + url: "https://pub.flutter-io.cn" + source: hosted + version: "6.3.1" + url_launcher_android: + dependency: transitive + description: + name: url_launcher_android + sha256: "6fc2f56536ee873eeb867ad176ae15f304ccccc357848b351f6f0d8d4a40d193" + url: "https://pub.flutter-io.cn" + source: hosted + version: "6.3.14" + url_launcher_ios: + dependency: transitive + description: + name: url_launcher_ios + sha256: "7f2022359d4c099eea7df3fdf739f7d3d3b9faf3166fb1dd390775176e0b76cb" + url: "https://pub.flutter-io.cn" + source: hosted + version: "6.3.3" + url_launcher_linux: + dependency: transitive + description: + name: url_launcher_linux + sha256: "4e9ba368772369e3e08f231d2301b4ef72b9ff87c31192ef471b380ef29a4935" + url: "https://pub.flutter-io.cn" + source: hosted + version: "3.2.1" + url_launcher_macos: + dependency: transitive + description: + name: url_launcher_macos + sha256: "17ba2000b847f334f16626a574c702b196723af2a289e7a93ffcb79acff855c2" + url: "https://pub.flutter-io.cn" + source: hosted + version: "3.2.2" + url_launcher_platform_interface: + dependency: transitive + description: + name: url_launcher_platform_interface + sha256: "552f8a1e663569be95a8190206a38187b531910283c3e982193e4f2733f01029" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.3.2" + url_launcher_web: + dependency: transitive + description: + name: url_launcher_web + sha256: "772638d3b34c779ede05ba3d38af34657a05ac55b06279ea6edd409e323dca8e" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.3.3" + url_launcher_windows: + dependency: transitive + description: + name: url_launcher_windows + sha256: "3284b6d2ac454cf34f114e1d3319866fdd1e19cdc329999057e44ffe936cfa77" + url: "https://pub.flutter-io.cn" + source: hosted + version: "3.1.4" + uuid: + dependency: transitive + description: + name: uuid + sha256: a5be9ef6618a7ac1e964353ef476418026db906c4facdedaa299b7a2e71690ff + url: "https://pub.flutter-io.cn" + source: hosted + version: "4.5.1" + vector_graphics: + dependency: transitive + description: + name: vector_graphics + sha256: "44cc7104ff32563122a929e4620cf3efd584194eec6d1d913eb5ba593dbcf6de" + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.1.18" + vector_graphics_codec: + dependency: transitive + description: + name: vector_graphics_codec + sha256: "99fd9fbd34d9f9a32efd7b6a6aae14125d8237b10403b422a6a6dfeac2806146" + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.1.13" + vector_graphics_compiler: + dependency: transitive + description: + name: vector_graphics_compiler + sha256: "1b4b9e706a10294258727674a340ae0d6e64a7231980f9f9a3d12e4b42407aad" + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.1.16" vector_math: dependency: transitive description: @@ -208,6 +1883,142 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "14.2.5" + vy_string_utils: + dependency: transitive + description: + name: vy_string_utils + sha256: "03f4f2ebba283b32623459fa9c47d5c70e085253c7891f5ef7d4fd539c41c078" + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.4.6" + watcher: + dependency: transitive + description: + name: watcher + sha256: "69da27e49efa56a15f8afe8f4438c4ec02eff0a117df1b22ea4aad194fe1c104" + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.1.1" + web: + dependency: transitive + description: + name: web + sha256: "868d88a33d8a87b18ffc05f9f030ba328ffefba92d6c127917a2ba740f9cfe4a" + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.1.1" + web_socket: + dependency: transitive + description: + name: web_socket + sha256: "3c12d96c0c9a4eec095246debcea7b86c0324f22df69893d538fcc6f1b8cce83" + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.1.6" + web_socket_channel: + dependency: transitive + description: + name: web_socket_channel + sha256: "0b8e2457400d8a859b7b2030786835a28a8e80836ef64402abef392ff4f1d0e5" + url: "https://pub.flutter-io.cn" + source: hosted + version: "3.0.2" + webview_flutter: + dependency: transitive + description: + name: webview_flutter + sha256: ec81f57aa1611f8ebecf1d2259da4ef052281cb5ad624131c93546c79ccc7736 + url: "https://pub.flutter-io.cn" + source: hosted + version: "4.9.0" + webview_flutter_android: + dependency: transitive + description: + name: webview_flutter_android + sha256: "47a8da40d02befda5b151a26dba71f47df471cddd91dfdb7802d0a87c5442558" + url: "https://pub.flutter-io.cn" + source: hosted + version: "3.16.9" + webview_flutter_platform_interface: + dependency: transitive + description: + name: webview_flutter_platform_interface + sha256: d937581d6e558908d7ae3dc1989c4f87b786891ab47bb9df7de548a151779d8d + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.10.0" + webview_flutter_wkwebview: + dependency: transitive + description: + name: webview_flutter_wkwebview + sha256: c14455137ce60a68e1ccaf4e8f2dae8cebcb3465ddaa2fcfb57584fb7c5afe4d + url: "https://pub.flutter-io.cn" + source: hosted + version: "3.18.5" + webviewx_plus: + dependency: transitive + description: + name: webviewx_plus + sha256: "2a1cf0807b18eb6daeb2a5a7f0810fbebe6825e1a76c27714bc61e9ca94f3eb1" + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.5.1" + win32: + dependency: transitive + description: + name: win32 + sha256: daf97c9d80197ed7b619040e86c8ab9a9dad285e7671ee7390f9180cc828a51e + url: "https://pub.flutter-io.cn" + source: hosted + version: "5.10.1" + win32_registry: + dependency: transitive + description: + name: win32_registry + sha256: "21ec76dfc731550fd3e2ce7a33a9ea90b828fdf19a5c3bcf556fa992cfa99852" + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.1.5" + window_to_front: + dependency: transitive + description: + name: window_to_front + sha256: "7aef379752b7190c10479e12b5fd7c0b9d92adc96817d9e96c59937929512aee" + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.0.3" + xdg_directories: + dependency: transitive + description: + name: xdg_directories + sha256: "7a3f37b05d989967cdddcbb571f1ea834867ae2faa29725fd085180e0883aa15" + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.1.0" + xml: + dependency: transitive + description: + name: xml + sha256: b015a8ad1c488f66851d762d3090a21c600e479dc75e68328c52774040cf9226 + url: "https://pub.flutter-io.cn" + source: hosted + version: "6.5.0" + yaml: + dependency: transitive + description: + name: yaml + sha256: b9da305ac7c39faa3f030eccd175340f968459dae4af175130b3fc47e40d76ce + url: "https://pub.flutter-io.cn" + source: hosted + version: "3.1.3" + yet_another_json_isolate: + dependency: transitive + description: + name: yet_another_json_isolate + sha256: "56155e9e0002cc51ea7112857bbcdc714d4c35e176d43e4d3ee233009ff410c9" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.0.3" sdks: dart: ">=3.5.4 <4.0.0" - flutter: ">=3.18.0-18.0.pre.54" + flutter: ">=3.24.0" diff --git a/pubspec.yaml b/pubspec.yaml index b0df816..75a64a0 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,90 +1,60 @@ name: vbvs_app -description: "A new Flutter project." -# The following line prevents the package from being accidentally published to -# pub.dev using `flutter pub publish`. This is preferred for private packages. +description: "智慧睡眠APP" publish_to: 'none' # Remove this line if you wish to publish to pub.dev -# The following defines the version and build number for your application. -# A version number is three numbers separated by dots, like 1.2.43 -# followed by an optional build number separated by a +. -# Both the version and the builder number may be overridden in flutter -# build by specifying --build-name and --build-number, respectively. -# In Android, build-name is used as versionName while build-number used as versionCode. -# Read more about Android versioning at https://developer.android.com/studio/publish/versioning -# In iOS, build-name is used as CFBundleShortVersionString while build-number is used as CFBundleVersion. -# Read more about iOS versioning at -# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -# In Windows, build-name is used as the major, minor, and patch parts -# of the product and file versions while build-number is used as the build suffix. + version: 1.0.0+1 environment: sdk: ^3.5.4 -# Dependencies specify other packages that your package needs in order to work. -# To automatically upgrade your package dependencies to the latest versions -# consider running `flutter pub upgrade --major-versions`. Alternatively, -# dependencies can be manually updated by changing the version numbers below to -# the latest version available on pub.dev. To see which dependencies have newer -# versions available, run `flutter pub outdated`. dependencies: flutter: sdk: flutter - - - # The following adds the Cupertino Icons font to your application. - # Use with the CupertinoIcons class for iOS style icons. + ef: + git: + url: http://admin@git.real.he-info.cn:8080/r/ef.git + ref: main + get_storage: ^2.1.1 cupertino_icons: ^1.0.8 + flutter_svg: ^2.0.10+1 + EasyDartModule: + git: + url: http://git.real.he-info.cn:8080/r/~qmqz/EasyDartModule.git + ref: master + flutter_localization: ^0.3.1 + syncfusion_localizations: ^27.2.5 + flutterflow_ui: + git: + url: http://admin@git.real.he-info.cn:8080/r/~lu/flutterflow-ui.git + ref: master + lottie: ^3.2.0 + dev_dependencies: flutter_test: sdk: flutter - - # The "flutter_lints" package below contains a set of recommended lints to - # encourage good coding practices. The lint set provided by the package is - # activated in the `analysis_options.yaml` file located at the root of your - # package. See that file for information about deactivating specific lint - # rules and activating additional ones. flutter_lints: ^4.0.0 + build_runner: ^2.4.6 + json_serializable: ^6.8.0 + +dependency_overrides: + http_parser: ^4.1.0 + collection: ^1.19.0 + data_table_2: 2.5.16 # 2.5.17版本以后会报错,data_table_2.dart:525:47: Error:The method 'withValues' isn't defined ffor the class 'Color' -# For information on the generic Dart part of this file, see the -# following page: https://dart.dev/tools/pub/pubspec -# The following section is specific to Flutter packages. flutter: - - # The following line ensures that the Material Icons font is - # included with your application, so that you can use the icons in - # the material Icons class. uses-material-design: true + assets: + - assets/langs/ + - assets/images/ + - assets/images/toast/ + - assets/img/ + - assets/img/menu/ + - assets/img/icon/ + fonts: + - family: calculatrix + fonts: + - asset: assets/fonts/calculatrix.ttf - # To add assets to your application, add an assets section, like this: - # assets: - # - images/a_dot_burr.jpeg - # - images/a_dot_ham.jpeg - - # An image asset can refer to one or more resolution-specific "variants", see - # https://flutter.dev/to/resolution-aware-images - - # For details regarding adding assets from package dependencies, see - # https://flutter.dev/to/asset-from-package - - # To add custom fonts to your application, add a fonts section here, - # in this "flutter" section. Each entry in this list should have a - # "family" key with the font family name, and a "fonts" key with a - # list giving the asset and other descriptors for the font. For - # example: - # fonts: - # - family: Schyler - # fonts: - # - asset: fonts/Schyler-Regular.ttf - # - asset: fonts/Schyler-Italic.ttf - # style: italic - # - family: Trajan Pro - # fonts: - # - asset: fonts/TrajanPro.ttf - # - asset: fonts/TrajanPro_Bold.ttf - # weight: 700 - # - # For details regarding fonts from package dependencies, - # see https://flutter.dev/to/font-from-package diff --git a/test/widget_test.dart b/test/widget_test.dart index 3e6f984..fadab57 100644 --- a/test/widget_test.dart +++ b/test/widget_test.dart @@ -13,7 +13,7 @@ import 'package:vbvs_app/main.dart'; void main() { testWidgets('Counter increments smoke test', (WidgetTester tester) async { // Build our app and trigger a frame. - await tester.pumpWidget(const MyApp()); + await tester.pumpWidget(MyApp()); // Verify that our counter starts at 0. expect(find.text('0'), findsOneWidget); diff --git a/windows/flutter/generated_plugin_registrant.cc b/windows/flutter/generated_plugin_registrant.cc index 8b6d468..1008981 100644 --- a/windows/flutter/generated_plugin_registrant.cc +++ b/windows/flutter/generated_plugin_registrant.cc @@ -6,6 +6,21 @@ #include "generated_plugin_registrant.h" +#include +#include +#include +#include +#include void RegisterPlugins(flutter::PluginRegistry* registry) { + AppLinksPluginCApiRegisterWithRegistrar( + registry->GetRegistrarForPlugin("AppLinksPluginCApi")); + FlutterLocalizationPluginCApiRegisterWithRegistrar( + registry->GetRegistrarForPlugin("FlutterLocalizationPluginCApi")); + RivePluginRegisterWithRegistrar( + registry->GetRegistrarForPlugin("RivePlugin")); + UrlLauncherWindowsRegisterWithRegistrar( + registry->GetRegistrarForPlugin("UrlLauncherWindows")); + WindowToFrontPluginRegisterWithRegistrar( + registry->GetRegistrarForPlugin("WindowToFrontPlugin")); } diff --git a/windows/flutter/generated_plugins.cmake b/windows/flutter/generated_plugins.cmake index b93c4c3..9e2ce18 100644 --- a/windows/flutter/generated_plugins.cmake +++ b/windows/flutter/generated_plugins.cmake @@ -3,6 +3,11 @@ # list(APPEND FLUTTER_PLUGIN_LIST + app_links + flutter_localization + rive_common + url_launcher_windows + window_to_front ) list(APPEND FLUTTER_FFI_PLUGIN_LIST