This commit is contained in:
zhutao
2025-08-22 14:15:02 +08:00
parent 5853bdf004
commit 99a1ce601e
120 changed files with 5297 additions and 101 deletions

127
.gitignore vendored
View File

@@ -1,120 +1,45 @@
# ---> Flutter
# Miscellaneous
*.class
*.lock
*.log
*.pyc
*.swp
.DS_Store
.atom/
.build/
.buildlog/
.history
.svn/
.swiftpm/
migrate_working_dir/
# IntelliJ related
*.iml
*.ipr
*.iws
.idea/
# Flutter repo-specific
/bin/cache/
/bin/internal/bootstrap.bat
/bin/internal/bootstrap.sh
/bin/mingit/
/dev/benchmarks/mega_gallery/
/dev/bots/.recipe_deps
/dev/bots/android_tools/
/dev/devicelab/ABresults*.json
/dev/docs/doc/
/dev/docs/flutter.docs.zip
/dev/docs/lib/
/dev/docs/pubspec.yaml
/dev/integration_tests/**/xcuserdata
/dev/integration_tests/**/Pods
/packages/flutter/coverage/
version
analysis_benchmark.json
# packages file containing multi-root paths
.packages.generated
# The .vscode folder contains launch configuration and tasks you configure in
# VS Code which you may wish to be included in version control, so this line
# is commented out by default.
#.vscode/
# Flutter/Dart/Pub related
**/doc/api/
**/ios/Flutter/.last_build_id
.dart_tool/
.flutter-plugins
.flutter-plugins-dependencies
**/generated_plugin_registrant.dart
.packages
.pub-preload-cache/
.pub-cache/
.pub/
build/
flutter_*.png
linked_*.ds
unlinked.ds
unlinked_spec.ds
/build/
# Android related
**/android/**/gradle-wrapper.jar
.gradle/
**/android/captures/
**/android/gradlew
**/android/gradlew.bat
**/android/local.properties
**/android/**/GeneratedPluginRegistrant.java
**/android/key.properties
*.jks
# iOS/XCode related
**/ios/**/*.mode1v3
**/ios/**/*.mode2v3
**/ios/**/*.moved-aside
**/ios/**/*.pbxuser
**/ios/**/*.perspectivev3
**/ios/**/*sync/
**/ios/**/.sconsign.dblite
**/ios/**/.tags*
**/ios/**/.vagrant/
**/ios/**/DerivedData/
**/ios/**/Icon?
**/ios/**/Pods/
**/ios/**/.symlinks/
**/ios/**/profile
**/ios/**/xcuserdata
**/ios/.generated/
**/ios/Flutter/.last_build_id
**/ios/Flutter/App.framework
**/ios/Flutter/Flutter.framework
**/ios/Flutter/Flutter.podspec
**/ios/Flutter/Generated.xcconfig
**/ios/Flutter/ephemeral
**/ios/Flutter/app.flx
**/ios/Flutter/app.zip
**/ios/Flutter/flutter_assets/
**/ios/Flutter/flutter_export_environment.sh
**/ios/ServiceDefinitions.json
**/ios/Runner/GeneratedPluginRegistrant.*
# macOS
**/Flutter/ephemeral/
**/Pods/
**/macos/Flutter/GeneratedPluginRegistrant.swift
**/macos/Flutter/ephemeral
**/xcuserdata/
# Windows
**/windows/flutter/generated_plugin_registrant.cc
**/windows/flutter/generated_plugin_registrant.h
**/windows/flutter/generated_plugins.cmake
# Linux
**/linux/flutter/generated_plugin_registrant.cc
**/linux/flutter/generated_plugin_registrant.h
**/linux/flutter/generated_plugins.cmake
# Coverage
coverage/
# Symbols
# Symbolication related
app.*.symbols
# Exceptions to above rules.
!**/ios/**/default.mode1v3
!**/ios/**/default.mode2v3
!**/ios/**/default.pbxuser
!**/ios/**/default.perspectivev3
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
!/dev/ci/**/Gemfile.lock
# Obfuscation related
app.*.map.json
# Android Studio will place build artifacts here
/android/app/debug
/android/app/profile
/android/app/release

33
.metadata Normal file
View File

@@ -0,0 +1,33 @@
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
#
# This file should be version controlled and should not be manually edited.
version:
revision: "077b4a4ce10a07b82caa6897f0c626f9c0a3ac90"
channel: "stable"
project_type: app
# Tracks metadata for the flutter migrate command
migration:
platforms:
- platform: root
create_revision: 077b4a4ce10a07b82caa6897f0c626f9c0a3ac90
base_revision: 077b4a4ce10a07b82caa6897f0c626f9c0a3ac90
- platform: android
create_revision: 077b4a4ce10a07b82caa6897f0c626f9c0a3ac90
base_revision: 077b4a4ce10a07b82caa6897f0c626f9c0a3ac90
- platform: ios
create_revision: 077b4a4ce10a07b82caa6897f0c626f9c0a3ac90
base_revision: 077b4a4ce10a07b82caa6897f0c626f9c0a3ac90
# User provided section
# List of Local paths (relative to this file) that should be
# ignored by the migrate tool.
#
# Files that are not part of the templates will be ignored by default.
unmanaged_files:
- 'lib/main.dart'
- 'ios/Runner.xcodeproj/project.pbxproj'

30
analysis_options.yaml Normal file
View File

@@ -0,0 +1,30 @@
# This file configures the analyzer, which statically analyzes Dart code to
# check for errors, warnings, and lints.
#
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
# invoked from the command line by running `flutter analyze`.
# The following line activates a set of recommended lints for Flutter apps,
# packages, and plugins designed to encourage good coding practices.
include: package:flutter_lints/flutter.yaml
linter:
# The lint rules applied to this project can be customized in the
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
# included above or to enable additional rules. A list of all available lints
# and their documentation is published at https://dart.dev/lints.
#
# Instead of disabling a lint rule for the entire project in the
# section below, it can also be suppressed for a single line of code
# or a specific dart file by using the `// ignore: name_of_lint` and
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
# producing the lint.
rules:
# avoid_print: false # Uncomment to disable the `avoid_print` rule
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options
formatter:
trailing_commas: preserve

14
android/.gitignore vendored Normal file
View File

@@ -0,0 +1,14 @@
gradle-wrapper.jar
/.gradle
/captures/
/gradlew
/gradlew.bat
/local.properties
GeneratedPluginRegistrant.java
.cxx/
# Remember to never publicly share your keystore.
# See https://flutter.dev/to/reference-keystore
key.properties
**/*.keystore
**/*.jks

View File

@@ -0,0 +1,44 @@
plugins {
id("com.android.application")
id("kotlin-android")
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
id("dev.flutter.flutter-gradle-plugin")
}
android {
namespace = "com.curainhealth.derma"
compileSdk = flutter.compileSdkVersion
ndkVersion = "27.0.12077973"
compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_11.toString()
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId = "com.curainhealth.derma"
// 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
}
buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig = signingConfigs.getByName("debug")
}
}
}
flutter {
source = "../.."
}

View File

@@ -0,0 +1,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- The INTERNET permission is required for development. Specifically,
the Flutter tool needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
<uses-permission android:name="android.permission.INTERNET"/>
</manifest>

View File

@@ -0,0 +1,48 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- 网络权限-->
<uses-permission android:name="android.permission.INTERNET" />
<!-- 相机权限-->
<uses-permission android:name="android.permission.CAMERA" />
<application
android:name="${applicationName}"
android:icon="@mipmap/ic_launcher"
android:label="derma_flutter">
<activity
android:name=".MainActivity"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:exported="true"
android:hardwareAccelerated="true"
android:launchMode="singleTop"
android:taskAffinity=""
android:theme="@style/LaunchTheme"
android:windowSoftInputMode="adjustResize">
<!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user
while the Flutter UI initializes. After that, this theme continues
to determine the Window background behind the Flutter UI. -->
<meta-data
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<meta-data
android:name="flutterEmbedding"
android:value="2" />
</application>
<!-- Required to query activities that can process text, see:
https://developer.android.com/training/package-visibility and
https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT.
In particular, this is used by the Flutter engine in io.flutter.plugin.text.ProcessTextPlugin. -->
<queries>
<intent>
<action android:name="android.intent.action.PROCESS_TEXT" />
<data android:mimeType="text/plain" />
</intent>
</queries>
</manifest>

View File

@@ -0,0 +1,5 @@
package com.curainhealth.derma
import io.flutter.embedding.android.FlutterActivity
class MainActivity : FlutterActivity()

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Modify this file to customize your launch splash screen -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="?android:colorBackground" />
<!-- You can insert your own image assets here -->
<!-- <item>
<bitmap
android:gravity="center"
android:src="@mipmap/launch_image" />
</item> -->
</layer-list>

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Modify this file to customize your launch splash screen -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@android:color/white" />
<!-- You can insert your own image assets here -->
<!-- <item>
<bitmap
android:gravity="center"
android:src="@mipmap/launch_image" />
</item> -->
</layer-list>

Binary file not shown.

After

Width:  |  Height:  |  Size: 544 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 442 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 721 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
<!-- Show a splash screen on the activity. Automatically removed when
the Flutter engine draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item>
</style>
<!-- Theme applied to the Android Window as soon as the process has started.
This theme determines the color of the Android Window while your
Flutter UI initializes, as well as behind your Flutter UI while its
running.
This Theme is only used starting with V2 of Flutter's Android embedding. -->
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
<item name="android:windowBackground">?android:colorBackground</item>
</style>
</resources>

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
<style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
<!-- Show a splash screen on the activity. Automatically removed when
the Flutter engine draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item>
</style>
<!-- Theme applied to the Android Window as soon as the process has started.
This theme determines the color of the Android Window while your
Flutter UI initializes, as well as behind your Flutter UI while its
running.
This Theme is only used starting with V2 of Flutter's Android embedding. -->
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
<item name="android:windowBackground">?android:colorBackground</item>
</style>
</resources>

View File

@@ -0,0 +1,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- The INTERNET permission is required for development. Specifically,
the Flutter tool needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
<uses-permission android:name="android.permission.INTERNET"/>
</manifest>

21
android/build.gradle.kts Normal file
View File

@@ -0,0 +1,21 @@
allprojects {
repositories {
google()
mavenCentral()
}
}
val newBuildDir: Directory = rootProject.layout.buildDirectory.dir("../../build").get()
rootProject.layout.buildDirectory.value(newBuildDir)
subprojects {
val newSubprojectBuildDir: Directory = newBuildDir.dir(project.name)
project.layout.buildDirectory.value(newSubprojectBuildDir)
}
subprojects {
project.evaluationDependsOn(":app")
}
tasks.register<Delete>("clean") {
delete(rootProject.layout.buildDirectory)
}

View File

@@ -0,0 +1,3 @@
org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError
android.useAndroidX=true
android.enableJetifier=true

View File

@@ -0,0 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://mirrors.cloud.tencent.com/gradle/gradle-8.12-all.zip

View File

@@ -0,0 +1,25 @@
pluginManagement {
val flutterSdkPath = run {
val properties = java.util.Properties()
file("local.properties").inputStream().use { properties.load(it) }
val flutterSdkPath = properties.getProperty("flutter.sdk")
require(flutterSdkPath != null) { "flutter.sdk not set in local.properties" }
flutterSdkPath
}
includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}
plugins {
id("dev.flutter.flutter-plugin-loader") version "1.0.0"
id("com.android.application") version "8.7.3" apply false
id("org.jetbrains.kotlin.android") version "2.1.0" apply false
}
include(":app")

BIN
assets/image/apple.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
assets/image/bg_hushi.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 537 KiB

BIN
assets/image/empty_data.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

BIN
assets/image/google.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
assets/image/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

4
devtools_options.yaml Normal file
View File

@@ -0,0 +1,4 @@
description: This file stores settings for Dart & Flutter DevTools.
documentation: https://docs.flutter.dev/tools/devtools/extensions#configure-extension-enablement-states
extensions:
- provider: true

34
ios/.gitignore vendored Normal file
View File

@@ -0,0 +1,34 @@
**/dgph
*.mode1v3
*.mode2v3
*.moved-aside
*.pbxuser
*.perspectivev3
**/*sync/
.sconsign.dblite
.tags*
**/.vagrant/
**/DerivedData/
Icon?
**/Pods/
**/.symlinks/
profile
xcuserdata
**/.generated/
Flutter/App.framework
Flutter/Flutter.framework
Flutter/Flutter.podspec
Flutter/Generated.xcconfig
Flutter/ephemeral/
Flutter/app.flx
Flutter/app.zip
Flutter/flutter_assets/
Flutter/flutter_export_environment.sh
ServiceDefinitions.json
Runner/GeneratedPluginRegistrant.*
# Exceptions to above rules.
!default.mode1v3
!default.mode2v3
!default.pbxuser
!default.perspectivev3

View File

@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>App</string>
<key>CFBundleIdentifier</key>
<string>io.flutter.flutter.app</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>App</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>12.0</string>
</dict>
</plist>

View File

@@ -0,0 +1 @@
#include "Generated.xcconfig"

View File

@@ -0,0 +1 @@
#include "Generated.xcconfig"

View File

@@ -0,0 +1,616 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 54;
objects = {
/* Begin PBXBuildFile section */
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; };
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
331C8085294A63A400263BE5 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 97C146E61CF9000F007C117D /* Project object */;
proxyType = 1;
remoteGlobalIDString = 97C146ED1CF9000F007C117D;
remoteInfo = Runner;
};
/* End PBXContainerItemProxy section */
/* Begin PBXCopyFilesBuildPhase section */
9705A1C41CF9048500538489 /* Embed Frameworks */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = "<group>"; };
331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
97C146EB1CF9000F007C117D /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
331C8082294A63A400263BE5 /* RunnerTests */ = {
isa = PBXGroup;
children = (
331C807B294A618700263BE5 /* RunnerTests.swift */,
);
path = RunnerTests;
sourceTree = "<group>";
};
9740EEB11CF90186004384FC /* Flutter */ = {
isa = PBXGroup;
children = (
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
9740EEB21CF90195004384FC /* Debug.xcconfig */,
7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
9740EEB31CF90195004384FC /* Generated.xcconfig */,
);
name = Flutter;
sourceTree = "<group>";
};
97C146E51CF9000F007C117D = {
isa = PBXGroup;
children = (
9740EEB11CF90186004384FC /* Flutter */,
97C146F01CF9000F007C117D /* Runner */,
97C146EF1CF9000F007C117D /* Products */,
331C8082294A63A400263BE5 /* RunnerTests */,
);
sourceTree = "<group>";
};
97C146EF1CF9000F007C117D /* Products */ = {
isa = PBXGroup;
children = (
97C146EE1CF9000F007C117D /* Runner.app */,
331C8081294A63A400263BE5 /* RunnerTests.xctest */,
);
name = Products;
sourceTree = "<group>";
};
97C146F01CF9000F007C117D /* Runner */ = {
isa = PBXGroup;
children = (
97C146FA1CF9000F007C117D /* Main.storyboard */,
97C146FD1CF9000F007C117D /* Assets.xcassets */,
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
97C147021CF9000F007C117D /* Info.plist */,
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
);
path = Runner;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
331C8080294A63A400263BE5 /* RunnerTests */ = {
isa = PBXNativeTarget;
buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */;
buildPhases = (
331C807D294A63A400263BE5 /* Sources */,
331C807F294A63A400263BE5 /* Resources */,
);
buildRules = (
);
dependencies = (
331C8086294A63A400263BE5 /* PBXTargetDependency */,
);
name = RunnerTests;
productName = RunnerTests;
productReference = 331C8081294A63A400263BE5 /* RunnerTests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
97C146ED1CF9000F007C117D /* Runner */ = {
isa = PBXNativeTarget;
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
buildPhases = (
9740EEB61CF901F6004384FC /* Run Script */,
97C146EA1CF9000F007C117D /* Sources */,
97C146EB1CF9000F007C117D /* Frameworks */,
97C146EC1CF9000F007C117D /* Resources */,
9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
);
buildRules = (
);
dependencies = (
);
name = Runner;
productName = Runner;
productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
BuildIndependentTargetsInParallel = YES;
LastUpgradeCheck = 1510;
ORGANIZATIONNAME = "";
TargetAttributes = {
331C8080294A63A400263BE5 = {
CreatedOnToolsVersion = 14.0;
TestTargetID = 97C146ED1CF9000F007C117D;
};
97C146ED1CF9000F007C117D = {
CreatedOnToolsVersion = 7.3.1;
LastSwiftMigration = 1100;
};
};
};
buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
compatibilityVersion = "Xcode 9.3";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 97C146E51CF9000F007C117D;
productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
97C146ED1CF9000F007C117D /* Runner */,
331C8080294A63A400263BE5 /* RunnerTests */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
331C807F294A63A400263BE5 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
97C146EC1CF9000F007C117D /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
);
name = "Thin Binary";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
};
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Run Script";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
331C807D294A63A400263BE5 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
97C146EA1CF9000F007C117D /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
331C8086294A63A400263BE5 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 97C146ED1CF9000F007C117D /* Runner */;
targetProxy = 331C8085294A63A400263BE5 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin PBXVariantGroup section */
97C146FA1CF9000F007C117D /* Main.storyboard */ = {
isa = PBXVariantGroup;
children = (
97C146FB1CF9000F007C117D /* Base */,
);
name = Main.storyboard;
sourceTree = "<group>";
};
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
isa = PBXVariantGroup;
children = (
97C147001CF9000F007C117D /* Base */,
);
name = LaunchScreen.storyboard;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
249021D3217E4FDB00AE95B9 /* Profile */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
name = Profile;
};
249021D4217E4FDB00AE95B9 /* Profile */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = com.curainhealth.derma.dermaFlutter;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;
VERSIONING_SYSTEM = "apple-generic";
};
name = Profile;
};
331C8088294A63A400263BE5 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.curainhealth.derma.dermaFlutter.RunnerTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
};
name = Debug;
};
331C8089294A63A400263BE5 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.curainhealth.derma.dermaFlutter.RunnerTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
};
name = Release;
};
331C808A294A63A400263BE5 /* Profile */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.curainhealth.derma.dermaFlutter.RunnerTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
};
name = Profile;
};
97C147031CF9000F007C117D /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
97C147041CF9000F007C117D /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
name = Release;
};
97C147061CF9000F007C117D /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = com.curainhealth.derma.dermaFlutter;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
VERSIONING_SYSTEM = "apple-generic";
};
name = Debug;
};
97C147071CF9000F007C117D /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = com.curainhealth.derma.dermaFlutter;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;
VERSIONING_SYSTEM = "apple-generic";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
331C8088294A63A400263BE5 /* Debug */,
331C8089294A63A400263BE5 /* Release */,
331C808A294A63A400263BE5 /* Profile */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
isa = XCConfigurationList;
buildConfigurations = (
97C147031CF9000F007C117D /* Debug */,
97C147041CF9000F007C117D /* Release */,
249021D3217E4FDB00AE95B9 /* Profile */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
isa = XCConfigurationList;
buildConfigurations = (
97C147061CF9000F007C117D /* Debug */,
97C147071CF9000F007C117D /* Release */,
249021D4217E4FDB00AE95B9 /* Profile */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 97C146E61CF9000F007C117D /* Project object */;
}

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:">
</FileRef>
</Workspace>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PreviewsEnabled</key>
<false/>
</dict>
</plist>

View File

@@ -0,0 +1,101 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1510"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
customLLDBInitFile = "$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit"
shouldUseLaunchSchemeArgsEnv = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</MacroExpansion>
<Testables>
<TestableReference
skipped = "NO"
parallelizable = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "331C8080294A63A400263BE5"
BuildableName = "RunnerTests.xctest"
BlueprintName = "RunnerTests"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
customLLDBInitFile = "$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
enableGPUValidationMode = "1"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Profile"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "group:Runner.xcodeproj">
</FileRef>
</Workspace>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PreviewsEnabled</key>
<false/>
</dict>
</plist>

View File

@@ -0,0 +1,13 @@
import Flutter
import UIKit
@main
@objc class AppDelegate: FlutterAppDelegate {
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
GeneratedPluginRegistrant.register(with: self)
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
}

View File

@@ -0,0 +1,122 @@
{
"images" : [
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "Icon-App-20x20@2x.png",
"scale" : "2x"
},
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "Icon-App-20x20@3x.png",
"scale" : "3x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-App-29x29@1x.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-App-29x29@2x.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-App-29x29@3x.png",
"scale" : "3x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "Icon-App-40x40@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "Icon-App-40x40@3x.png",
"scale" : "3x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "Icon-App-60x60@2x.png",
"scale" : "2x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "Icon-App-60x60@3x.png",
"scale" : "3x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "Icon-App-20x20@1x.png",
"scale" : "1x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "Icon-App-20x20@2x.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "Icon-App-29x29@1x.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "Icon-App-29x29@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "Icon-App-40x40@1x.png",
"scale" : "1x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "Icon-App-40x40@2x.png",
"scale" : "2x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "Icon-App-76x76@1x.png",
"scale" : "1x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "Icon-App-76x76@2x.png",
"scale" : "2x"
},
{
"size" : "83.5x83.5",
"idiom" : "ipad",
"filename" : "Icon-App-83.5x83.5@2x.png",
"scale" : "2x"
},
{
"size" : "1024x1024",
"idiom" : "ios-marketing",
"filename" : "Icon-App-1024x1024@1x.png",
"scale" : "1x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 295 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 406 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 450 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 282 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 462 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 704 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 406 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 586 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 862 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 862 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 762 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@@ -0,0 +1,23 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "LaunchImage.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "LaunchImage@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "LaunchImage@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 B

View File

@@ -0,0 +1,5 @@
# Launch Screen Assets
You can customize the launch screen with your own desired assets by replacing the image files in this directory.
You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.

View File

@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12121" systemVersion="16G29" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="EHf-IW-A2E">
<objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="Ydg-fD-yQy"/>
<viewControllerLayoutGuide type="bottom" id="xbc-2k-c8Z"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" image="LaunchImage" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4">
</imageView>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="1a2-6s-vTC"/>
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="4X2-HB-R7a"/>
</constraints>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="53" y="375"/>
</scene>
</scenes>
<resources>
<image name="LaunchImage" width="168" height="185"/>
</resources>
</document>

View File

@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
</dependencies>
<scenes>
<!--Flutter View Controller-->
<scene sceneID="tne-QT-ifu">
<objects>
<viewController id="BYZ-38-t0r" customClass="FlutterViewController" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
</scene>
</scenes>
</document>

49
ios/Runner/Info.plist Normal file
View File

@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string>Derma Flutter</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>derma_flutter</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>$(FLUTTER_BUILD_NAME)</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>$(FLUTTER_BUILD_NUMBER)</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
</dict>
</plist>

View File

@@ -0,0 +1 @@
#import "GeneratedPluginRegistrant.h"

View File

@@ -0,0 +1,12 @@
import Flutter
import UIKit
import XCTest
class RunnerTests: XCTestCase {
func testExample() {
// If you add code to the Runner application, consider adding tests here.
// See https://developer.apple.com/documentation/xctest for more information about using XCTest.
}
}

View File

@@ -0,0 +1,33 @@
class ArticleDetailDto {
int? id;
String? title;
String? subtitle;
String? content;
int? status;
String? createdAt;
String? updatedAt;
ArticleDetailDto({this.id, this.title, this.subtitle, this.content, this.status, this.createdAt, this.updatedAt});
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map["id"] = id;
map["title"] = title;
map["subtitle"] = subtitle;
map["content"] = content;
map["status"] = status;
map["created_at"] = createdAt;
map["updated_at"] = updatedAt;
return map;
}
ArticleDetailDto.fromJson(dynamic json){
id = json["id"] ?? 0;
title = json["title"] ?? "";
subtitle = json["subtitle"] ?? "";
content = json["content"] ?? "";
status = json["status"] ?? 0;
createdAt = json["created_at"] ?? "";
updatedAt = json["updated_at"] ?? "";
}
}

View File

@@ -0,0 +1,25 @@
class ArticleDto {
int? id;
String? title;
String? subtitle;
ArticleDto({
this.id,
this.title,
this.subtitle,
});
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map["id"] = id;
map["title"] = title;
map["subtitle"] = subtitle;
return map;
}
ArticleDto.fromJson(dynamic json) {
id = json["id"] ?? 0;
title = json["title"] ?? "";
subtitle = json["subtitle"] ?? "";
}
}

15
lib/api/dto/base_dto.dart Normal file
View File

@@ -0,0 +1,15 @@
class ApiDto<T> {
final int code;
final String message;
final T data;
ApiDto({required this.code, required this.message, required this.data});
factory ApiDto.fromJson(Map<String, dynamic> json) {
return ApiDto<T>(
code: json['code'],
message: json['message'],
data: json['data'],
);
}
}

View File

@@ -0,0 +1,86 @@
class UserInfo {
int? id;
String? name;
dynamic avatar;
String? email;
dynamic emailVerifiedAt;
dynamic googleId;
dynamic appleId;
String? lastLoginIp;
String? lastLoginTime;
dynamic lastUsedTime;
int? status;
String? createdAt;
String? updatedAt;
UserInfo({
this.id,
this.name,
this.avatar,
this.email,
this.emailVerifiedAt,
this.googleId,
this.appleId,
this.lastLoginIp,
this.lastLoginTime,
this.lastUsedTime,
this.status,
this.createdAt,
this.updatedAt,
});
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map["id"] = id;
map["name"] = name;
map["avatar"] = avatar;
map["email"] = email;
map["email_verified_at"] = emailVerifiedAt;
map["google_id"] = googleId;
map["apple_id"] = appleId;
map["last_login_ip"] = lastLoginIp;
map["last_login_time"] = lastLoginTime;
map["last_used_time"] = lastUsedTime;
map["status"] = status;
map["created_at"] = createdAt;
map["updated_at"] = updatedAt;
return map;
}
UserInfo.fromJson(dynamic json) {
id = json["id"] ?? 0;
name = json["name"] ?? "";
avatar = json["avatar"];
email = json["email"] ?? "";
emailVerifiedAt = json["email_verified_at"];
googleId = json["google_id"];
appleId = json["apple_id"];
lastLoginIp = json["last_login_ip"] ?? "";
lastLoginTime = json["last_login_time"] ?? "";
lastUsedTime = json["last_used_time"];
status = json["status"] ?? 0;
createdAt = json["created_at"] ?? "";
updatedAt = json["updated_at"] ?? "";
}
}
class LoginDto {
String? accessToken;
UserInfo? userInfo;
LoginDto({this.accessToken, this.userInfo});
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map["accessToken"] = accessToken;
if (userInfo != null) {
map["userInfo"] = userInfo?.toJson();
}
return map;
}
LoginDto.fromJson(dynamic json) {
accessToken = json["accessToken"] ?? "";
userInfo = json["userInfo"] != null ? UserInfo.fromJson(json["userInfo"]) : null;
}
}

View File

@@ -0,0 +1,66 @@
import 'package:derma_flutter/api/dto/skin_check_dto.dart';
class RecordItemDto {
num? id;
num? userId;
String? imageUrl;
num? imageType;
num? skinStatus;
String? createdAt;
SkinCheckDto? result;
RecordItemDto({
this.id,
this.userId,
this.imageUrl,
this.imageType,
this.skinStatus,
this.createdAt,
this.result,
});
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map["id"] = id;
map["user_id"] = userId;
map["image_url"] = imageUrl;
map["image_type"] = imageType;
map["skin_status"] = skinStatus;
map["created_at"] = createdAt;
map["result"] = result?.toJson();
return map;
}
RecordItemDto.fromJson(dynamic json) {
id = json["id"] ?? 0;
userId = json["user_id"] ?? 0;
imageUrl = json["image_url"] ?? "";
imageType = json["image_type"] ?? 0;
skinStatus = json["skin_status"] ?? 0;
createdAt = json["created_at"] ?? "";
result = json["result"] != null ? SkinCheckDto.fromJson(json["result"]) : null;
}
}
class RecordListDto {
num? total;
List<RecordItemDto>? list;
RecordListDto({this.total, this.list});
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map["total"] = total;
if (list != null) {
map["list"] = list?.map((v) => v.toJson()).toList();
}
return map;
}
factory RecordListDto.fromJson(dynamic json) {
return RecordListDto(
total: json["total"] ?? 0,
list: (json["list"] as List<dynamic>? ?? []).map((v) => RecordItemDto.fromJson(v)).toList(),
);
}
}

View File

@@ -0,0 +1,39 @@
import '../../data/models/skin_check_status.dart';
class SkinCheckDto {
int? id;
int? score;
String? rating;
String? concise;
late List<String> tags;
late SkinCheckStatus skinStatus;
SkinCheckDto({
this.id,
this.skinStatus = SkinCheckStatus.unknown,
this.score,
this.rating,
this.concise,
this.tags = const [],
});
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map["id"] = id;
map["score"] = score;
map["rating"] = rating;
map["concise"] = concise;
map["tags"] = tags;
map["skin_status"] = skinStatus.value;
return map;
}
SkinCheckDto.fromJson(dynamic json) {
id = json["id"];
skinStatus = SkinCheckStatus.fromValue(json["skin_status"] ?? 0);
score = json["score"];
rating = json["rating"];
concise = json["concise"];
tags = (json["tags"] as List?)?.map((e) => e.toString()).toList() ?? [];
}
}

View File

@@ -0,0 +1,54 @@
import 'dart:convert';
import 'package:derma_flutter/api/dto/article_detail_dto.dart';
import 'package:derma_flutter/api/dto/record_list_dto.dart';
import 'package:derma_flutter/api/dto/skin_check_dto.dart';
import 'package:derma_flutter/api/network/request.dart';
import 'package:dio/dio.dart';
import '../dto/article_dto.dart';
///皮肤检测
Future<SkinCheckDto> skinDetectApi(String path) async {
FormData formData = FormData.fromMap({
"skin_image": await MultipartFile.fromFile(path),
});
var res = await Request().post("/skin/check", formData);
return SkinCheckDto.fromJson(res);
}
///提交联系邮箱
Future<void> skinContactApi(int id, String email) async {
await Request().post("/customer-health/submit-demand", {
"email": email,
"skin_check_record_id": id,
});
}
///皮肤检测记录
Future<RecordListDto> skinRecordApi({
int page = 1,
int pageSize = 20,
Map<String, dynamic>? query,
}) async {
var res = await Request().get("/skin/records", {
"search_params": jsonEncode(query),
"page": page,
"page_size": pageSize,
});
return RecordListDto.fromJson(res);
}
///获取文章列表
Future<List<ArticleDto>> articleListApi() async{
var res = await Request().get("/customer-health/get_articles");
return (res['list'] as List).map((e) => ArticleDto.fromJson(e)).toList();
}
///文章详情
Future<ArticleDetailDto> articleDetailApi(String id) async{
var res = await Request().get("/customer-health/get_article_detail", {
"id": id,
});
return ArticleDetailDto.fromJson(res);
}

View File

@@ -0,0 +1,50 @@
import 'package:derma_flutter/api/dto/login_dto.dart';
import 'package:derma_flutter/api/network/request.dart';
import 'package:derma_flutter/data/models/other_login_type.dart';
///检查是否注册
Future<bool> checkRegisterApi(String email) async {
var res = await Request().post("/auth/email_check", {
"email": email,
});
if (res["next"] == "login") {
return true;
}
return false;
// return res;
}
///邮箱密码登陆
Future<LoginDto> loginApi(String email, String password) async {
var res = await Request().post("/auth/login/account", {
"email": email,
"password": password,
});
return LoginDto.fromJson(res);
}
///注册处
Future<LoginDto> registerApi(String email, String password, String code) async {
var res = await Request().post("/auth/register", {
"email": email,
"password": password,
"email_code": code,
});
return LoginDto.fromJson(res);
}
///发送邮箱验证码
Future<void> sendEmailCodeApi(String email) async {
return Request().post("/send_email_code", {
"email": email,
});
}
///三方登录
Future<LoginDto> thirdLoginApi(String token, OtherLoginType type) async {
var res =await Request().post("/auth/login/oauth", {
"login_token": token,
"login_type": type.value,
});
return LoginDto.fromJson(res);
}

View File

@@ -0,0 +1,65 @@
import 'package:dio/dio.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import '../../providers/app_store.dart';
import '../dto/base_dto.dart';
///请求拦截器
void onRequest(
RequestOptions options,
RequestInterceptorHandler handler,
) async {
String token = await AppStore.getToken();
options.headers['Authorization'] = 'Bearer $token';
return handler.next(options);
}
///响应拦截器
void onResponse(
Response<dynamic> response,
ResponseInterceptorHandler handler,
) {
var apiResponse = ApiDto.fromJson(response.data);
if (apiResponse.code == 1) {
response.data = apiResponse.data;
return handler.next(response);
} else {
showError(apiResponse.message);
handler.reject(
DioException(
requestOptions: response.requestOptions,
response: response,
error: {'code': 0, 'message': apiResponse.message},
),
);
}
}
///错误响应
void onError(
DioException e,
ErrorInterceptorHandler handler,
) {
var title = "";
if (e.type == DioExceptionType.connectionTimeout) {
title = "请求超时";
} else if (e.type == DioExceptionType.badResponse) {
if (e.response?.statusCode == 404) {
title = "接口404不存在";
} else {
title = "500";
}
} else if (e.type == DioExceptionType.connectionError) {
title = "网络连接失败";
} else {
title = "异常其他错误";
}
showError(title);
handler.next(e);
}
///显示错误信息
void showError(String message) {
EasyLoading.showError(message);
}

View File

@@ -0,0 +1,44 @@
import 'package:dio/dio.dart';
import '../../config/env.dart';
import 'interceptor.dart';
class Request {
static final Request _instance = Request._internal();
static Dio _dio = Dio();
//返回单例
factory Request() {
return _instance;
}
//初始化
Request._internal() {
//创建基本配置
final BaseOptions options = BaseOptions(
baseUrl: Config.baseUrl(),
connectTimeout: const Duration(seconds: 30),
receiveTimeout: const Duration(seconds: 30),
);
_dio = Dio(options);
_dio.interceptors.add(InterceptorsWrapper(
onRequest: onRequest,
onResponse: onResponse,
onError: onError,
));
}
///get请求
Future<T> get<T>(String path, [Map<String, dynamic>? params]) async {
var res = await _dio.get(path, queryParameters: params);
return res.data;
}
///post请求
Future<dynamic> post(String path, Object? data) async {
var res = await _dio.post(path, data: data);
return res.data;
}
}

13
lib/api/network/safe.dart Normal file
View File

@@ -0,0 +1,13 @@
import 'package:dio/dio.dart';
/// 网络请求的错误处理封装
Future<T> safeRequest<T>(Future<T> request, {
void Function(DioException error)? onError,
}) async {
try {
return await request;
} on DioException catch (e) {
onError?.call(e); // 额外 hook
rethrow; // 继续往上传
}
}

View File

@@ -0,0 +1,22 @@
import 'package:flutter/material.dart';
class AppContext {
static late BuildContext _context;
AppContext._();
///私有构造函数,防止外部实例化
static void setContent(BuildContext context) {
_context = context;
}
///获取全局上下文
static BuildContext get context => _context;
///获取主题
static TextTheme get textTheme => Theme.of(_context).textTheme;
static ColorScheme get colorScheme => Theme.of(_context).colorScheme;
///页面内间距
static double get pagePadding => 15;
}

19
lib/config/env.dart Normal file
View File

@@ -0,0 +1,19 @@
///环境配置
class Config {
Config._();
///获取环境
static String getEnv() {
const env = String.fromEnvironment('ENV', defaultValue: 'dev');
return env;
}
///获取接口地址
static String baseUrl() {
if (getEnv() == 'dev') {
return 'https://skin-api.curain.ai/api';
} else {
return 'https://skin-api.curain.ai/api';
}
}
}

View File

@@ -0,0 +1,13 @@
import 'package:flutter/material.dart';
///扩展颜色
extension CustomColors on ColorScheme {
Color get success => const Color(0xff57be80);
Color get warning => const Color(0xffff9800);
Color get info => const Color(0xff909399);
Color get danger => const Color(0xfff44545);
}

View File

@@ -0,0 +1,28 @@
import 'package:flutter/material.dart';
///颜色
final scheme = ColorScheme.fromSeed(
primary: Color(0xff107870),
seedColor: Color(0xff107870),
brightness: Brightness.light,
//卡片色
surface: Colors.white,
surfaceContainerLow: Color(0xFFF4F8FB),
surfaceContainer: Color(0xFFE9ECF3),
surfaceContainerHigh: Color(0xFFDDE2EA),
//颜色
onSurfaceVariant:Color(0xFF828282)
);
///字体
final textTheme = TextTheme(
titleLarge: TextStyle(fontSize: 24, fontWeight: FontWeight.w700, color: scheme.onSurface),
titleMedium: TextStyle(fontSize: 20, fontWeight: FontWeight.w700, color: scheme.onSurface),
titleSmall: TextStyle(fontSize: 16, fontWeight: FontWeight.w700, color: scheme.onSurface),
bodyLarge: TextStyle(fontSize: 18),
bodyMedium: TextStyle(fontSize: 16),
bodySmall: TextStyle(fontSize: 14),
labelLarge: TextStyle(fontSize: 16, color: scheme.onSurfaceVariant),
labelMedium: TextStyle(fontSize: 14, color: scheme.onSurfaceVariant),
labelSmall: TextStyle(fontSize: 12, color: scheme.onSurfaceVariant),
);

View File

@@ -0,0 +1,50 @@
import 'dart:convert';
import 'package:shared_preferences/shared_preferences.dart';
class Storage {
//存储数据
static Future<void> set(String key, dynamic value) async {
SharedPreferences sp = await SharedPreferences.getInstance();
if (value is String) {
sp.setString(key, value);
} else if (value is int) {
sp.setInt(key, value);
} else if (value is bool) {
sp.setBool(key, value);
} else if (value is double) {
sp.setDouble(key, value);
} else if (value is Map) {
String jsonStr = jsonEncode(value);
sp.setString(key, jsonStr);
}
}
//获取数据
static Future<dynamic> get(String key) async {
SharedPreferences sp = await SharedPreferences.getInstance();
var value = sp.get(key);
if (value is String) {
try {
return jsonDecode(value);
} catch (e) {
return value;
}
}
return value;
}
//删除数据
static Future<void> remove(key) async {
SharedPreferences sp = await SharedPreferences.getInstance();
sp.remove(key);
}
//判断键是否存在
static Future<bool> hasKey(String key) async {
SharedPreferences sp = await SharedPreferences.getInstance();
return sp.containsKey(key);
}
}

View File

@@ -0,0 +1,7 @@
enum OtherLoginType {
google('google'),
apple('apple');
const OtherLoginType(this.value);
final String value;
}

View File

@@ -0,0 +1,22 @@
enum SkinCheckStatus {
/// 正常
normal(1),
/// 警告
warning(2),
/// 危险
danger(3),
/// 未知
unknown(0);
final int value;
const SkinCheckStatus(this.value);
/// 根据 int 值返回对应的枚举,默认返回 online
static SkinCheckStatus fromValue(int value) {
return SkinCheckStatus.values.firstWhere((e) => e.value == value, orElse: () => SkinCheckStatus.unknown);
}
}

View File

@@ -0,0 +1,69 @@
import 'package:derma_flutter/page/record/list/record_list_page.dart';
import 'package:flutter/material.dart';
import 'package:remixicon/remixicon.dart';
import '../page/education/list/education_list_page.dart';
import '../page/home/home_page.dart';
import 'tabbar.dart';
class LayoutPage extends StatefulWidget {
const LayoutPage({super.key});
@override
State<LayoutPage> createState() => _LayoutPageState();
}
class _LayoutPageState extends State<LayoutPage> {
///分页
final PageController _pageController = PageController(initialPage: 1);
int get currentPage {
if (!_pageController.hasClients) return 1; // 没 attach 直接 0
return _pageController.page?.round() ?? 1;
}
//tabbar列表
final List<PageItem> _pages = [
PageItem(
name: "record",
icon: RemixIcons.history_line,
page: RecordListPage(),
),
PageItem(
name: "Home",
icon: RemixIcons.home_2_line,
page: HomePage(),
),
PageItem(
name: "Home",
icon: RemixIcons.book_open_line,
page: EducationListPage(),
),
];
@override
Widget build(BuildContext context) {
return Scaffold(
body: PageView(
controller: _pageController,
physics: const NeverScrollableScrollPhysics(),
children: _pages.map((item) => item.page).toList(),
),
bottomNavigationBar: BottomNavigationBar(
currentIndex: currentPage,
onTap: (index) {
_pageController.jumpToPage(index);
setState(() {});
},
items: _pages.map((item) {
return BottomNavigationBarItem(
icon: Icon(item.icon),
label: item.name,
);
}).toList(),
showSelectedLabels: false,
showUnselectedLabels: false,
),
);
}
}

10
lib/layout/tabbar.dart Normal file
View File

@@ -0,0 +1,10 @@
import 'package:flutter/material.dart';
class PageItem {
final String name;
final IconData icon;
final Widget page;
PageItem({required this.name, required this.icon, required this.page});
}

55
lib/main.dart Normal file
View File

@@ -0,0 +1,55 @@
import 'package:derma_flutter/router/routes.dart';
import 'package:flutter/material.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:provider/provider.dart';
import 'config/theme/theme.dart';
import 'providers/app_store.dart';
void main() {
runApp(
MultiProvider(
providers: [
ChangeNotifierProvider(create: (context) => AppStore()),
],
child: MyApp(),
),
);
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return ScreenUtilInit(
designSize: const Size(375, 694),
useInheritedMediaQuery: true,
child: MaterialApp.router(
debugShowCheckedModeBanner: false,
routerConfig: goRouter,
localizationsDelegates: [],
themeMode: ThemeMode.light,
theme: ThemeData(
useMaterial3: true,
colorScheme: scheme,
elevatedButtonTheme: ElevatedButtonThemeData(
style: ElevatedButton.styleFrom(
backgroundColor: scheme.primary,
foregroundColor: scheme.onPrimary,
),
),
textTheme: textTheme,
scaffoldBackgroundColor: Color(0xffFAFAFE),
appBarTheme: AppBarTheme(
backgroundColor: scheme.surface,
scrolledUnderElevation: 0,
titleTextStyle: textTheme.titleMedium,
),
),
builder: EasyLoading.init(),
),
);
}
}

View File

@@ -0,0 +1,63 @@
import 'package:flutter/material.dart';
import 'package:markdown_widget/markdown_widget.dart';
import 'package:skeletonizer/skeletonizer.dart';
import '../../../api/dto/article_detail_dto.dart';
import '../../../api/endpoints/skin_api.dart';
class EducationDetailPage extends StatefulWidget {
final String id;
const EducationDetailPage({super.key, required this.id});
@override
State<EducationDetailPage> createState() => _EducationDetailPageState();
}
class _EducationDetailPageState extends State<EducationDetailPage> {
ArticleDetailDto? _detailDto;
bool _loading = true;
@override
void initState() {
super.initState();
_init();
}
void _init() async {
var res = await articleDetailApi(widget.id);
setState(() {
_detailDto = res;
_loading = false;
});
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(_detailDto?.title ?? ""),
),
body: Skeletonizer(
enabled: _loading,
child: _loading
? ListView.builder(
padding: EdgeInsets.all(15),
itemBuilder: (context, index) {
return Container(
margin: EdgeInsets.symmetric(vertical: 6),
height: 14,
width: double.infinity,
color: Colors.grey[300],
);
},
itemCount: 10,
)
: MarkdownWidget(
padding: EdgeInsets.all(15),
data: _detailDto?.content ?? "",
),
),
);
}
}

View File

@@ -0,0 +1,103 @@
import 'package:derma_flutter/api/dto/article_dto.dart';
import 'package:derma_flutter/api/endpoints/skin_api.dart';
import 'package:derma_flutter/widgets/common/app_backend.dart';
import 'package:derma_flutter/widgets/ui_kit/empty/index.dart';
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
import '../../../router/config/route_paths.dart';
class EducationListPage extends StatefulWidget {
const EducationListPage({super.key});
@override
State<EducationListPage> createState() => _EducationListPageState();
}
class _EducationListPageState extends State<EducationListPage> {
var _loading = false;
final List<ArticleDto> _list = [];
@override
void initState() {
super.initState();
_init();
}
void _init() async {
setState(() {
_loading = true;
});
var list = await articleListApi();
setState(() {
_list.clear();
_list.addAll(list);
_loading = false;
});
}
void _handToDetail(ArticleDto item) {
context.push(RoutePaths.articleDetail(item.id));
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("Skin Health Education"),
),
body: AppBackend(
child: SafeArea(
child: Visibility(
visible: !_loading && _list.isNotEmpty,
replacement: Empty(),
child: ListView.separated(
itemBuilder: (context, index) {
var item = _list[index];
return InkWell(
onTap: () {
_handToDetail(item);
},
child: Container(
padding: EdgeInsets.all(15),
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.surface,
borderRadius: BorderRadius.circular(10),
boxShadow: [
BoxShadow(
color: Color(0xffE9E9E9),
spreadRadius: 2,
blurRadius: 9,
offset: Offset(1, 2), // changes position of shadow
),
],
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(item.title ?? ''),
Container(
margin: EdgeInsets.only(top: 5),
child: Text(
item.subtitle ?? "",
style: Theme.of(context).textTheme.labelMedium,
),
),
],
),
),
);
},
separatorBuilder: (context, index) {
return Container(
height: 15,
);
},
itemCount: _list.length,
),
),
),
),
);
}
}

View File

@@ -0,0 +1,76 @@
import 'package:derma_flutter/router/config/route_paths.dart';
import 'package:file_picker/file_picker.dart';
import 'package:flutter/material.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:go_router/go_router.dart';
import 'package:image_picker/image_picker.dart';
import '../../api/endpoints/skin_api.dart';
import '../../widgets/common/app_backend.dart';
import '../../widgets/common/app_header.dart';
import 'widget/tip_widget.dart';
import 'widget/upload_widget.dart';
class HomePage extends StatefulWidget {
const HomePage({super.key});
@override
State<HomePage> createState() => _HomePageState();
}
class _HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin {
final ImagePicker _picker = ImagePicker();
///打开相机拍照
void _handTakePhoto() async {
var photo = await _picker.pickImage(source: ImageSource.camera);
if (photo != null) {
_startDetect(photo.path);
}
}
///选择图片
void _handPickImage() async {
var result = await FilePicker.platform.pickFiles(
type: FileType.image,
allowMultiple: false,
);
if (result != null) {
_startDetect(result.files[0].path!);
}
}
///开始检测
void _startDetect(String path) async {
EasyLoading.show(
status: 'Skin analysis in progress, please wait...',
maskType: EasyLoadingMaskType.clear,
);
var res = await skinDetectApi(path);
EasyLoading.dismiss();
context.push(RoutePaths.detail, extra: res);
}
@override
Widget build(BuildContext context) {
super.build(context);
return Scaffold(
resizeToAvoidBottomInset: false,
body: AppBackend(
child: Column(
children: [
AppHeader(),
UploadBox(
onPhoto: _handTakePhoto,
onSelect: _handPickImage,
),
TipBox(),
],
),
),
);
}
@override
bool get wantKeepAlive => true;
}

View File

@@ -0,0 +1,57 @@
import 'package:flutter/material.dart';
class TipBox extends StatelessWidget {
TipBox({super.key});
final List<String> tips = [
"Ensure good lighting",
"Keep the camera steady",
"Fill the frame with the skin area",
"Avoid shadows and glare",
];
@override
Widget build(BuildContext context) {
return Container(
width: double.infinity,
margin: EdgeInsets.only(top: 20),
padding: EdgeInsets.all(15),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
color: Theme.of(context).cardColor,
boxShadow: [
BoxShadow(
color: Color(0xffE9E9E9),
spreadRadius: 2,
blurRadius: 9,
offset: Offset(1, 2), // changes position of shadow
),
],
),
child: DefaultTextStyle(
style: TextStyle(color: Color(0xff1A8C8C)),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"Tips:",
style: Theme.of(context).textTheme.titleSmall?.copyWith(
color: Color(0xff1A8C8C),
),
),
ListView.builder(
itemExtent: 25,
shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
padding: EdgeInsets.all(10),
itemBuilder: (_, index) {
return Text("-${tips[index]}.");
},
itemCount: tips.length,
),
],
),
),
);
}
}

View File

@@ -0,0 +1,117 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
class UploadBox extends StatelessWidget {
final Function() onSelect;
final Function() onPhoto;
const UploadBox({
super.key,
required this.onSelect,
required this.onPhoto,
});
@override
Widget build(BuildContext context) {
return Container(
margin: EdgeInsets.only(top: 30),
width: double.infinity,
height: 350,
decoration: BoxDecoration(
color: Theme.of(context).cardColor,
borderRadius: BorderRadius.circular(10),
boxShadow: [
BoxShadow(
color: Color(0xffE9E9E9),
spreadRadius: 2,
blurRadius: 9,
offset: Offset(1, 2), // changes position of shadow
),
],
),
child: Stack(
children: [
Positioned(
bottom: 0,
left: 0,
child: Image.asset(
"assets/image/bg_hushi.png",
width: 0.7.sw,
),
),
Positioned(
left: 0,
top: 0,
right: 0,
child: Container(
padding: EdgeInsets.all(15),
child: Text(
"Take a clear photo of the skin area youd like to analyze.Our AI will provide instant health insights.",
style: Theme.of(context).textTheme.labelSmall,
),
),
),
SizedBox(
width: double.infinity,
child: Column(
spacing: 20,
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
"Analyze Your Skin",
style: Theme.of(context).textTheme.titleMedium,
),
_btn(
colors: [Color(0xff107870), Color(0xff1EDECF)],
title: "Take photo",
onTap: (){
onPhoto();
},
),
_btn(
colors: [Color(0xffFFFFFF), Color(0xffC6C6C6)],
title: "Upload Photo",
textColor: Color(0xff000000),
onTap: (){
onSelect();
},
),
],
),
),
],
),
);
}
}
Widget _btn({
required List<Color> colors,
Color textColor = Colors.white,
required String title,
required Function() onTap,
}) {
return InkWell(
onTap: onTap,
child: Container(
width: 120,
height: 38,
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
gradient: LinearGradient(
colors: colors,
),
),
child: Text(
title,
style: TextStyle(
fontSize: 14,
color: textColor,
fontWeight: FontWeight.w700,
),
),
),
);
}

View File

@@ -0,0 +1,63 @@
import 'package:derma_flutter/api/dto/skin_check_dto.dart';
import 'package:derma_flutter/data/models/skin_check_status.dart';
import 'package:derma_flutter/page/record/detail/widget/error_box.dart';
import 'package:derma_flutter/page/record/detail/widget/warning_box.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'widget/success_box.dart';
class RecordDetailPage extends StatefulWidget {
final SkinCheckDto data;
// final String id;
const RecordDetailPage({super.key, required this.data});
@override
State<RecordDetailPage> createState() => _RecordDetailPageState();
}
class _RecordDetailPageState extends State<RecordDetailPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
resizeToAvoidBottomInset: false,
appBar: AppBar(
backgroundColor: Colors.transparent,
systemOverlayStyle: const SystemUiOverlayStyle(
statusBarIconBrightness: Brightness.dark,
),
),
body: Container(
width: double.infinity,
padding: EdgeInsets.only(left: 15, right: 15, top: 0.05.sh, bottom: 15),
child: Column(
children: [
Expanded(
child: Builder(
builder: (context) {
switch (widget.data.skinStatus) {
case SkinCheckStatus.normal:
return SuccessBox(data: widget.data);
case SkinCheckStatus.warning:
return WarningBox(
data: widget.data,
);
case SkinCheckStatus.danger:
return ErrorBox(
data: widget.data,
);
case SkinCheckStatus.unknown:
return SizedBox();
}
},
),
),
],
),
),
);
}
}

View File

@@ -0,0 +1,88 @@
import 'package:flutter/material.dart';
class StatusBox extends StatelessWidget {
final Color color;
final IconData icon;
final String title;
final String desc;
const StatusBox({
super.key,
required this.color,
required this.icon,
required this.title,
required this.desc,
});
@override
Widget build(BuildContext context) {
return Column(
children: [
Container(
width: 80,
height: 80,
decoration: BoxDecoration(
color: color,
shape: BoxShape.circle,
),
child: Icon(
icon,
color: Colors.white,
size: 50,
),
),
Container(
margin: const EdgeInsets.only(top: 10),
child: Text(
title,
style: Theme.of(context).textTheme.titleMedium?.copyWith(
color: color,
),
),
),
Container(
margin: const EdgeInsets.only(top: 5),
child: Text(
desc,
style: Theme.of(context).textTheme.labelMedium,
),
),
],
);
}
}
class CardBox extends StatelessWidget {
final Widget child;
const CardBox({
super.key,
required this.child,
});
@override
Widget build(BuildContext context) {
return Container(
width: double.infinity,
padding: const EdgeInsets.all(15),
margin: const EdgeInsets.only(top: 15),
decoration: BoxDecoration(
color: Theme.of(context).cardColor,
borderRadius: BorderRadius.circular(10),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
margin: const EdgeInsets.only(bottom: 10),
child: Text(
"Detected Signs:",
style: Theme.of(context).textTheme.titleSmall,
),
),
child
],
),
);
}
}

View File

@@ -0,0 +1,45 @@
import 'package:derma_flutter/api/dto/skin_check_dto.dart';
import 'package:derma_flutter/config/theme/custom_colors.dart';
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
import 'package:remixicon/remixicon.dart';
import 'common_box.dart';
class ErrorBox extends StatefulWidget {
final SkinCheckDto data;
const ErrorBox({super.key, required this.data});
@override
State<ErrorBox> createState() => _ErrorBoxState();
}
class _ErrorBoxState extends State<ErrorBox> {
void _handBack() {
context.pop();
}
@override
Widget build(BuildContext context) {
return Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
StatusBox(
color: Theme.of(context).colorScheme.error,
icon: RemixIcons.alert_fill,
title: "Need to see a doctor",
desc: "Your skin shows signs of concern that require attention.Please visit the hospital for examination immediately.",
),
Container(
width: double.infinity,
height: 45,
margin: const EdgeInsets.only(top: 50),
child: ElevatedButton(
onPressed: _handBack,
child: Text("Know"),
),
),
],
);
}
}

View File

@@ -0,0 +1,67 @@
import 'package:derma_flutter/api/dto/skin_check_dto.dart';
import 'package:derma_flutter/config/theme/custom_colors.dart';
import 'package:derma_flutter/page/record/detail/widget/common_box.dart';
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
import 'package:remixicon/remixicon.dart';
class SuccessBox extends StatefulWidget {
final SkinCheckDto data;
const SuccessBox({super.key, required this.data});
@override
State<SuccessBox> createState() => _SuccessBoxState();
}
class _SuccessBoxState extends State<SuccessBox> {
void _handBack() {
context.pop();
}
@override
Widget build(BuildContext context) {
return Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
StatusBox(
color: Theme.of(context).colorScheme.success,
icon: RemixIcons.check_fill,
title: "Healthy Skin",
desc: "Your skin appears to be in good condition.",
),
CardBox(
child: Wrap(
spacing: 10,
runSpacing: 10,
children: widget.data.tags.map((item) {
return Container(
padding: EdgeInsets.symmetric(vertical: 3, horizontal: 10),
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.success.withValues(alpha: 0.3),
borderRadius: BorderRadius.circular(50),
),
child: Text(
item,
style: TextStyle(
color: Theme.of(context).colorScheme.success,
),
),
);
}).toList(),
),
),
Container(
width: double.infinity,
height: 45,
margin: const EdgeInsets.only(top: 50),
child: ElevatedButton(
onPressed: _handBack,
child: Text("Return"),
),
),
],
);
}
}

View File

@@ -0,0 +1,93 @@
import 'package:derma_flutter/api/dto/skin_check_dto.dart';
import 'package:derma_flutter/api/endpoints/skin_api.dart';
import 'package:derma_flutter/config/theme/custom_colors.dart';
import 'package:flutter/material.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:go_router/go_router.dart';
import 'package:remixicon/remixicon.dart';
import 'common_box.dart';
class WarningBox extends StatefulWidget {
final SkinCheckDto data;
const WarningBox({super.key, required this.data});
@override
State<WarningBox> createState() => _WarningBoxState();
}
class _WarningBoxState extends State<WarningBox> {
final _emailController = TextEditingController();
///提交
void _handSubmit() async {
if (_emailController.text.isEmpty) {
EasyLoading.showToast("Contact email is required");
return;
}
EasyLoading.show(status: 'Sending request...');
await skinContactApi(widget.data.id!, _emailController.text);
EasyLoading.dismiss();
context.pop();
}
@override
Widget build(BuildContext context) {
return GestureDetector(
onTap: () => FocusScope.of(context).unfocus(),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
StatusBox(
color: Theme.of(context).colorScheme.warning,
icon: RemixIcons.error_warning_fill,
title: "Troubled Skin",
desc: widget.data.concise ?? "",
),
Container(
width: double.infinity,
margin: const EdgeInsets.only(top: 20),
child: Text(
"Find out more:",
style: Theme.of(context).textTheme.titleSmall,
),
),
Container(
width: double.infinity,
margin: const EdgeInsets.only(top: 10),
child: Text(
"We will contact you shortly.Please check your e-mail promptly for further information.",
),
),
Container(
width: double.infinity,
margin: const EdgeInsets.only(top: 10),
child: Text(
"Please confirm/enter your e-mail address:",
),
),
Container(
width: double.infinity,
margin: const EdgeInsets.only(top: 15),
child: TextField(
controller: _emailController,
decoration: InputDecoration(
hintText: "Email",
),
),
),
Container(
width: double.infinity,
margin: const EdgeInsets.only(top: 60),
height: 45,
child: ElevatedButton(
onPressed: _handSubmit,
child: Text("Continue"),
),
),
],
),
);
}
}

View File

@@ -0,0 +1,151 @@
import 'package:derma_flutter/api/dto/record_list_dto.dart';
import 'package:derma_flutter/api/endpoints/skin_api.dart';
import 'package:flutter/material.dart';
import '../../../widgets/ui_kit/empty/index.dart';
import 'widget/item_widget.dart';
class RecordListPage extends StatefulWidget {
const RecordListPage({super.key});
@override
State<RecordListPage> createState() => _RecordListPageState();
}
class _RecordListPageState extends State<RecordListPage> with TickerProviderStateMixin, AutomaticKeepAliveClientMixin {
//tab
late TabController _tabController;
List<TabItem> tabList = [
TabItem(name: "All", value: 0),
TabItem(name: "Healthy", value: 1),
TabItem(name: "Unhealthy", value: 2),
];
//列表
List<RecordItemDto> _recordList = [];
var _isEnd = false;
var _isLoading = false;
///滚动监听器
final ScrollController _scrollController = ScrollController();
@override
void initState() {
super.initState();
_tabController = TabController(length: tabList.length, vsync: this);
_tabController.addListener(_onTabChange);
_scrollController.addListener(_onScroll);
_onRefresh();
}
///监听列表滚动
void _onScroll() {
final maxExtent = _scrollController.position.maxScrollExtent;
final current = _scrollController.position.pixels;
const threshold = 15;
if (current >= maxExtent - threshold) {
_fetchList();
}
}
///tab改变
void _onTabChange() {
if (!_tabController.indexIsChanging) {
_onRefresh();
}
}
///刷新
Future<void> _onRefresh() async {
_isEnd = false;
await _fetchList(refresh: true);
}
///获取数据
Future<void> _fetchList({bool refresh = false}) async {
const pageSize = 20;
int page = refresh ? 1 : (_recordList.length / pageSize).ceil() + 1;
if (!_isLoading && !_isEnd) {
setState(() => _isLoading = true);
var type = tabList[_tabController.index].value;
var res = await skinRecordApi(
page: page,
pageSize: pageSize,
query: {"skin_status": type},
);
setState(() {
_isEnd = res.list!.length < pageSize;
if (refresh) {
_recordList.clear();
}
_recordList.addAll(res.list!);
_isLoading = false;
});
}
}
@override
Widget build(BuildContext context) {
super.build(context);
return Scaffold(
appBar: AppBar(
title: Text("Analysis History"),
bottom: TabBar(
controller: _tabController,
dividerColor: Colors.transparent,
tabs: tabList.map((item) {
return Tab(text: item.name);
}).toList(),
),
),
body: RefreshIndicator(
onRefresh: () => _onRefresh(),
child: Visibility(
visible: !_isLoading && _recordList.isEmpty,
replacement: ListView(
controller: _scrollController,
padding: EdgeInsets.all(15),
children: [
..._recordList.map((item) {
return ItemWidget(data: item);
}),
Container(
margin: EdgeInsets.only(bottom: 10),
child: Visibility(
visible: _isLoading,
replacement: Center(child: Text("已加载完毕", style: Theme.of(context).textTheme.labelSmall)),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
SizedBox(
width: 12,
height: 12,
child: CircularProgressIndicator(
strokeWidth: 1,
color: Theme.of(context).colorScheme.onSurfaceVariant,
),
),
Text("加载中...", style: Theme.of(context).textTheme.labelSmall),
],
),
),
),
],
),
child: Empty(),
),
),
);
}
@override
bool get wantKeepAlive => true;
}
class TabItem {
final String name;
final int value;
const TabItem({required this.name, required this.value});
}

View File

@@ -0,0 +1,113 @@
import 'package:derma_flutter/api/dto/record_list_dto.dart';
import 'package:derma_flutter/config/theme/custom_colors.dart';
import 'package:derma_flutter/router/config/route_paths.dart';
import 'package:derma_flutter/utils/format.dart';
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
import 'package:remixicon/remixicon.dart';
class ItemWidget extends StatefulWidget {
final RecordItemDto data;
const ItemWidget({super.key, required this.data});
@override
State<ItemWidget> createState() => _ItemWidgetState();
}
class _ItemWidgetState extends State<ItemWidget> {
void _handToDetail() {
context.push(RoutePaths.detail, extra: widget.data.result);
}
@override
Widget build(BuildContext context) {
var color = Colors.black;
switch (widget.data.skinStatus) {
case 1:
color = Theme.of(context).colorScheme.success;
break;
case 2:
color = Theme.of(context).colorScheme.warning;
break;
case 3:
color = Theme.of(context).colorScheme.error;
break;
default:
color = Colors.black;
}
return InkWell(
onTap: _handToDetail,
child: Container(
padding: EdgeInsets.all(15),
margin: EdgeInsets.only(bottom: 15),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
color: Theme.of(context).colorScheme.surface,
boxShadow: [
BoxShadow(
color: Color(0xffE9E9E9),
spreadRadius: 2,
blurRadius: 9,
offset: Offset(1, 2), // changes position of shadow
),
],
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
margin: EdgeInsets.only(bottom: 10),
child: Text("Recent Analyses"),
),
Row(
spacing: 15,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
width: 80,
height: 80,
clipBehavior: Clip.hardEdge,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
),
child: Image.network(
widget.data.imageUrl!,
fit: BoxFit.cover,
errorBuilder: (context, error, stackTrace) {
return Container(
decoration: BoxDecoration(color: Theme.of(context).colorScheme.surfaceContainer),
child: Icon(RemixIcons.error_warning_fill),
);
},
),
),
Container(
padding: EdgeInsets.only(top: 5),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"health",
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w500, color: color),
),
Container(
margin: EdgeInsets.only(top: 5),
child: Text(
formatDateUS(widget.data.createdAt),
style: Theme.of(context).textTheme.labelSmall,
),
),
],
),
),
],
),
],
),
),
);
}
}

Some files were not shown because too many files have changed in this diff Show More