diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..29a3a50
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,43 @@
+# Miscellaneous
+*.class
+*.log
+*.pyc
+*.swp
+.DS_Store
+.atom/
+.buildlog/
+.history
+.svn/
+migrate_working_dir/
+
+# IntelliJ related
+*.iml
+*.ipr
+*.iws
+.idea/
+
+# 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
+.pub-cache/
+.pub/
+/build/
+
+# Symbolication related
+app.*.symbols
+
+# Obfuscation related
+app.*.map.json
+
+# Android Studio will place build artifacts here
+/android/app/debug
+/android/app/profile
+/android/app/release
diff --git a/.metadata b/.metadata
new file mode 100644
index 0000000..d044da8
--- /dev/null
+++ b/.metadata
@@ -0,0 +1,45 @@
+# 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: "dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668"
+ channel: "stable"
+
+project_type: app
+
+# Tracks metadata for the flutter migrate command
+migration:
+ platforms:
+ - platform: root
+ create_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
+ base_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
+ - platform: android
+ create_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
+ base_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
+ - platform: ios
+ create_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
+ base_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
+ - platform: linux
+ create_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
+ base_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
+ - platform: macos
+ create_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
+ base_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
+ - platform: web
+ create_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
+ base_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
+ - platform: windows
+ create_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
+ base_revision: dec2ee5c1f98f8e84a7d5380c05eb8a3d0a81668
+
+ # 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'
diff --git a/analysis_options.yaml b/analysis_options.yaml
new file mode 100644
index 0000000..0d29021
--- /dev/null
+++ b/analysis_options.yaml
@@ -0,0 +1,28 @@
+# 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
diff --git a/android/.gitignore b/android/.gitignore
new file mode 100644
index 0000000..55afd91
--- /dev/null
+++ b/android/.gitignore
@@ -0,0 +1,13 @@
+gradle-wrapper.jar
+/.gradle
+/captures/
+/gradlew
+/gradlew.bat
+/local.properties
+GeneratedPluginRegistrant.java
+
+# Remember to never publicly share your keystore.
+# See https://flutter.dev/to/reference-keystore
+key.properties
+**/*.keystore
+**/*.jks
diff --git a/android/app/build.gradle b/android/app/build.gradle
new file mode 100644
index 0000000..774cd5c
--- /dev/null
+++ b/android/app/build.gradle
@@ -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.example.kopikaocare"
+ compileSdk = flutter.compileSdkVersion
+ ndkVersion = flutter.ndkVersion
+
+ compileOptions {
+ sourceCompatibility = JavaVersion.VERSION_17
+ targetCompatibility = JavaVersion.VERSION_17
+}
+
+kotlinOptions {
+ jvmTarget = "17"
+}
+
+ defaultConfig {
+ // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
+ applicationId = "com.example.kopikaocare"
+ // 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.debug
+ }
+ }
+}
+
+flutter {
+ source = "../.."
+}
diff --git a/android/app/src/debug/AndroidManifest.xml b/android/app/src/debug/AndroidManifest.xml
new file mode 100644
index 0000000..399f698
--- /dev/null
+++ b/android/app/src/debug/AndroidManifest.xml
@@ -0,0 +1,7 @@
+
+
+
+
diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..276f4e4
--- /dev/null
+++ b/android/app/src/main/AndroidManifest.xml
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/android/app/src/main/kotlin/com/example/kopikaocare/MainActivity.kt b/android/app/src/main/kotlin/com/example/kopikaocare/MainActivity.kt
new file mode 100644
index 0000000..fcf1d4f
--- /dev/null
+++ b/android/app/src/main/kotlin/com/example/kopikaocare/MainActivity.kt
@@ -0,0 +1,5 @@
+package com.example.kopikaocare
+
+import io.flutter.embedding.android.FlutterActivity
+
+class MainActivity: FlutterActivity()
diff --git a/android/app/src/main/res/drawable-v21/launch_background.xml b/android/app/src/main/res/drawable-v21/launch_background.xml
new file mode 100644
index 0000000..f74085f
--- /dev/null
+++ b/android/app/src/main/res/drawable-v21/launch_background.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
diff --git a/android/app/src/main/res/drawable/launch_background.xml b/android/app/src/main/res/drawable/launch_background.xml
new file mode 100644
index 0000000..304732f
--- /dev/null
+++ b/android/app/src/main/res/drawable/launch_background.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
new file mode 100644
index 0000000..db77bb4
Binary files /dev/null and b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ
diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
new file mode 100644
index 0000000..17987b7
Binary files /dev/null and b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ
diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
new file mode 100644
index 0000000..09d4391
Binary files /dev/null and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ
diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
new file mode 100644
index 0000000..d5f1c8d
Binary files /dev/null and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ
diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
new file mode 100644
index 0000000..4d6372e
Binary files /dev/null and b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ
diff --git a/android/app/src/main/res/values-night/styles.xml b/android/app/src/main/res/values-night/styles.xml
new file mode 100644
index 0000000..06952be
--- /dev/null
+++ b/android/app/src/main/res/values-night/styles.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
diff --git a/android/app/src/main/res/values/styles.xml b/android/app/src/main/res/values/styles.xml
new file mode 100644
index 0000000..cb1ef88
--- /dev/null
+++ b/android/app/src/main/res/values/styles.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
diff --git a/android/app/src/profile/AndroidManifest.xml b/android/app/src/profile/AndroidManifest.xml
new file mode 100644
index 0000000..399f698
--- /dev/null
+++ b/android/app/src/profile/AndroidManifest.xml
@@ -0,0 +1,7 @@
+
+
+
+
diff --git a/android/build.gradle b/android/build.gradle
new file mode 100644
index 0000000..d2ffbff
--- /dev/null
+++ b/android/build.gradle
@@ -0,0 +1,18 @@
+allprojects {
+ repositories {
+ google()
+ mavenCentral()
+ }
+}
+
+rootProject.buildDir = "../build"
+subprojects {
+ project.buildDir = "${rootProject.buildDir}/${project.name}"
+}
+subprojects {
+ project.evaluationDependsOn(":app")
+}
+
+tasks.register("clean", Delete) {
+ delete rootProject.buildDir
+}
diff --git a/android/gradle.properties b/android/gradle.properties
new file mode 100644
index 0000000..2597170
--- /dev/null
+++ b/android/gradle.properties
@@ -0,0 +1,3 @@
+org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=2G -XX:+HeapDumpOnOutOfMemoryError
+android.useAndroidX=true
+android.enableJetifier=true
diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..efdcc4a
--- /dev/null
+++ b/android/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,5 @@
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-all.zip
diff --git a/android/settings.gradle b/android/settings.gradle
new file mode 100644
index 0000000..b64bd30
--- /dev/null
+++ b/android/settings.gradle
@@ -0,0 +1,25 @@
+pluginManagement {
+ def flutterSdkPath = {
+ def properties = new Properties()
+ file("local.properties").withInputStream { properties.load(it) }
+ def flutterSdkPath = properties.getProperty("flutter.sdk")
+ assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
+ return 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.9.1" apply false
+ id "org.jetbrains.kotlin.android" version "2.1.21" apply false
+}
+
+include ":app"
diff --git a/assets/about.gif b/assets/about.gif
new file mode 100644
index 0000000..40b726e
Binary files /dev/null and b/assets/about.gif differ
diff --git a/assets/coffe.jpg b/assets/coffe.jpg
new file mode 100644
index 0000000..3b1e1cd
Binary files /dev/null and b/assets/coffe.jpg differ
diff --git a/assets/gif/about.gif b/assets/gif/about.gif
new file mode 100644
index 0000000..40b726e
Binary files /dev/null and b/assets/gif/about.gif differ
diff --git a/assets/gif/history.gif b/assets/gif/history.gif
new file mode 100644
index 0000000..74a3249
Binary files /dev/null and b/assets/gif/history.gif differ
diff --git a/assets/gif/sensor.gif b/assets/gif/sensor.gif
new file mode 100644
index 0000000..74d1bd9
Binary files /dev/null and b/assets/gif/sensor.gif differ
diff --git a/assets/gif/settings.gif b/assets/gif/settings.gif
new file mode 100644
index 0000000..3337b2a
Binary files /dev/null and b/assets/gif/settings.gif differ
diff --git a/assets/history.gif b/assets/history.gif
new file mode 100644
index 0000000..74a3249
Binary files /dev/null and b/assets/history.gif differ
diff --git a/assets/logo.png b/assets/logo.png
new file mode 100644
index 0000000..c90a83e
Binary files /dev/null and b/assets/logo.png differ
diff --git a/assets/profile.jpg b/assets/profile.jpg
new file mode 100644
index 0000000..66bce6b
Binary files /dev/null and b/assets/profile.jpg differ
diff --git a/assets/sensor.gif b/assets/sensor.gif
new file mode 100644
index 0000000..74d1bd9
Binary files /dev/null and b/assets/sensor.gif differ
diff --git a/assets/settings.gif b/assets/settings.gif
new file mode 100644
index 0000000..3337b2a
Binary files /dev/null and b/assets/settings.gif differ
diff --git a/assets/suhu.gif b/assets/suhu.gif
new file mode 100644
index 0000000..5064023
Binary files /dev/null and b/assets/suhu.gif differ
diff --git a/flutter_01.png b/flutter_01.png
new file mode 100644
index 0000000..e69de29
diff --git a/flutter_02.png b/flutter_02.png
new file mode 100644
index 0000000..e69de29
diff --git a/ios/.gitignore b/ios/.gitignore
new file mode 100644
index 0000000..7a7f987
--- /dev/null
+++ b/ios/.gitignore
@@ -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
diff --git a/ios/Flutter/AppFrameworkInfo.plist b/ios/Flutter/AppFrameworkInfo.plist
new file mode 100644
index 0000000..7c56964
--- /dev/null
+++ b/ios/Flutter/AppFrameworkInfo.plist
@@ -0,0 +1,26 @@
+
+
+
+
+ CFBundleDevelopmentRegion
+ en
+ CFBundleExecutable
+ App
+ CFBundleIdentifier
+ io.flutter.flutter.app
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ App
+ CFBundlePackageType
+ FMWK
+ CFBundleShortVersionString
+ 1.0
+ CFBundleSignature
+ ????
+ CFBundleVersion
+ 1.0
+ MinimumOSVersion
+ 12.0
+
+
diff --git a/ios/Flutter/Debug.xcconfig b/ios/Flutter/Debug.xcconfig
new file mode 100644
index 0000000..592ceee
--- /dev/null
+++ b/ios/Flutter/Debug.xcconfig
@@ -0,0 +1 @@
+#include "Generated.xcconfig"
diff --git a/ios/Flutter/Release.xcconfig b/ios/Flutter/Release.xcconfig
new file mode 100644
index 0000000..592ceee
--- /dev/null
+++ b/ios/Flutter/Release.xcconfig
@@ -0,0 +1 @@
+#include "Generated.xcconfig"
diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj
new file mode 100644
index 0000000..ac43ee6
--- /dev/null
+++ b/ios/Runner.xcodeproj/project.pbxproj
@@ -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 = ""; };
+ 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; };
+ 331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; };
+ 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 = ""; };
+ 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; };
+ 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
+ 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
+ 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; };
+ 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; };
+ 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 = ""; };
+ 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
+ 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
+ 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
+/* 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 = "";
+ };
+ 9740EEB11CF90186004384FC /* Flutter */ = {
+ isa = PBXGroup;
+ children = (
+ 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
+ 9740EEB21CF90195004384FC /* Debug.xcconfig */,
+ 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
+ 9740EEB31CF90195004384FC /* Generated.xcconfig */,
+ );
+ name = Flutter;
+ sourceTree = "";
+ };
+ 97C146E51CF9000F007C117D = {
+ isa = PBXGroup;
+ children = (
+ 9740EEB11CF90186004384FC /* Flutter */,
+ 97C146F01CF9000F007C117D /* Runner */,
+ 97C146EF1CF9000F007C117D /* Products */,
+ 331C8082294A63A400263BE5 /* RunnerTests */,
+ );
+ sourceTree = "";
+ };
+ 97C146EF1CF9000F007C117D /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 97C146EE1CF9000F007C117D /* Runner.app */,
+ 331C8081294A63A400263BE5 /* RunnerTests.xctest */,
+ );
+ name = Products;
+ sourceTree = "";
+ };
+ 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 = "";
+ };
+/* 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 = "";
+ };
+ 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 97C147001CF9000F007C117D /* Base */,
+ );
+ name = LaunchScreen.storyboard;
+ sourceTree = "";
+ };
+/* 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.example.kopikaocare;
+ 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.example.kopikaocare.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.example.kopikaocare.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.example.kopikaocare.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.example.kopikaocare;
+ 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.example.kopikaocare;
+ 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 */;
+}
diff --git a/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 0000000..919434a
--- /dev/null
+++ b/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+
+
+
+
+
diff --git a/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
new file mode 100644
index 0000000..18d9810
--- /dev/null
+++ b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
@@ -0,0 +1,8 @@
+
+
+
+
+ IDEDidComputeMac32BitWarning
+
+
+
diff --git a/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
new file mode 100644
index 0000000..f9b0d7c
--- /dev/null
+++ b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
@@ -0,0 +1,8 @@
+
+
+
+
+ PreviewsEnabled
+
+
+
diff --git a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
new file mode 100644
index 0000000..8e3ca5d
--- /dev/null
+++ b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
@@ -0,0 +1,98 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ios/Runner.xcworkspace/contents.xcworkspacedata b/ios/Runner.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 0000000..1d526a1
--- /dev/null
+++ b/ios/Runner.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+
+
+
+
+
diff --git a/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
new file mode 100644
index 0000000..18d9810
--- /dev/null
+++ b/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
@@ -0,0 +1,8 @@
+
+
+
+
+ IDEDidComputeMac32BitWarning
+
+
+
diff --git a/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
new file mode 100644
index 0000000..f9b0d7c
--- /dev/null
+++ b/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
@@ -0,0 +1,8 @@
+
+
+
+
+ PreviewsEnabled
+
+
+
diff --git a/ios/Runner/AppDelegate.swift b/ios/Runner/AppDelegate.swift
new file mode 100644
index 0000000..6266644
--- /dev/null
+++ b/ios/Runner/AppDelegate.swift
@@ -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)
+ }
+}
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
new file mode 100644
index 0000000..d36b1fa
--- /dev/null
+++ b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
@@ -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"
+ }
+}
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
new file mode 100644
index 0000000..dc9ada4
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
new file mode 100644
index 0000000..7353c41
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
new file mode 100644
index 0000000..797d452
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
new file mode 100644
index 0000000..6ed2d93
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
new file mode 100644
index 0000000..4cd7b00
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
new file mode 100644
index 0000000..fe73094
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
new file mode 100644
index 0000000..321773c
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
new file mode 100644
index 0000000..797d452
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
new file mode 100644
index 0000000..502f463
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
new file mode 100644
index 0000000..0ec3034
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
new file mode 100644
index 0000000..0ec3034
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
new file mode 100644
index 0000000..e9f5fea
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
new file mode 100644
index 0000000..84ac32a
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
new file mode 100644
index 0000000..8953cba
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
new file mode 100644
index 0000000..0467bf1
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ
diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
new file mode 100644
index 0000000..0bedcf2
--- /dev/null
+++ b/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
@@ -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"
+ }
+}
diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
new file mode 100644
index 0000000..9da19ea
Binary files /dev/null and b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png differ
diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
new file mode 100644
index 0000000..9da19ea
Binary files /dev/null and b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png differ
diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
new file mode 100644
index 0000000..9da19ea
Binary files /dev/null and b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png differ
diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
new file mode 100644
index 0000000..89c2725
--- /dev/null
+++ b/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
@@ -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.
\ No newline at end of file
diff --git a/ios/Runner/Base.lproj/LaunchScreen.storyboard b/ios/Runner/Base.lproj/LaunchScreen.storyboard
new file mode 100644
index 0000000..f2e259c
--- /dev/null
+++ b/ios/Runner/Base.lproj/LaunchScreen.storyboard
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ios/Runner/Base.lproj/Main.storyboard b/ios/Runner/Base.lproj/Main.storyboard
new file mode 100644
index 0000000..f3c2851
--- /dev/null
+++ b/ios/Runner/Base.lproj/Main.storyboard
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist
new file mode 100644
index 0000000..d35bdac
--- /dev/null
+++ b/ios/Runner/Info.plist
@@ -0,0 +1,49 @@
+
+
+
+
+ CFBundleDevelopmentRegion
+ $(DEVELOPMENT_LANGUAGE)
+ CFBundleDisplayName
+ Kopikaocare
+ CFBundleExecutable
+ $(EXECUTABLE_NAME)
+ CFBundleIdentifier
+ $(PRODUCT_BUNDLE_IDENTIFIER)
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ kopikaocare
+ CFBundlePackageType
+ APPL
+ CFBundleShortVersionString
+ $(FLUTTER_BUILD_NAME)
+ CFBundleSignature
+ ????
+ CFBundleVersion
+ $(FLUTTER_BUILD_NUMBER)
+ LSRequiresIPhoneOS
+
+ UILaunchStoryboardName
+ LaunchScreen
+ UIMainStoryboardFile
+ Main
+ UISupportedInterfaceOrientations
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ UISupportedInterfaceOrientations~ipad
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationPortraitUpsideDown
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ CADisableMinimumFrameDurationOnPhone
+
+ UIApplicationSupportsIndirectInputEvents
+
+
+
diff --git a/ios/Runner/Runner-Bridging-Header.h b/ios/Runner/Runner-Bridging-Header.h
new file mode 100644
index 0000000..308a2a5
--- /dev/null
+++ b/ios/Runner/Runner-Bridging-Header.h
@@ -0,0 +1 @@
+#import "GeneratedPluginRegistrant.h"
diff --git a/ios/RunnerTests/RunnerTests.swift b/ios/RunnerTests/RunnerTests.swift
new file mode 100644
index 0000000..86a7c3b
--- /dev/null
+++ b/ios/RunnerTests/RunnerTests.swift
@@ -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.
+ }
+
+}
diff --git a/lib/about.dart b/lib/about.dart
new file mode 100644
index 0000000..5a33b93
--- /dev/null
+++ b/lib/about.dart
@@ -0,0 +1,512 @@
+import 'package:flutter/material.dart';
+
+class AboutAppScreen extends StatelessWidget {
+ const AboutAppScreen({super.key});
+
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ backgroundColor: const Color(0xfffef3f2), // Putih kemerahan
+ appBar: AppBar(
+ title: const Text(
+ 'Tentang Aplikasi',
+ style: TextStyle(fontWeight: FontWeight.bold, letterSpacing: 1),
+ ),
+ backgroundColor: Colors.red,
+ foregroundColor: Colors.white,
+ elevation: 0,
+ ),
+ body: SingleChildScrollView(
+ child: Column(
+ children: [
+ // Header Gradasi Merah Putih
+ Container(
+ width: double.infinity,
+ padding: const EdgeInsets.symmetric(vertical: 40, horizontal: 24),
+ decoration: BoxDecoration(
+ gradient: LinearGradient(
+ begin: Alignment.topLeft,
+ end: Alignment.bottomRight,
+ colors: [
+ Colors.red.shade700,
+ Colors.red.shade500,
+ Colors.red.shade300,
+ Colors.red.shade100,
+ Colors.white,
+ ],
+ stops: const [0.0, 0.3, 0.6, 0.85, 1.0],
+ ),
+ borderRadius: const BorderRadius.only(
+ bottomLeft: Radius.circular(40),
+ bottomRight: Radius.circular(40),
+ ),
+ ),
+ child: Column(
+ children: [
+ // Animasi Coffee Bean
+ TweenAnimationBuilder(
+ duration: const Duration(seconds: 2),
+ tween: Tween(begin: 0, end: 1),
+ builder: (context, double value, child) {
+ return Transform.scale(
+ scale: value,
+ child: Container(
+ padding: const EdgeInsets.all(20),
+ decoration: BoxDecoration(
+ shape: BoxShape.circle,
+ border: Border.all(
+ color: Colors.white.withOpacity(0.5),
+ width: 2,
+ ),
+ boxShadow: [
+ BoxShadow(
+ blurRadius: 30,
+ color: Colors.white.withOpacity(0.3),
+ spreadRadius: 5,
+ ),
+ ],
+ ),
+ child: const Icon(
+ Icons.coffee,
+ size: 60,
+ color: Colors.white,
+ ),
+ ),
+ );
+ },
+ ),
+ const SizedBox(height: 20),
+ const Text(
+ 'KopiCare IoT',
+ style: TextStyle(
+ fontSize: 32,
+ fontWeight: FontWeight.bold,
+ color: Colors.white,
+ letterSpacing: 2,
+ ),
+ ),
+ const SizedBox(height: 8),
+ Container(
+ width: 80,
+ height: 3,
+ decoration: BoxDecoration(
+ borderRadius: BorderRadius.circular(2),
+ color: Colors.white,
+ ),
+ ),
+ const SizedBox(height: 16),
+ const Text(
+ 'Smart Coffee Drying System',
+ style: TextStyle(
+ fontSize: 14,
+ color: Colors.white,
+ letterSpacing: 1,
+ ),
+ ),
+ ],
+ ),
+ ),
+
+ const SizedBox(height: 30),
+ Padding(
+ padding: const EdgeInsets.symmetric(horizontal: 20),
+ child: Column(
+ children: [
+ // Deskripsi Card
+ _buildWhiteCard(
+ icon: Icons.description,
+ title: 'Deskripsi',
+ content:
+ 'Aplikasi ini dirancang untuk memonitor dan mengatur proses '
+ 'pengeringan biji kopi secara cerdas menggunakan teknologi Internet '
+ 'of Things (IoT). Dengan aplikasi ini, petani dapat memantau suhu, '
+ 'kelembapan, dan berat biji kopi secara real-time, sehingga proses '
+ 'pengeringan menjadi lebih efisien dan mengurangi resiko kerusakan '
+ 'biji kopi.',
+ color: Colors.red,
+ ),
+ const SizedBox(height: 20),
+
+ // Fitur Utama Card
+ _buildWhiteCard(
+ icon: Icons.rocket_launch,
+ title: 'Fitur Utama',
+ content: '',
+ color: Colors.red,
+ child: Column(
+ children: [
+ _buildFeatureItem(
+ Icons.thermostat,
+ 'Monitoring Suhu & Kelembapan',
+ 'Real-time data sensor'),
+ _buildFeatureItem(
+ Icons.fitness_center,
+ 'Monitoring Berat Biji Kopi',
+ 'Pantau proses pengeringan'),
+ _buildFeatureItem(Icons.smart_toy, 'Kontrol Otomatis',
+ 'Heater & kipas berbasis AI'),
+ _buildFeatureItem(Icons.timer, 'Interval Update',
+ 'Atur frekuensi pengambilan data'),
+ _buildFeatureItem(Icons.history, 'Riwayat Pengeringan',
+ 'Data tersimpan untuk analisis'),
+ ],
+ ),
+ ),
+ const SizedBox(height: 20),
+
+ // Manfaat Card
+ _buildWhiteCard(
+ icon: Icons.emoji_events,
+ title: 'Manfaat',
+ content: '',
+ color: Colors.red,
+ child: Column(
+ children: [
+ _buildBenefitItem(Icons.star, 'Kualitas Terjaga',
+ 'Biji kopi kering optimal'),
+ _buildBenefitItem(Icons.timer, 'Efisiensi Waktu',
+ 'Proses lebih cepat 40%'),
+ _buildBenefitItem(Icons.savings, 'Hemat Biaya',
+ 'Mengurangi biaya operasional'),
+ _buildBenefitItem(Icons.analytics, 'Data Akurat',
+ 'Monitoring presisi tinggi'),
+ ],
+ ),
+ ),
+ const SizedBox(height: 20),
+
+ // Proses Pengeringan Kopi
+ _buildWhiteCard(
+ icon: Icons.timeline,
+ title: 'Proses Pengeringan',
+ content: '',
+ color: Colors.red,
+ child: Column(
+ children: [
+ _buildProcessStep('1', 'Pemanasan Awal',
+ 'Heater menyala hingga suhu optimal'),
+ _buildProcessStep('2', 'Pengeringan Utama',
+ 'Suhu dijaga stabil, berat berkurang'),
+ _buildProcessStep('3', 'Pendinginan',
+ 'Kipas menyala, suhu diturunkan'),
+ _buildProcessStep('4', 'Pengeringan Selesai',
+ 'Target berat tercapai, proses stop'),
+ ],
+ ),
+ ),
+ const SizedBox(height: 20),
+
+ // Teknologi Card
+ _buildWhiteCard(
+ icon: Icons.devices,
+ title: 'Teknologi',
+ content: '',
+ color: Colors.red,
+ child: Wrap(
+ spacing: 10,
+ runSpacing: 10,
+ children: [
+ _buildTechChip('Flutter', Colors.blue),
+ _buildTechChip('IoT', Colors.red),
+ _buildTechChip('ESP32', Colors.green),
+ _buildTechChip('Sensor DHT22', Colors.orange),
+ _buildTechChip('Load Cell', Colors.purple),
+ _buildTechChip('Firebase', Colors.yellow.shade800),
+ ],
+ ),
+ ),
+ const SizedBox(height: 30),
+
+ // Footer
+ Container(
+ padding: const EdgeInsets.all(20),
+ decoration: BoxDecoration(
+ gradient: LinearGradient(
+ begin: Alignment.topLeft,
+ end: Alignment.bottomRight,
+ colors: [
+ Colors.red.shade700,
+ Colors.red.shade500,
+ Colors.red.shade300,
+ ],
+ ),
+ borderRadius: BorderRadius.circular(20),
+ boxShadow: [
+ BoxShadow(
+ blurRadius: 20,
+ color: Colors.red.withOpacity(0.3),
+ ),
+ ],
+ ),
+ child: Column(
+ children: [
+ const Icon(
+ Icons.coffee,
+ color: Colors.white,
+ size: 40,
+ ),
+ const SizedBox(height: 10),
+ const Text(
+ 'KopiCare IoT',
+ style: TextStyle(
+ fontSize: 18,
+ fontWeight: FontWeight.bold,
+ color: Colors.white,
+ letterSpacing: 1,
+ ),
+ ),
+ const SizedBox(height: 5),
+ Text(
+ 'Smart Coffee Drying System',
+ style: TextStyle(
+ fontSize: 12,
+ color: Colors.white.withOpacity(0.9),
+ ),
+ ),
+ const SizedBox(height: 15),
+ const Divider(color: Colors.white24),
+ const SizedBox(height: 10),
+ Text(
+ '© 2026 KopiCare IoT | Version 2.0.0',
+ style: TextStyle(
+ fontSize: 11,
+ color: Colors.white.withOpacity(0.7),
+ ),
+ ),
+ ],
+ ),
+ ),
+ const SizedBox(height: 30),
+ ],
+ ),
+ ),
+ ],
+ ),
+ ),
+ );
+ }
+
+ Widget _buildWhiteCard({
+ required IconData icon,
+ required String title,
+ required String content,
+ required Color color,
+ Widget? child,
+ }) {
+ return Container(
+ decoration: BoxDecoration(
+ color: Colors.white,
+ borderRadius: BorderRadius.circular(25),
+ boxShadow: [
+ BoxShadow(
+ blurRadius: 15,
+ color: Colors.red.withOpacity(0.1),
+ offset: const Offset(0, 8),
+ ),
+ ],
+ border: Border.all(
+ color: Colors.red.withOpacity(0.1),
+ width: 1,
+ ),
+ ),
+ child: Padding(
+ padding: const EdgeInsets.all(20),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Row(
+ children: [
+ Container(
+ padding: const EdgeInsets.all(10),
+ decoration: BoxDecoration(
+ color: Colors.red.withOpacity(0.1),
+ borderRadius: BorderRadius.circular(15),
+ ),
+ child: Icon(icon, color: Colors.red, size: 24),
+ ),
+ const SizedBox(width: 15),
+ Text(
+ title,
+ style: const TextStyle(
+ fontSize: 20,
+ fontWeight: FontWeight.bold,
+ color: Color(0xff2d2d2d),
+ letterSpacing: 0.5,
+ ),
+ ),
+ ],
+ ),
+ const SizedBox(height: 20),
+ if (content.isNotEmpty)
+ Text(
+ content,
+ style: const TextStyle(
+ fontSize: 14,
+ color: Color(0xff666666),
+ height: 1.5,
+ ),
+ ),
+ if (child != null) child,
+ ],
+ ),
+ ),
+ );
+ }
+
+ Widget _buildFeatureItem(IconData icon, String title, String subtitle) {
+ return Padding(
+ padding: const EdgeInsets.only(bottom: 16),
+ child: Row(
+ children: [
+ Container(
+ padding: const EdgeInsets.all(8),
+ decoration: BoxDecoration(
+ color: Colors.red.withOpacity(0.1),
+ borderRadius: BorderRadius.circular(12),
+ ),
+ child: Icon(icon, color: Colors.red, size: 20),
+ ),
+ const SizedBox(width: 12),
+ Expanded(
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Text(
+ title,
+ style: const TextStyle(
+ fontSize: 14,
+ fontWeight: FontWeight.w600,
+ color: Color(0xff2d2d2d),
+ ),
+ ),
+ Text(
+ subtitle,
+ style: const TextStyle(
+ fontSize: 12,
+ color: Color(0xff888888),
+ ),
+ ),
+ ],
+ ),
+ ),
+ ],
+ ),
+ );
+ }
+
+ Widget _buildBenefitItem(IconData icon, String title, String subtitle) {
+ return Padding(
+ padding: const EdgeInsets.only(bottom: 16),
+ child: Row(
+ children: [
+ Container(
+ padding: const EdgeInsets.all(8),
+ decoration: BoxDecoration(
+ color: Colors.green.withOpacity(0.1),
+ borderRadius: BorderRadius.circular(12),
+ ),
+ child: Icon(icon, color: Colors.green, size: 20),
+ ),
+ const SizedBox(width: 12),
+ Expanded(
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Text(
+ title,
+ style: const TextStyle(
+ fontSize: 14,
+ fontWeight: FontWeight.w600,
+ color: Color(0xff2d2d2d),
+ ),
+ ),
+ Text(
+ subtitle,
+ style: const TextStyle(
+ fontSize: 12,
+ color: Color(0xff888888),
+ ),
+ ),
+ ],
+ ),
+ ),
+ ],
+ ),
+ );
+ }
+
+ Widget _buildProcessStep(String number, String title, String description) {
+ return Padding(
+ padding: const EdgeInsets.only(bottom: 16),
+ child: Row(
+ children: [
+ Container(
+ width: 36,
+ height: 36,
+ decoration: BoxDecoration(
+ gradient: LinearGradient(
+ colors: [Colors.red.shade700, Colors.red.shade500],
+ ),
+ shape: BoxShape.circle,
+ ),
+ child: Center(
+ child: Text(
+ number,
+ style: const TextStyle(
+ color: Colors.white,
+ fontWeight: FontWeight.bold,
+ fontSize: 16,
+ ),
+ ),
+ ),
+ ),
+ const SizedBox(width: 12),
+ Expanded(
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Text(
+ title,
+ style: const TextStyle(
+ fontSize: 14,
+ fontWeight: FontWeight.w600,
+ color: Color(0xff2d2d2d),
+ ),
+ ),
+ Text(
+ description,
+ style: const TextStyle(
+ fontSize: 12,
+ color: Color(0xff888888),
+ ),
+ ),
+ ],
+ ),
+ ),
+ ],
+ ),
+ );
+ }
+
+ Widget _buildTechChip(String label, Color color) {
+ return Container(
+ padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
+ decoration: BoxDecoration(
+ color: color.withOpacity(0.1),
+ borderRadius: BorderRadius.circular(20),
+ border: Border.all(
+ color: color.withOpacity(0.3),
+ width: 1,
+ ),
+ ),
+ child: Text(
+ label,
+ style: TextStyle(
+ fontSize: 12,
+ fontWeight: FontWeight.w500,
+ color: color,
+ ),
+ ),
+ );
+ }
+}
diff --git a/lib/api_service.dart b/lib/api_service.dart
new file mode 100644
index 0000000..e69de29
diff --git a/lib/app_language.dart b/lib/app_language.dart
new file mode 100644
index 0000000..2b0366c
--- /dev/null
+++ b/lib/app_language.dart
@@ -0,0 +1,38 @@
+class AppLanguage {
+ static Map> translations = {
+ 'en': {
+ 'login': 'Login',
+ 'register': 'Register',
+ 'password': 'Password',
+ 'email': 'Email',
+ 'change_password': 'Change Password',
+ 'language': 'Language',
+
+ // 🔥 tambahan
+ 'remember_me': 'Remember Me',
+ 'forgot_password': 'Forgot Password?',
+ 'no_account': "Don't have an account? ",
+ 'login_failed': 'Login Failed',
+ 'wrong_credential': 'Email or password is incorrect',
+ },
+ 'id': {
+ 'login': 'Masuk',
+ 'register': 'Daftar',
+ 'password': 'Kata Sandi',
+ 'email': 'Email',
+ 'change_password': 'Ganti Password',
+ 'language': 'Bahasa',
+
+ // 🔥 tambahan
+ 'remember_me': 'Ingat Saya',
+ 'forgot_password': 'Lupa Password?',
+ 'no_account': "Belum punya akun? ",
+ 'login_failed': 'Login Gagal',
+ 'wrong_credential': 'Email atau password salah',
+ }
+ };
+
+ static String get(String key, String lang) {
+ return translations[lang]?[key] ?? key;
+ }
+}
diff --git a/lib/cek_sensor.dart b/lib/cek_sensor.dart
new file mode 100644
index 0000000..b7cabba
--- /dev/null
+++ b/lib/cek_sensor.dart
@@ -0,0 +1,1403 @@
+import 'dart:async';
+import 'dart:convert';
+import 'package:flutter/material.dart';
+import 'package:http/http.dart' as http;
+import 'package:shared_preferences/shared_preferences.dart';
+import 'global_data.dart';
+
+class CekSensor extends StatefulWidget {
+ const CekSensor({super.key});
+
+ @override
+ State createState() => _CekSensorState();
+}
+
+class _CekSensorState extends State {
+ bool isConnected = false;
+ Timer? timer;
+ Timer? _saveTimer;
+
+ // Sensor data
+ double suhu = 0;
+ double kelembapan = 0;
+ double berat = 0;
+
+ // Control status
+ bool heater = false;
+ bool fan = false;
+
+ // Mode selection (mutually exclusive) - default 'manual'
+ String selectedMode = 'manual';
+
+ // Keys for SharedPreferences
+ static const String _keySelectedMode = 'selected_mode';
+ static const String _keyManualHeater = 'manual_heater';
+ static const String _keyManualFan = 'manual_fan';
+ static const String _keyHeater = 'heater_state';
+ static const String _keyFan = 'fan_state';
+
+ // Keys for Drying Tracking
+ static const String _keyDryingActive = 'drying_active';
+ static const String _keyDryingStartTime = 'drying_start_time';
+ static const String _keyInitialWeight = 'initial_weight';
+ static const String _keyTargetWeight = 'target_weight';
+ static const String _keyInitialWeightSaved = 'initial_weight_saved';
+
+ // Manual mode
+ bool manualHeater = false;
+ bool manualFan = false;
+
+ // Auto mode
+ double targetTemp = 35.0;
+ double targetWeightLoss = 30.0;
+ double initialWeight = 0;
+ double targetWeight = 0;
+ bool initialWeightSaved = false;
+
+ // Drying tracking
+ DateTime? dryingStartTime;
+ Duration dryingDuration = Duration.zero;
+ bool dryingActive = false;
+
+ // Controllers
+ final tempController = TextEditingController();
+ final weightController = TextEditingController();
+
+ @override
+ void initState() {
+ super.initState();
+ _loadPersistentState();
+ _loadDryingState(); // Load drying state FIRST
+ _loadSettings();
+ _loadHistory();
+ _startSensorReading();
+ _startSaveTimer();
+ _startDryingTimer();
+ }
+
+ // Load drying state from SharedPreferences
+ Future _loadDryingState() async {
+ final prefs = await SharedPreferences.getInstance();
+
+ setState(() {
+ dryingActive = prefs.getBool(_keyDryingActive) ?? false;
+ initialWeightSaved = prefs.getBool(_keyInitialWeightSaved) ?? false;
+ initialWeight = prefs.getDouble(_keyInitialWeight) ?? 0;
+ targetWeight = prefs.getDouble(_keyTargetWeight) ?? 0;
+
+ String? startTimeStr = prefs.getString(_keyDryingStartTime);
+ if (startTimeStr != null && dryingActive) {
+ dryingStartTime = DateTime.parse(startTimeStr);
+ // Hitung ulang durasi berdasarkan waktu yang sudah berlalu
+ dryingDuration = DateTime.now().difference(dryingStartTime!);
+ } else {
+ dryingStartTime = null;
+ dryingDuration = Duration.zero;
+ }
+ });
+
+ print(
+ 'Loaded drying state - Active: $dryingActive, Duration: ${_formatDuration(dryingDuration)}');
+ }
+
+ // Save drying state to SharedPreferences
+ Future _saveDryingState() async {
+ final prefs = await SharedPreferences.getInstance();
+
+ await prefs.setBool(_keyDryingActive, dryingActive);
+ await prefs.setBool(_keyInitialWeightSaved, initialWeightSaved);
+ await prefs.setDouble(_keyInitialWeight, initialWeight);
+ await prefs.setDouble(_keyTargetWeight, targetWeight);
+
+ if (dryingStartTime != null) {
+ await prefs.setString(
+ _keyDryingStartTime, dryingStartTime!.toIso8601String());
+ } else {
+ await prefs.remove(_keyDryingStartTime);
+ }
+
+ print(
+ 'Saved drying state - Active: $dryingActive, Duration: ${_formatDuration(dryingDuration)}');
+ }
+
+ Future _loadPersistentState() async {
+ final prefs = await SharedPreferences.getInstance();
+
+ selectedMode = prefs.getString(_keySelectedMode) ?? 'manual';
+ manualHeater = prefs.getBool(_keyManualHeater) ?? false;
+ manualFan = prefs.getBool(_keyManualFan) ?? false;
+ heater = prefs.getBool(_keyHeater) ?? false;
+ fan = prefs.getBool(_keyFan) ?? false;
+
+ if (selectedMode == 'manual') {
+ manualHeater = heater;
+ manualFan = fan;
+ }
+
+ print(
+ 'Loaded persistent state - Mode: $selectedMode, Heater: $heater, Fan: $fan');
+ }
+
+ Future _savePersistentState() async {
+ final prefs = await SharedPreferences.getInstance();
+ await prefs.setString(_keySelectedMode, selectedMode);
+ await prefs.setBool(_keyManualHeater, manualHeater);
+ await prefs.setBool(_keyManualFan, manualFan);
+ await prefs.setBool(_keyHeater, heater);
+ await prefs.setBool(_keyFan, fan);
+ }
+
+ void _startSensorReading() {
+ getSensor();
+ getControlStatus();
+ timer = Timer.periodic(const Duration(seconds: 3), (timer) => getSensor());
+ }
+
+ void _startSaveTimer() {
+ _saveTimer?.cancel();
+ int intervalSeconds = _getIntervalInSeconds();
+
+ _saveTimer =
+ Timer.periodic(Duration(seconds: intervalSeconds), (timer) async {
+ if (isConnected) {
+ Map sensorData = {
+ 'suhu': suhu,
+ 'kelembapan': kelembapan,
+ 'berat': berat,
+ };
+ await HistoryManager.addData(sensorData);
+ print('History saved at interval: $intervalSeconds seconds');
+ }
+ });
+ }
+
+ void _restartSaveTimer() {
+ _startSaveTimer();
+ }
+
+ void _startDryingTimer() {
+ Timer.periodic(const Duration(seconds: 1), (timer) {
+ if (mounted && dryingActive && dryingStartTime != null) {
+ setState(() {
+ dryingDuration = DateTime.now().difference(dryingStartTime!);
+ });
+ // Periodically save duration (every 10 seconds)
+ if (dryingDuration.inSeconds % 10 == 0) {
+ _saveDryingState();
+ }
+ }
+ });
+ }
+
+ void _startDryingTracking() {
+ if (!dryingActive) {
+ setState(() {
+ dryingActive = true;
+ dryingStartTime = DateTime.now();
+ dryingDuration = Duration.zero;
+ });
+ _saveDryingState();
+ print('Drying tracking started');
+ }
+ }
+
+ void _stopDryingTracking() {
+ if (dryingActive) {
+ setState(() {
+ dryingActive = false;
+ dryingStartTime = null;
+ dryingDuration = Duration.zero;
+ });
+ _saveDryingState();
+ print('Drying tracking stopped');
+ }
+ }
+
+ String _formatDuration(Duration duration) {
+ String twoDigits(int n) => n.toString().padLeft(2, '0');
+ String hours = twoDigits(duration.inHours);
+ String minutes = twoDigits(duration.inMinutes.remainder(60));
+ String seconds = twoDigits(duration.inSeconds.remainder(60));
+
+ if (duration.inHours > 0) {
+ return '$hours:$minutes:$seconds';
+ } else {
+ return '$minutes:$seconds';
+ }
+ }
+
+ Future _loadHistory() async {
+ await HistoryManager.loadHistory();
+ if (mounted) {
+ setState(() {});
+ }
+ }
+
+ int _getIntervalInSeconds() {
+ switch (HistoryManager.intervalUnit) {
+ case 'detik':
+ return HistoryManager.intervalValue;
+ case 'menit':
+ return HistoryManager.intervalValue * 60;
+ case 'jam':
+ return HistoryManager.intervalValue * 3600;
+ default:
+ return 5;
+ }
+ }
+
+ Future _loadSettings() async {
+ final prefs = await SharedPreferences.getInstance();
+ if (mounted) {
+ setState(() {
+ targetTemp = prefs.getDouble('targetTemp') ?? 35.0;
+ targetWeightLoss = prefs.getDouble('targetWeightLoss') ?? 30.0;
+ tempController.text = targetTemp.toString();
+ weightController.text = targetWeightLoss.toString();
+ });
+ }
+ }
+
+ Future saveSettings() async {
+ final prefs = await SharedPreferences.getInstance();
+ await prefs.setDouble('targetTemp', targetTemp);
+ await prefs.setDouble('targetWeightLoss', targetWeightLoss);
+ }
+
+ Future getControlStatus() async {
+ try {
+ final response = await http.get(
+ Uri.parse('http://192.168.100.9/kopikaocare_api/get_control.php'),
+ );
+
+ if (response.statusCode == 200 && mounted) {
+ final data = jsonDecode(response.body);
+
+ setState(() {
+ heater = data['heater'] == 1;
+ fan = data['fan'] == 1;
+
+ if (data.containsKey('mode')) {
+ selectedMode = data['mode'] ?? 'manual';
+ }
+ if (data.containsKey('manual_heater')) {
+ manualHeater = data['manual_heater'] == 1;
+ }
+ if (data.containsKey('manual_fan')) {
+ manualFan = data['manual_fan'] == 1;
+ }
+ });
+
+ await _savePersistentState();
+ print(
+ 'Control status loaded - Heater: $heater, Fan: $fan, Mode: $selectedMode');
+ }
+ } catch (e) {
+ debugPrint('GET CONTROL ERROR: $e');
+ }
+ }
+
+ Future getSensor() async {
+ try {
+ final response = await http.get(
+ Uri.parse('http://192.168.100.9/kopikaocare_api/get_sensor.php'),
+ );
+
+ if (response.statusCode != 200) {
+ if (mounted) setState(() => isConnected = false);
+ return;
+ }
+
+ final data = jsonDecode(response.body);
+
+ if (data['status'] != 'success') {
+ if (mounted) setState(() => isConnected = false);
+ return;
+ }
+
+ final sensor = data['data'];
+ if (mounted) {
+ setState(() {
+ suhu = double.tryParse(sensor['suhu'].toString()) ?? 0;
+ kelembapan = double.tryParse(sensor['kelembapan'].toString()) ?? 0;
+ berat = double.tryParse(sensor['berat'].toString()) ?? 0;
+ if (berat < 0) berat = 0;
+ isConnected = true;
+ });
+ }
+
+ if (selectedMode == 'auto') {
+ _runAutoMode();
+ }
+ } catch (e) {
+ if (mounted) setState(() => isConnected = false);
+ }
+ }
+
+ void _runAutoMode() {
+ if (!initialWeightSaved && berat > 50) {
+ setState(() {
+ initialWeight = berat;
+ targetWeight = initialWeight * (1 - targetWeightLoss / 100);
+ initialWeightSaved = true;
+ });
+ _startDryingTracking();
+ print(
+ 'Auto mode: Initial weight saved: $initialWeight, Target: $targetWeight');
+ }
+
+ bool newHeater = heater;
+ bool newFan = fan;
+
+ if (berat <= 1) {
+ newHeater = false;
+ newFan = false;
+ if (dryingActive) {
+ _stopDryingTracking();
+ }
+ } else {
+ if (initialWeightSaved && initialWeight > 0) {
+ newHeater = berat > targetWeight;
+ } else if (berat > 50) {
+ newHeater = true;
+ } else {
+ newHeater = false;
+ }
+ }
+ newFan = suhu >= targetTemp;
+
+ if (newHeater != heater || newFan != fan) {
+ setState(() {
+ heater = newHeater;
+ fan = newFan;
+ });
+ _updateControl();
+ _savePersistentState();
+ }
+
+ if (initialWeightSaved && berat <= targetWeight && dryingActive) {
+ _turnOffAllDevices();
+ _stopDryingTracking();
+ _showDryingCompleteDialog();
+ }
+ }
+
+ void _turnOffAllDevices() {
+ setState(() {
+ heater = false;
+ fan = false;
+ if (selectedMode == 'manual') {
+ manualHeater = false;
+ manualFan = false;
+ }
+ });
+ _updateControl();
+ _savePersistentState();
+ _saveDryingState();
+ }
+
+ Future _updateControl() async {
+ try {
+ final response = await http.post(
+ Uri.parse('http://192.168.100.9/kopikaocare_api/update_control.php'),
+ body: {
+ "heater": heater ? "1" : "0",
+ "fan": fan ? "1" : "0",
+ "mode": selectedMode,
+ "manual_heater": manualHeater ? "1" : "0",
+ "manual_fan": manualFan ? "1" : "0",
+ },
+ );
+
+ if (response.statusCode == 200) {
+ final data = jsonDecode(response.body);
+ print('Control updated: ${data['status']}');
+ }
+ } catch (e) {
+ print('UPDATE CONTROL ERROR: $e');
+ }
+ }
+
+ void _enableManualMode() {
+ _turnOffAllDevices();
+
+ setState(() {
+ selectedMode = 'manual';
+ initialWeightSaved = false;
+ initialWeight = 0;
+ targetWeight = 0;
+ manualHeater = false;
+ manualFan = false;
+ heater = false;
+ fan = false;
+ _stopDryingTracking();
+ });
+ _updateControl();
+ _savePersistentState();
+ _saveDryingState();
+
+ ScaffoldMessenger.of(context).showSnackBar(
+ const SnackBar(
+ content: Text('Mode Manual Aktif - Semua perangkat dimatikan'),
+ backgroundColor: Colors.blue,
+ duration: Duration(seconds: 2),
+ ),
+ );
+ }
+
+ void _enableAutoMode() {
+ _turnOffAllDevices();
+
+ setState(() {
+ selectedMode = 'auto';
+ manualHeater = false;
+ manualFan = false;
+ initialWeightSaved = false;
+ initialWeight = 0;
+ targetWeight = 0;
+ heater = false;
+ fan = false;
+ _stopDryingTracking();
+ });
+ _updateControl();
+ _savePersistentState();
+ _saveDryingState();
+
+ ScaffoldMessenger.of(context).showSnackBar(
+ const SnackBar(
+ content: Text('Mode Auto Aktif - Semua perangkat dimatikan'),
+ backgroundColor: Colors.red,
+ duration: Duration(seconds: 2),
+ ),
+ );
+ }
+
+ void _toggleManualHeater() {
+ if (selectedMode != 'manual') return;
+
+ setState(() {
+ manualHeater = !manualHeater;
+ heater = manualHeater;
+ });
+ _updateControl();
+ _savePersistentState();
+
+ if (heater || fan) {
+ _startDryingTracking();
+ } else {
+ _stopDryingTracking();
+ }
+ _saveDryingState();
+ }
+
+ void _toggleManualFan() {
+ if (selectedMode != 'manual') return;
+
+ setState(() {
+ manualFan = !manualFan;
+ fan = manualFan;
+ });
+ _updateControl();
+ _savePersistentState();
+
+ if (heater || fan) {
+ _startDryingTracking();
+ } else {
+ _stopDryingTracking();
+ }
+ _saveDryingState();
+ }
+
+ void resetWeight() {
+ setState(() {
+ initialWeightSaved = false;
+ initialWeight = 0;
+ targetWeight = 0;
+ _stopDryingTracking();
+ });
+ _saveDryingState();
+ }
+
+ void _showDryingCompleteDialog() {
+ showDialog(
+ context: context,
+ builder: (context) => AlertDialog(
+ shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(15)),
+ title: const Icon(Icons.check_circle, color: Colors.green, size: 40),
+ content: Column(
+ mainAxisSize: MainAxisSize.min,
+ children: [
+ const Text('Pengeringan Selesai!',
+ style: TextStyle(fontWeight: FontWeight.bold, fontSize: 18)),
+ const SizedBox(height: 10),
+ Text('Total durasi: ${_formatDuration(dryingDuration)}'),
+ const SizedBox(height: 5),
+ const Text('Target berat telah tercapai.'),
+ ],
+ ),
+ actions: [
+ TextButton(
+ onPressed: () => Navigator.pop(context),
+ child: const Text('OK'),
+ ),
+ ],
+ ),
+ );
+ }
+
+ void showSettingsDialog() {
+ tempController.text = targetTemp.toString();
+ weightController.text = targetWeightLoss.toString();
+ showDialog(
+ context: context,
+ builder: (context) => StatefulBuilder(
+ builder: (context, setStateDialog) {
+ return AlertDialog(
+ shape:
+ RoundedRectangleBorder(borderRadius: BorderRadius.circular(25)),
+ title: const Row(children: [
+ Icon(Icons.settings_suggest, color: Colors.red),
+ SizedBox(width: 10),
+ Text('Auto Mode Settings')
+ ]),
+ content: Column(mainAxisSize: MainAxisSize.min, children: [
+ Container(
+ padding: const EdgeInsets.all(12),
+ decoration: BoxDecoration(
+ color: Colors.blue.shade50,
+ borderRadius: BorderRadius.circular(15)),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ const Row(children: [
+ Icon(Icons.air, color: Colors.blue),
+ SizedBox(width: 8),
+ Text('Fan Control',
+ style: TextStyle(fontWeight: FontWeight.bold))
+ ]),
+ const SizedBox(height: 8),
+ Text(
+ 'Fan ON saat suhu ≥ ${targetTemp.toStringAsFixed(0)}°C'),
+ Row(children: [
+ Expanded(
+ child: Slider(
+ value: targetTemp,
+ min: 20,
+ max: 60,
+ activeColor: Colors.blue,
+ onChanged: (v) {
+ setStateDialog(() {
+ targetTemp = v;
+ tempController.text = v.toStringAsFixed(0);
+ });
+ })),
+ Container(
+ width: 60,
+ padding: const EdgeInsets.symmetric(vertical: 6),
+ decoration: BoxDecoration(
+ color: Colors.blue,
+ borderRadius: BorderRadius.circular(8)),
+ child: Text('${targetTemp.toStringAsFixed(0)}°C',
+ textAlign: TextAlign.center,
+ style: const TextStyle(color: Colors.white))),
+ ]),
+ ],
+ ),
+ ),
+ const SizedBox(height: 12),
+ Container(
+ padding: const EdgeInsets.all(12),
+ decoration: BoxDecoration(
+ color: Colors.red.shade50,
+ borderRadius: BorderRadius.circular(15)),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ const Row(children: [
+ Icon(Icons.whatshot, color: Colors.red),
+ SizedBox(width: 8),
+ Text('Heater Control',
+ style: TextStyle(fontWeight: FontWeight.bold))
+ ]),
+ const SizedBox(height: 8),
+ Text(
+ 'Heater OFF setelah berat turun ${targetWeightLoss.toStringAsFixed(0)}%'),
+ Row(children: [
+ Expanded(
+ child: Slider(
+ value: targetWeightLoss,
+ min: 10,
+ max: 80,
+ activeColor: Colors.red,
+ onChanged: (v) {
+ setStateDialog(() {
+ targetWeightLoss = v;
+ weightController.text = v.toStringAsFixed(0);
+ });
+ })),
+ Container(
+ width: 60,
+ padding: const EdgeInsets.symmetric(vertical: 6),
+ decoration: BoxDecoration(
+ color: Colors.red,
+ borderRadius: BorderRadius.circular(8)),
+ child: Text('${targetWeightLoss.toStringAsFixed(0)}%',
+ textAlign: TextAlign.center,
+ style: const TextStyle(color: Colors.white))),
+ ]),
+ ],
+ ),
+ ),
+ ]),
+ actions: [
+ TextButton(
+ onPressed: () => Navigator.pop(context),
+ child: const Text('Batal')),
+ ElevatedButton(
+ onPressed: () async {
+ setState(() {
+ targetTemp = double.parse(tempController.text);
+ targetWeightLoss = double.parse(weightController.text);
+ });
+ await saveSettings();
+ if (mounted) Navigator.pop(context);
+ },
+ style: ElevatedButton.styleFrom(backgroundColor: Colors.red),
+ child: const Text('Simpan')),
+ ],
+ );
+ },
+ ),
+ );
+ }
+
+ @override
+ void dispose() {
+ _savePersistentState();
+ _saveDryingState();
+ timer?.cancel();
+ _saveTimer?.cancel();
+ tempController.dispose();
+ weightController.dispose();
+ super.dispose();
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ backgroundColor: const Color(0xfff8f9fa),
+ appBar: AppBar(
+ title: const Text('Sensor Monitoring',
+ style: TextStyle(fontWeight: FontWeight.bold)),
+ backgroundColor: Colors.red,
+ foregroundColor: Colors.white,
+ actions: [
+ IconButton(
+ icon: const Icon(Icons.settings_suggest),
+ onPressed: showSettingsDialog,
+ tooltip: 'Settings Auto Mode'),
+ IconButton(
+ icon: const Icon(Icons.history),
+ onPressed: () => Navigator.pushNamed(context, '/history'),
+ tooltip: 'Riwayat Sensor'),
+ Container(
+ margin: const EdgeInsets.only(right: 16),
+ child: Chip(
+ label: Text(isConnected ? 'ONLINE' : 'OFFLINE',
+ style: TextStyle(
+ color: isConnected ? Colors.white : Colors.red)),
+ backgroundColor: isConnected ? Colors.green : Colors.white)),
+ ],
+ ),
+ body: RefreshIndicator(
+ onRefresh: () async {
+ await getSensor();
+ await getControlStatus();
+ },
+ child: SingleChildScrollView(
+ padding: const EdgeInsets.all(20),
+ child: Column(children: [
+ _buildHeaderCard(),
+ const SizedBox(height: 20),
+ _buildModeSelector(),
+ const SizedBox(height: 20),
+ if (selectedMode == 'auto') _buildAutoModeCard(),
+ if (selectedMode == 'manual') _buildManualModeCard(),
+ const SizedBox(height: 20),
+ _buildDryingCard(),
+ const SizedBox(height: 25),
+ const Text('Sensor Data',
+ style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold)),
+ const SizedBox(height: 15),
+ _buildSensorCard('Temperature', suhu, '°C', Icons.thermostat,
+ _getTemperatureColor(suhu), 0, 60, targetTemp),
+ const SizedBox(height: 15),
+ _buildSensorCard('Humidity', kelembapan, '%', Icons.water_drop,
+ _getHumidityColor(kelembapan), 0, 100, null),
+ const SizedBox(height: 15),
+ _buildWeightCard(),
+ const SizedBox(height: 25),
+ _buildRelayStatusCard(),
+ const SizedBox(height: 25),
+ Center(
+ child: Column(
+ children: [
+ Text(
+ 'Last update: ${DateTime.now().hour.toString().padLeft(2, '0')}:${DateTime.now().minute.toString().padLeft(2, '0')}:${DateTime.now().second.toString().padLeft(2, '0')}',
+ style:
+ TextStyle(fontSize: 11, color: Colors.grey.shade500)),
+ const SizedBox(height: 4),
+ Text(
+ 'Interval: ${HistoryManager.intervalValue} ${HistoryManager.intervalUnit}',
+ style:
+ TextStyle(fontSize: 10, color: Colors.grey.shade400)),
+ Text('History: ${historyGlobal.length} data',
+ style:
+ TextStyle(fontSize: 10, color: Colors.grey.shade400)),
+ ],
+ )),
+ ]),
+ ),
+ ),
+ );
+ }
+
+ Widget _buildModeSelector() {
+ return Container(
+ decoration: BoxDecoration(
+ color: Colors.white,
+ borderRadius: BorderRadius.circular(15),
+ boxShadow: [
+ BoxShadow(blurRadius: 10, color: Colors.black.withOpacity(0.05))
+ ],
+ ),
+ child: Row(
+ children: [
+ _buildModeButton('auto', 'AUTO MODE', Icons.smart_toy, Colors.red,
+ _enableAutoMode),
+ _buildModeButton('manual', 'MANUAL MODE', Icons.touch_app,
+ Colors.blue, _enableManualMode),
+ ],
+ ),
+ );
+ }
+
+ Widget _buildModeButton(String mode, String label, IconData icon, Color color,
+ VoidCallback onTap) {
+ bool isSelected = selectedMode == mode;
+ return Expanded(
+ child: GestureDetector(
+ onTap: onTap,
+ child: Container(
+ padding: const EdgeInsets.symmetric(vertical: 14),
+ decoration: BoxDecoration(
+ color: isSelected ? color.withOpacity(0.1) : Colors.transparent,
+ borderRadius: BorderRadius.circular(15),
+ border:
+ Border.all(color: isSelected ? color : Colors.grey.shade300),
+ ),
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Icon(icon, color: isSelected ? color : Colors.grey, size: 22),
+ const SizedBox(width: 8),
+ Text(label,
+ style: TextStyle(
+ color: isSelected ? color : Colors.grey,
+ fontWeight:
+ isSelected ? FontWeight.bold : FontWeight.normal,
+ fontSize: 14)),
+ ],
+ ),
+ ),
+ ),
+ );
+ }
+
+ Widget _buildAutoModeCard() {
+ return Container(
+ padding: const EdgeInsets.all(16),
+ decoration: BoxDecoration(
+ color: Colors.red.shade50,
+ borderRadius: BorderRadius.circular(15),
+ border: Border.all(color: Colors.red.shade200),
+ ),
+ child: Column(
+ children: [
+ const Row(
+ children: [
+ Icon(Icons.smart_toy, color: Colors.red),
+ SizedBox(width: 8),
+ Text('Mode Auto Aktif',
+ style: TextStyle(
+ fontWeight: FontWeight.bold,
+ fontSize: 16,
+ color: Colors.red)),
+ ],
+ ),
+ const SizedBox(height: 12),
+ Row(
+ children: [
+ Expanded(
+ child: Container(
+ padding: const EdgeInsets.all(10),
+ decoration: BoxDecoration(
+ color: Colors.white,
+ borderRadius: BorderRadius.circular(10)),
+ child: Column(
+ children: [
+ const Text('Fan ON',
+ style: TextStyle(fontSize: 12, color: Colors.grey)),
+ Text('≥ ${targetTemp.toStringAsFixed(0)}°C',
+ style: const TextStyle(
+ fontSize: 16,
+ fontWeight: FontWeight.bold,
+ color: Colors.blue)),
+ ],
+ ),
+ ),
+ ),
+ const SizedBox(width: 12),
+ Expanded(
+ child: Container(
+ padding: const EdgeInsets.all(10),
+ decoration: BoxDecoration(
+ color: Colors.white,
+ borderRadius: BorderRadius.circular(10)),
+ child: Column(
+ children: [
+ const Text('Heater OFF',
+ style: TextStyle(fontSize: 12, color: Colors.grey)),
+ Text('turun ${targetWeightLoss.toStringAsFixed(0)}%',
+ style: const TextStyle(
+ fontSize: 16,
+ fontWeight: FontWeight.bold,
+ color: Colors.red)),
+ ],
+ ),
+ ),
+ ),
+ ],
+ ),
+ const SizedBox(height: 12),
+ Container(
+ padding: const EdgeInsets.all(8),
+ decoration: BoxDecoration(
+ color: Colors.blue.shade50,
+ borderRadius: BorderRadius.circular(8)),
+ child: const Row(
+ children: [
+ Icon(Icons.info, size: 16, color: Colors.blue),
+ SizedBox(width: 8),
+ Expanded(
+ child: Text(
+ 'Auto mode akan aktif otomatis saat berat > 50g. Kontrol penuh oleh sistem berdasarkan suhu dan berat.',
+ style: TextStyle(fontSize: 11, color: Colors.blue),
+ ),
+ ),
+ ],
+ ),
+ ),
+ if (initialWeightSaved && selectedMode == 'auto') ...[
+ const SizedBox(height: 12),
+ Container(
+ padding: const EdgeInsets.all(8),
+ decoration: BoxDecoration(
+ color: Colors.green.shade50,
+ borderRadius: BorderRadius.circular(8)),
+ child: Row(
+ children: [
+ const Icon(Icons.check_circle, size: 16, color: Colors.green),
+ const SizedBox(width: 8),
+ Expanded(
+ child: Text(
+ 'Berat awal: ${initialWeight.toStringAsFixed(0)}g → Target: ${targetWeight.toStringAsFixed(0)}g',
+ style: const TextStyle(fontSize: 11, color: Colors.green),
+ ),
+ ),
+ GestureDetector(
+ onTap: resetWeight,
+ child: Container(
+ padding: const EdgeInsets.symmetric(
+ horizontal: 8, vertical: 4),
+ decoration: BoxDecoration(
+ color: Colors.orange,
+ borderRadius: BorderRadius.circular(15)),
+ child: const Text('Reset',
+ style: TextStyle(fontSize: 10, color: Colors.white)),
+ ),
+ ),
+ ],
+ ),
+ ),
+ ],
+ ],
+ ),
+ );
+ }
+
+ Widget _buildManualModeCard() {
+ return Container(
+ padding: const EdgeInsets.all(16),
+ decoration: BoxDecoration(
+ color: Colors.blue.shade50,
+ borderRadius: BorderRadius.circular(15),
+ border: Border.all(color: Colors.blue.shade200),
+ ),
+ child: Column(
+ children: [
+ const Row(
+ children: [
+ Icon(Icons.touch_app, color: Colors.blue),
+ SizedBox(width: 8),
+ Text('Mode Manual',
+ style: TextStyle(
+ fontWeight: FontWeight.bold,
+ fontSize: 16,
+ color: Colors.blue)),
+ ],
+ ),
+ const SizedBox(height: 12),
+ Row(
+ children: [
+ Expanded(
+ child: ElevatedButton.icon(
+ onPressed: _toggleManualHeater,
+ icon: Icon(
+ manualHeater ? Icons.whatshot : Icons.whatshot_outlined),
+ label: Text(manualHeater ? 'HEATER ON' : 'HEATER OFF'),
+ style: ElevatedButton.styleFrom(
+ backgroundColor: manualHeater ? Colors.red : Colors.grey,
+ foregroundColor: Colors.white,
+ padding: const EdgeInsets.symmetric(vertical: 12),
+ shape: RoundedRectangleBorder(
+ borderRadius: BorderRadius.circular(10)),
+ ),
+ ),
+ ),
+ const SizedBox(width: 12),
+ Expanded(
+ child: ElevatedButton.icon(
+ onPressed: _toggleManualFan,
+ icon: Icon(manualFan ? Icons.air : Icons.air_outlined),
+ label: Text(manualFan ? 'FAN ON' : 'FAN OFF'),
+ style: ElevatedButton.styleFrom(
+ backgroundColor: manualFan ? Colors.cyan : Colors.grey,
+ foregroundColor: Colors.white,
+ padding: const EdgeInsets.symmetric(vertical: 12),
+ shape: RoundedRectangleBorder(
+ borderRadius: BorderRadius.circular(10)),
+ ),
+ ),
+ ),
+ ],
+ ),
+ const SizedBox(height: 12),
+ Container(
+ padding: const EdgeInsets.all(8),
+ decoration: BoxDecoration(
+ color: Colors.white.withOpacity(0.5),
+ borderRadius: BorderRadius.circular(8)),
+ child: const Row(
+ children: [
+ Icon(Icons.touch_app, size: 16, color: Colors.blue),
+ SizedBox(width: 8),
+ Expanded(
+ child: Text(
+ 'Kontrol manual Heater dan Fan. Mode Auto tidak berjalan saat Mode Manual aktif.',
+ style: TextStyle(fontSize: 11, color: Colors.blue),
+ ),
+ ),
+ ],
+ ),
+ ),
+ ],
+ ),
+ );
+ }
+
+ Widget _buildDryingCard() {
+ return Container(
+ padding: const EdgeInsets.all(16),
+ decoration: BoxDecoration(
+ gradient: LinearGradient(
+ colors: dryingActive
+ ? [Colors.green.shade700, Colors.green.shade500]
+ : [Colors.grey.shade600, Colors.grey.shade500],
+ ),
+ borderRadius: BorderRadius.circular(15),
+ ),
+ child: Column(
+ children: [
+ Row(
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ children: [
+ Row(
+ children: [
+ Icon(dryingActive ? Icons.play_circle : Icons.stop_circle,
+ color: Colors.white),
+ const SizedBox(width: 8),
+ Text(
+ dryingActive ? 'PENGERINGAN BERJALAN' : 'PENGERINGAN STOP',
+ style: const TextStyle(
+ color: Colors.white,
+ fontWeight: FontWeight.bold,
+ fontSize: 14),
+ ),
+ ],
+ ),
+ Container(
+ padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 4),
+ decoration: BoxDecoration(
+ color: Colors.white.withOpacity(0.2),
+ borderRadius: BorderRadius.circular(15)),
+ child: Text(
+ selectedMode == 'auto' ? 'MODE AUTO' : 'MODE MANUAL',
+ style: const TextStyle(
+ color: Colors.white,
+ fontSize: 10,
+ fontWeight: FontWeight.bold),
+ ),
+ ),
+ ],
+ ),
+ const SizedBox(height: 15),
+ Row(
+ mainAxisAlignment: MainAxisAlignment.spaceAround,
+ children: [
+ Column(
+ children: [
+ const Text('Durasi',
+ style: TextStyle(color: Colors.white70, fontSize: 10)),
+ Text(
+ _formatDuration(dryingDuration),
+ style: const TextStyle(
+ color: Colors.white,
+ fontSize: 20,
+ fontWeight: FontWeight.bold,
+ fontFamily: 'monospace'),
+ ),
+ ],
+ ),
+ Container(
+ width: 1, height: 40, color: Colors.white.withOpacity(0.3)),
+ Column(
+ children: [
+ const Text('Status',
+ style: TextStyle(color: Colors.white70, fontSize: 10)),
+ Text(
+ dryingActive ? 'AKTIF' : 'NONAKTIF',
+ style: TextStyle(
+ color:
+ dryingActive ? Colors.lightGreen : Colors.white70,
+ fontSize: 16,
+ fontWeight: FontWeight.bold),
+ ),
+ ],
+ ),
+ ],
+ ),
+ ],
+ ),
+ );
+ }
+
+ Widget _buildHeaderCard() => Container(
+ width: double.infinity,
+ padding: const EdgeInsets.all(20),
+ decoration: BoxDecoration(
+ gradient: LinearGradient(
+ colors: [Colors.red.shade700, Colors.red.shade500]),
+ borderRadius: BorderRadius.circular(25),
+ boxShadow: [
+ BoxShadow(blurRadius: 20, color: Colors.red.withOpacity(0.3))
+ ]),
+ child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
+ const Text('Live Monitoring',
+ style: TextStyle(color: Colors.white, fontSize: 14)),
+ const Text('Real-time Sensor Data',
+ style: TextStyle(
+ color: Colors.white,
+ fontSize: 22,
+ fontWeight: FontWeight.bold)),
+ const SizedBox(height: 20),
+ Row(mainAxisAlignment: MainAxisAlignment.spaceAround, children: [
+ _buildMiniStat(
+ Icons.thermostat, '${suhu.toStringAsFixed(1)}°C', 'Suhu'),
+ _buildMiniStat(Icons.water_drop, '${kelembapan.toStringAsFixed(1)}%',
+ 'Kelembapan'),
+ _buildMiniStat(
+ Icons.fitness_center, '${berat.toStringAsFixed(0)}g', 'Berat'),
+ ]),
+ ]));
+
+ Widget _buildMiniStat(IconData icon, String value, String label) =>
+ Column(children: [
+ Icon(icon, color: Colors.white, size: 28),
+ const SizedBox(height: 5),
+ Text(value,
+ style: const TextStyle(
+ color: Colors.white,
+ fontSize: 18,
+ fontWeight: FontWeight.bold)),
+ Text(label,
+ style:
+ TextStyle(color: Colors.white.withOpacity(0.8), fontSize: 11))
+ ]);
+
+ Widget _buildSensorCard(String title, double value, String unit,
+ IconData icon, Color color, double min, double max, double? target) {
+ double progress = ((value - min) / (max - min)).clamp(0.0, 1.0);
+ return Container(
+ decoration: BoxDecoration(
+ color: Colors.white,
+ borderRadius: BorderRadius.circular(20),
+ boxShadow: [
+ BoxShadow(blurRadius: 10, color: Colors.black.withOpacity(0.05))
+ ]),
+ child: Padding(
+ padding: const EdgeInsets.all(16),
+ child:
+ Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
+ Row(children: [
+ Container(
+ padding: const EdgeInsets.all(8),
+ decoration: BoxDecoration(
+ color: color.withOpacity(0.1),
+ borderRadius: BorderRadius.circular(12)),
+ child: Icon(icon, color: color, size: 24)),
+ const SizedBox(width: 12),
+ Expanded(
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Text(title,
+ style: const TextStyle(
+ fontSize: 14, color: Color(0xff666666))),
+ Text('$value $unit',
+ style: TextStyle(
+ fontSize: 24,
+ fontWeight: FontWeight.bold,
+ color: color))
+ ])),
+ if (target != null)
+ Container(
+ padding: const EdgeInsets.symmetric(
+ horizontal: 10, vertical: 4),
+ decoration: BoxDecoration(
+ color: Colors.orange.withOpacity(0.1),
+ borderRadius: BorderRadius.circular(15)),
+ child: Text('Target: ${target.toStringAsFixed(0)}$unit',
+ style: const TextStyle(
+ fontSize: 10,
+ color: Colors.orange,
+ fontWeight: FontWeight.bold))),
+ ]),
+ const SizedBox(height: 15),
+ LinearProgressIndicator(
+ value: progress,
+ backgroundColor: Colors.grey.shade200,
+ valueColor: AlwaysStoppedAnimation(color),
+ minHeight: 8,
+ borderRadius: BorderRadius.circular(4)),
+ ])));
+ }
+
+ Widget _buildWeightCard() {
+ double progress =
+ initialWeightSaved ? (berat / initialWeight).clamp(0.0, 1.0) : 0;
+ Color color = _getWeightColor(berat);
+
+ return Container(
+ decoration: BoxDecoration(
+ color: Colors.white,
+ borderRadius: BorderRadius.circular(20),
+ boxShadow: [
+ BoxShadow(blurRadius: 10, color: Colors.black.withOpacity(0.05))
+ ]),
+ child: Padding(
+ padding: const EdgeInsets.all(16),
+ child:
+ Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
+ Row(children: [
+ Container(
+ padding: const EdgeInsets.all(8),
+ decoration: BoxDecoration(
+ color: color.withOpacity(0.1),
+ borderRadius: BorderRadius.circular(12)),
+ child: const Icon(Icons.fitness_center, size: 24)),
+ const SizedBox(width: 12),
+ Expanded(
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ const Text('Weight',
+ style: TextStyle(
+ fontSize: 14, color: Color(0xff666666))),
+ Text('${berat.toStringAsFixed(0)} g',
+ style: TextStyle(
+ fontSize: 24,
+ fontWeight: FontWeight.bold,
+ color: color)),
+ ])),
+ ]),
+ if (initialWeightSaved && selectedMode == 'auto') ...[
+ const SizedBox(height: 15),
+ LinearProgressIndicator(
+ value: progress,
+ backgroundColor: Colors.grey.shade200,
+ valueColor: AlwaysStoppedAnimation(color),
+ minHeight: 8,
+ borderRadius: BorderRadius.circular(4)),
+ const SizedBox(height: 8),
+ Row(
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ children: [
+ Text('0 g',
+ style: TextStyle(
+ fontSize: 10, color: Colors.grey.shade500)),
+ Text('Target: ${targetWeight.toStringAsFixed(0)} g',
+ style: TextStyle(
+ fontSize: 10,
+ color: Colors.orange.shade700,
+ fontWeight: FontWeight.w500)),
+ Text('${initialWeight.toStringAsFixed(0)} g',
+ style: TextStyle(
+ fontSize: 10, color: Colors.grey.shade500)),
+ ]),
+ const SizedBox(height: 8),
+ Container(
+ padding: const EdgeInsets.all(8),
+ decoration: BoxDecoration(
+ color: Colors.grey.shade100,
+ borderRadius: BorderRadius.circular(10)),
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ children: [
+ Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Text('Penurunan',
+ style: TextStyle(
+ fontSize: 11,
+ color: Colors.grey.shade600)),
+ Text(
+ '${((initialWeight - berat) / initialWeight * 100).toStringAsFixed(1)}%',
+ style: TextStyle(
+ fontSize: 14,
+ fontWeight: FontWeight.bold,
+ color: Colors.green)),
+ ]),
+ ])),
+ ],
+ if (selectedMode == 'auto' &&
+ !initialWeightSaved &&
+ berat > 0 &&
+ berat < 50)
+ Container(
+ margin: const EdgeInsets.only(top: 12),
+ padding: const EdgeInsets.all(8),
+ decoration: BoxDecoration(
+ color: Colors.blue.shade50,
+ borderRadius: BorderRadius.circular(8)),
+ child: const Row(
+ children: [
+ Icon(Icons.info, size: 16, color: Colors.blue),
+ SizedBox(width: 8),
+ Expanded(
+ child: Text(
+ 'Auto mode akan aktif saat berat mencapai 50g',
+ style:
+ TextStyle(fontSize: 11, color: Colors.blue))),
+ ],
+ ),
+ ),
+ if (selectedMode == 'manual' && (heater || fan))
+ Container(
+ margin: const EdgeInsets.only(top: 12),
+ padding: const EdgeInsets.all(8),
+ decoration: BoxDecoration(
+ color: Colors.orange.shade50,
+ borderRadius: BorderRadius.circular(8)),
+ child: const Row(
+ children: [
+ Icon(Icons.info, size: 16, color: Colors.orange),
+ SizedBox(width: 8),
+ Expanded(
+ child: Text(
+ 'Mode Manual: Kontrol perangkat secara manual',
+ style: TextStyle(
+ fontSize: 11, color: Colors.orange))),
+ ],
+ ),
+ ),
+ ])));
+ }
+
+ Widget _buildRelayStatusCard() => Container(
+ decoration: BoxDecoration(
+ color: Colors.white,
+ borderRadius: BorderRadius.circular(25),
+ boxShadow: [
+ BoxShadow(blurRadius: 15, color: Colors.black.withOpacity(0.05))
+ ]),
+ child: Padding(
+ padding: const EdgeInsets.all(20),
+ child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
+ const Text('Relay Status',
+ style: TextStyle(
+ fontWeight: FontWeight.bold,
+ fontSize: 14,
+ color: Color(0xff666666))),
+ const SizedBox(height: 10),
+ Row(children: [
+ _buildRelayStatus('Heater', heater, Icons.whatshot, Colors.red),
+ const SizedBox(width: 20),
+ _buildRelayStatus('Fan', fan, Icons.air, Colors.cyan)
+ ]),
+ ]),
+ ));
+
+ Widget _buildRelayStatus(
+ String title, bool isOn, IconData icon, Color color) =>
+ Expanded(
+ child: Container(
+ padding: const EdgeInsets.all(12),
+ decoration: BoxDecoration(
+ color: isOn ? color.withOpacity(0.1) : Colors.grey.shade100,
+ borderRadius: BorderRadius.circular(12),
+ border:
+ Border.all(color: isOn ? color : Colors.grey.shade300)),
+ child: Column(children: [
+ Icon(icon, color: isOn ? color : Colors.grey, size: 24),
+ const SizedBox(height: 5),
+ Text(title,
+ style: TextStyle(
+ fontSize: 12,
+ color: isOn ? color : Colors.grey,
+ fontWeight: FontWeight.w500)),
+ Container(
+ width: 8,
+ height: 8,
+ decoration: BoxDecoration(
+ shape: BoxShape.circle,
+ color: isOn ? color : Colors.grey)),
+ ])));
+
+ Color _getTemperatureColor(double temp) => temp < 20
+ ? Colors.blue
+ : (temp < targetTemp
+ ? Colors.green
+ : (temp < targetTemp + 5 ? Colors.orange : Colors.red));
+
+ Color _getHumidityColor(double humidity) => humidity < 30
+ ? Colors.orange
+ : (humidity < 70 ? Colors.green : Colors.blue);
+
+ Color _getWeightColor(double weight) {
+ if (!initialWeightSaved || selectedMode != 'auto') return Colors.grey;
+ if (weight <= targetWeight) return Colors.green;
+ if (weight <= initialWeight * 0.7) return Colors.orange;
+ return Colors.red;
+ }
+}
diff --git a/lib/dashboard.dart b/lib/dashboard.dart
new file mode 100644
index 0000000..dbc2a63
--- /dev/null
+++ b/lib/dashboard.dart
@@ -0,0 +1,481 @@
+import 'package:flutter/material.dart';
+import 'cek_sensor.dart';
+import 'history.dart';
+import 'about.dart';
+import 'profile.dart';
+import 'login_screen.dart';
+import 'pengaturan.dart';
+import 'package:shared_preferences/shared_preferences.dart';
+
+class DashboardScreen extends StatefulWidget {
+ const DashboardScreen({super.key});
+
+ @override
+ State createState() => _DashboardScreenState();
+}
+
+class _DashboardScreenState extends State {
+ String name = "User";
+ String email = "";
+ String? imageName;
+ int _imageVersion = 0;
+
+ final String baseUrl = "http://192.168.100.9/kopikaocare_api/uploads/";
+
+ @override
+ void initState() {
+ super.initState();
+ loadProfile();
+ }
+
+ Future loadProfile() async {
+ final prefs = await SharedPreferences.getInstance();
+
+ setState(() {
+ name = prefs.getString('name') ?? 'User';
+ email = prefs.getString('email') ?? '';
+ imageName = prefs.getString('image');
+ _imageVersion++;
+ });
+ }
+
+ String getImageUrl() {
+ if (imageName == null || imageName!.isEmpty) return '';
+ return "$baseUrl$imageName?t=${DateTime.now().millisecondsSinceEpoch}";
+ }
+
+ Widget menuCard(
+ BuildContext context, String title, String gifPath, Widget page) {
+ return GestureDetector(
+ onTap: () async {
+ await Navigator.push(
+ context,
+ MaterialPageRoute(builder: (context) => page),
+ );
+ await loadProfile();
+ },
+ child: Container(
+ decoration: BoxDecoration(
+ color: Colors.white,
+ borderRadius: BorderRadius.circular(20),
+ boxShadow: [
+ BoxShadow(
+ blurRadius: 15,
+ color: Colors.red.withOpacity(0.15),
+ offset: const Offset(0, 8),
+ ),
+ ],
+ border: Border.all(
+ color: Colors.red.withOpacity(0.1),
+ width: 1,
+ ),
+ ),
+ padding: const EdgeInsets.all(20),
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Image.asset(gifPath, height: 90),
+ const SizedBox(height: 15),
+ Text(
+ title,
+ style: const TextStyle(
+ fontSize: 15,
+ fontWeight: FontWeight.w600,
+ color: Color(0xff2d2d2d),
+ ),
+ ),
+ // HAPUS TANDA PANAH DI SINI
+ ],
+ ),
+ ),
+ );
+ }
+
+ void showLogoutDialog() {
+ showDialog(
+ context: context,
+ builder: (context) {
+ return AlertDialog(
+ backgroundColor: Colors.white,
+ shape: RoundedRectangleBorder(
+ borderRadius: BorderRadius.circular(20),
+ ),
+ title: const Text("Logout"),
+ content: const Text("Apakah anda ingin logout?"),
+ actions: [
+ TextButton(
+ child: const Text("Tidak"),
+ onPressed: () => Navigator.pop(context),
+ ),
+ ElevatedButton(
+ style: ElevatedButton.styleFrom(
+ backgroundColor: Colors.red,
+ shape: RoundedRectangleBorder(
+ borderRadius: BorderRadius.circular(12),
+ ),
+ ),
+ child: const Text("Ya"),
+ onPressed: () async {
+ final prefs = await SharedPreferences.getInstance();
+ await prefs.clear();
+
+ Navigator.pushAndRemoveUntil(
+ context,
+ MaterialPageRoute(builder: (context) => const LoginScreen()),
+ (route) => false,
+ );
+ },
+ ),
+ ],
+ );
+ },
+ );
+ }
+
+ Widget profileImage(double radius, {bool withGlow = false}) {
+ final imageUrl = getImageUrl();
+
+ Widget avatar;
+ if (imageUrl.isNotEmpty) {
+ avatar = CircleAvatar(
+ key: ValueKey(_imageVersion),
+ radius: radius - 2,
+ backgroundImage: NetworkImage(imageUrl),
+ onBackgroundImageError: (exception, stackTrace) {
+ print('❌ Error loading image: $exception');
+ },
+ );
+ } else {
+ avatar = CircleAvatar(
+ radius: radius - 2,
+ backgroundColor: Colors.grey[300],
+ child: Icon(Icons.person, size: radius, color: Colors.grey[600]),
+ );
+ }
+
+ if (withGlow) {
+ return Container(
+ decoration: BoxDecoration(
+ shape: BoxShape.circle,
+ boxShadow: [
+ BoxShadow(
+ blurRadius: 20,
+ color: Colors.red.withOpacity(0.4),
+ offset: const Offset(0, 4),
+ ),
+ ],
+ border: Border.all(
+ color: Colors.white,
+ width: 3,
+ ),
+ ),
+ child: avatar,
+ );
+ }
+
+ return avatar;
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ backgroundColor: const Color(0xffeeeeee),
+ appBar: AppBar(
+ title: const Text(
+ 'Dashboard',
+ style: TextStyle(
+ fontWeight: FontWeight.bold,
+ letterSpacing: 0.5,
+ ),
+ ),
+ backgroundColor: Colors.red,
+ foregroundColor: Colors.white,
+ elevation: 0,
+ flexibleSpace: Container(
+ decoration: const BoxDecoration(
+ borderRadius: BorderRadius.only(
+ bottomLeft: Radius.circular(20),
+ bottomRight: Radius.circular(20),
+ ),
+ ),
+ ),
+ ),
+ drawer: Drawer(
+ child: Container(
+ color: Colors.white,
+ child: SafeArea(
+ child: Column(
+ children: [
+ Container(
+ width: double.infinity,
+ padding:
+ const EdgeInsets.symmetric(vertical: 40, horizontal: 20),
+ decoration: BoxDecoration(
+ gradient: LinearGradient(
+ begin: Alignment.topLeft,
+ end: Alignment.bottomRight,
+ colors: [
+ Colors.red.shade700,
+ Colors.red.shade500,
+ ],
+ ),
+ borderRadius: const BorderRadius.only(
+ bottomLeft: Radius.circular(30),
+ bottomRight: Radius.circular(30),
+ ),
+ ),
+ child: Column(
+ children: [
+ profileImage(50, withGlow: true),
+ const SizedBox(height: 15),
+ Text(
+ name,
+ style: const TextStyle(
+ fontSize: 20,
+ fontWeight: FontWeight.bold,
+ color: Colors.white,
+ letterSpacing: 0.5,
+ ),
+ ),
+ const SizedBox(height: 8),
+ Container(
+ padding: const EdgeInsets.symmetric(
+ horizontal: 12, vertical: 4),
+ decoration: BoxDecoration(
+ color: Colors.white.withOpacity(0.2),
+ borderRadius: BorderRadius.circular(20),
+ ),
+ child: Text(
+ email.isEmpty ? 'Email belum diisi' : email,
+ style: const TextStyle(
+ fontSize: 13,
+ color: Colors.white,
+ ),
+ ),
+ ),
+ const SizedBox(height: 20),
+ ElevatedButton.icon(
+ onPressed: () async {
+ Navigator.pop(context);
+ await Navigator.push(
+ context,
+ MaterialPageRoute(
+ builder: (context) => const ProfileScreen()),
+ );
+ await loadProfile();
+ },
+ icon: const Icon(Icons.edit, size: 18),
+ label: const Text('Edit Profile'),
+ style: ElevatedButton.styleFrom(
+ backgroundColor: Colors.white,
+ foregroundColor: Colors.red,
+ shape: RoundedRectangleBorder(
+ borderRadius: BorderRadius.circular(30),
+ ),
+ elevation: 0,
+ ),
+ ),
+ ],
+ ),
+ ),
+ const Spacer(),
+ Container(
+ margin: const EdgeInsets.all(20),
+ decoration: BoxDecoration(
+ borderRadius: BorderRadius.circular(15),
+ border: Border.all(
+ color: Colors.red.withOpacity(0.2),
+ ),
+ ),
+ child: ListTile(
+ leading: Container(
+ padding: const EdgeInsets.all(8),
+ decoration: BoxDecoration(
+ color: Colors.red.withOpacity(0.1),
+ borderRadius: BorderRadius.circular(12),
+ ),
+ child:
+ const Icon(Icons.logout, color: Colors.red, size: 20),
+ ),
+ title: const Text(
+ 'Logout',
+ style: TextStyle(
+ fontWeight: FontWeight.w600,
+ color: Color(0xff2d2d2d),
+ ),
+ ),
+ onTap: () {
+ Navigator.pop(context);
+ showLogoutDialog();
+ },
+ ),
+ ),
+ const SizedBox(height: 20),
+ ],
+ ),
+ ),
+ ),
+ ),
+ body: SafeArea(
+ child: Padding(
+ padding: const EdgeInsets.all(20),
+ child: Column(
+ children: [
+ // Welcome Banner Modern dengan Foto Profil
+ Container(
+ width: double.infinity,
+ padding: const EdgeInsets.all(20),
+ decoration: BoxDecoration(
+ color: Colors.white,
+ borderRadius: BorderRadius.circular(25),
+ boxShadow: [
+ BoxShadow(
+ blurRadius: 20,
+ color: Colors.red.withOpacity(0.1),
+ offset: const Offset(0, 8),
+ ),
+ ],
+ border: Border.all(
+ color: Colors.red.withOpacity(0.1),
+ width: 1,
+ ),
+ ),
+ child: Row(
+ children: [
+ // Foto Profil dengan efek glow
+ Container(
+ decoration: BoxDecoration(
+ shape: BoxShape.circle,
+ boxShadow: [
+ BoxShadow(
+ blurRadius: 15,
+ color: Colors.red.withOpacity(0.3),
+ offset: const Offset(0, 4),
+ ),
+ ],
+ ),
+ child: profileImage(35),
+ ),
+ const SizedBox(width: 15),
+ // Teks Welcome
+ Expanded(
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Row(
+ children: [
+ const Text(
+ "Halo, ",
+ style: TextStyle(
+ fontSize: 18,
+ color: Color(0xff666666),
+ ),
+ ),
+ Text(
+ name,
+ style: const TextStyle(
+ fontSize: 20,
+ fontWeight: FontWeight.bold,
+ color: Color(0xff2d2d2d),
+ ),
+ ),
+ const Text(
+ "!",
+ style: TextStyle(
+ fontSize: 18,
+ color: Color(0xff666666),
+ ),
+ ),
+ ],
+ ),
+ const SizedBox(height: 4),
+ const Text(
+ "Selamat datang di Kopikaocare",
+ style: TextStyle(
+ fontSize: 13,
+ color: Color(0xff888888),
+ ),
+ ),
+ ],
+ ),
+ ),
+ // Icon futuristik
+ Container(
+ padding: const EdgeInsets.all(8),
+ decoration: BoxDecoration(
+ color: Colors.red.withOpacity(0.1),
+ borderRadius: BorderRadius.circular(15),
+ ),
+ child: const Icon(
+ Icons.rocket_launch_rounded,
+ color: Colors.red,
+ size: 24,
+ ),
+ ),
+ ],
+ ),
+ ),
+ const SizedBox(height: 30),
+ // Menu Layanan dengan efek futuristik
+ Container(
+ padding: const EdgeInsets.symmetric(horizontal: 5),
+ child: Row(
+ children: [
+ Container(
+ padding: const EdgeInsets.all(8),
+ decoration: BoxDecoration(
+ color: Colors.red.withOpacity(0.1),
+ borderRadius: BorderRadius.circular(12),
+ ),
+ child: const Icon(Icons.grid_view_rounded,
+ color: Colors.red, size: 20),
+ ),
+ const SizedBox(width: 12),
+ const Text(
+ "Menu Layanan",
+ style: TextStyle(
+ fontSize: 18,
+ fontWeight: FontWeight.bold,
+ color: Color(0xff2d2d2d),
+ ),
+ ),
+ const Spacer(),
+ Container(
+ height: 2,
+ width: 30,
+ decoration: BoxDecoration(
+ gradient: LinearGradient(
+ colors: [Colors.red, Colors.red.withOpacity(0.2)],
+ ),
+ borderRadius: BorderRadius.circular(2),
+ ),
+ ),
+ ],
+ ),
+ ),
+ const SizedBox(height: 20),
+ // Menu Grid dengan efek glassmorphism
+ Expanded(
+ child: GridView.count(
+ crossAxisCount: 2,
+ crossAxisSpacing: 15,
+ mainAxisSpacing: 15,
+ children: [
+ menuCard(context, "Cek Sensor", "assets/sensor.gif",
+ const CekSensor()),
+ menuCard(context, "Riwayat", "assets/history.gif",
+ const HistoryScreen()),
+ menuCard(context, "Tentang Aplikasi", "assets/about.gif",
+ const AboutAppScreen()),
+ menuCard(context, "Pengaturan", "assets/settings.gif",
+ const PengaturanScreen()),
+ ],
+ ),
+ ),
+ ],
+ ),
+ ),
+ ),
+ );
+ }
+}
diff --git a/lib/early_screen.dart b/lib/early_screen.dart
new file mode 100644
index 0000000..7fb329b
--- /dev/null
+++ b/lib/early_screen.dart
@@ -0,0 +1,227 @@
+import 'package:flutter/material.dart';
+import 'login_screen.dart';
+import 'register_screen.dart';
+
+class EarlyScreen extends StatelessWidget {
+ const EarlyScreen({super.key});
+
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ body: Container(
+ decoration: const BoxDecoration(
+ image: DecorationImage(
+ image: AssetImage("assets/coffe.jpg"),
+ fit: BoxFit.cover,
+ ),
+ ),
+ child: Container(
+ decoration: BoxDecoration(
+ gradient: LinearGradient(
+ begin: Alignment.topCenter,
+ end: Alignment.bottomCenter,
+ colors: [
+ Colors.black.withOpacity(0.6),
+ Colors.black.withOpacity(0.4),
+ Colors.transparent,
+ Colors.black.withOpacity(0.3),
+ Colors.black.withOpacity(0.7),
+ ],
+ stops: const [0.0, 0.2, 0.5, 0.8, 1.0],
+ ),
+ ),
+ child: SafeArea(
+ child: Padding(
+ padding: const EdgeInsets.symmetric(horizontal: 24),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ const SizedBox(height: 60),
+ // Logo atau Brand dengan efek
+ Container(
+ padding: const EdgeInsets.all(12),
+ decoration: BoxDecoration(
+ border: Border.all(
+ color: Colors.white.withOpacity(0.3),
+ width: 1,
+ ),
+ borderRadius: BorderRadius.circular(20),
+ ),
+ child: Row(
+ mainAxisSize: MainAxisSize.min,
+ children: [
+ Container(
+ padding: const EdgeInsets.all(8),
+ decoration: BoxDecoration(
+ color: Colors.white.withOpacity(0.2),
+ borderRadius: BorderRadius.circular(12),
+ ),
+ child: const Icon(
+ Icons.coffee,
+ color: Colors.white,
+ size: 24,
+ ),
+ ),
+ const SizedBox(width: 12),
+ const Text(
+ "Kopikaocare",
+ style: TextStyle(
+ fontSize: 20,
+ fontWeight: FontWeight.bold,
+ color: Colors.white,
+ letterSpacing: 1,
+ ),
+ ),
+ ],
+ ),
+ ),
+ const Spacer(),
+ // Main Title
+ Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ const Text(
+ "Welcome to",
+ style: TextStyle(
+ fontSize: 16,
+ color: Colors.white70,
+ letterSpacing: 2,
+ ),
+ ),
+ const SizedBox(height: 8),
+ ShaderMask(
+ shaderCallback: (bounds) => const LinearGradient(
+ colors: [Colors.white, Colors.white70],
+ ).createShader(bounds),
+ child: const Text(
+ "Kopikaocare",
+ style: TextStyle(
+ fontSize: 48,
+ fontWeight: FontWeight.bold,
+ color: Colors.white,
+ letterSpacing: 1,
+ ),
+ ),
+ ),
+ const SizedBox(height: 16),
+ Container(
+ width: 60,
+ height: 3,
+ color: Colors.white.withOpacity(0.5),
+ ),
+ const SizedBox(height: 16),
+ const Text(
+ "Smart Care for Coffee & Cocoa",
+ style: TextStyle(
+ fontSize: 18,
+ color: Colors.white70,
+ letterSpacing: 0.5,
+ ),
+ ),
+ ],
+ ),
+ const SizedBox(height: 40),
+ // Tombol Sign In
+ SizedBox(
+ width: double.infinity,
+ height: 55,
+ child: ElevatedButton(
+ onPressed: () {
+ Navigator.push(
+ context,
+ MaterialPageRoute(
+ builder: (context) => const LoginScreen(),
+ ),
+ );
+ },
+ style: ElevatedButton.styleFrom(
+ backgroundColor: Colors.white,
+ foregroundColor: Colors.red.shade700,
+ elevation: 0,
+ shape: RoundedRectangleBorder(
+ borderRadius: BorderRadius.circular(15),
+ ),
+ ),
+ child: const Text(
+ "Sign In",
+ style: TextStyle(
+ fontSize: 16,
+ fontWeight: FontWeight.bold,
+ letterSpacing: 1,
+ ),
+ ),
+ ),
+ ),
+ const SizedBox(height: 16),
+ // Tombol Create Account
+ SizedBox(
+ width: double.infinity,
+ height: 55,
+ child: OutlinedButton(
+ onPressed: () {
+ Navigator.push(
+ context,
+ MaterialPageRoute(
+ builder: (context) => const RegisterScreen(),
+ ),
+ );
+ },
+ style: OutlinedButton.styleFrom(
+ foregroundColor: Colors.white,
+ side: BorderSide(
+ color: Colors.white.withOpacity(0.5),
+ width: 1.5,
+ ),
+ shape: RoundedRectangleBorder(
+ borderRadius: BorderRadius.circular(15),
+ ),
+ ),
+ child: const Text(
+ "Create Account",
+ style: TextStyle(
+ fontSize: 16,
+ fontWeight: FontWeight.w500,
+ letterSpacing: 1,
+ ),
+ ),
+ ),
+ ),
+ const SizedBox(height: 30),
+ // Footer text
+ Center(
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Container(
+ width: 30,
+ height: 1,
+ color: Colors.white.withOpacity(0.3),
+ ),
+ const SizedBox(width: 10),
+ Text(
+ "Kopi Kesehatan Anda",
+ style: TextStyle(
+ fontSize: 12,
+ color: Colors.white.withOpacity(0.5),
+ letterSpacing: 1,
+ ),
+ ),
+ const SizedBox(width: 10),
+ Container(
+ width: 30,
+ height: 1,
+ color: Colors.white.withOpacity(0.3),
+ ),
+ ],
+ ),
+ ),
+ const SizedBox(height: 30),
+ ],
+ ),
+ ),
+ ),
+ ),
+ ),
+ );
+ }
+}
diff --git a/lib/forgot_password.dart b/lib/forgot_password.dart
new file mode 100644
index 0000000..328ef6b
--- /dev/null
+++ b/lib/forgot_password.dart
@@ -0,0 +1,118 @@
+import 'package:flutter/material.dart';
+
+class ForgotPasswordScreen extends StatefulWidget {
+ const ForgotPasswordScreen({super.key});
+
+ @override
+ State createState() => _ForgotPasswordScreenState();
+}
+
+class _ForgotPasswordScreenState extends State {
+ int step = 0;
+
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ appBar: AppBar(
+ title: const Text("Reset Password"),
+ ),
+ body: Padding(
+ padding: const EdgeInsets.all(20),
+ child: Column(
+ children: [
+ if (step == 0) ...[
+ const Text(
+ "Masukkan nama akun dan Gmail",
+ style: TextStyle(fontSize: 18),
+ ),
+ const SizedBox(height: 20),
+ TextField(
+ decoration: InputDecoration(
+ hintText: "Nama Akun",
+ border: OutlineInputBorder(
+ borderRadius: BorderRadius.circular(10),
+ ),
+ ),
+ ),
+ const SizedBox(height: 20),
+ TextField(
+ decoration: InputDecoration(
+ hintText: "Gmail",
+ border: OutlineInputBorder(
+ borderRadius: BorderRadius.circular(10),
+ ),
+ ),
+ ),
+ const SizedBox(height: 30),
+ ElevatedButton(
+ onPressed: () {
+ setState(() {
+ step = 1;
+ });
+ },
+ child: const Text("Kirim Kode"),
+ ),
+ ],
+ if (step == 1) ...[
+ const Text(
+ "Masukkan kode verifikasi",
+ style: TextStyle(fontSize: 18),
+ ),
+ const SizedBox(height: 20),
+ TextField(
+ decoration: InputDecoration(
+ hintText: "Kode Verifikasi",
+ border: OutlineInputBorder(
+ borderRadius: BorderRadius.circular(10),
+ ),
+ ),
+ ),
+ const SizedBox(height: 30),
+ ElevatedButton(
+ onPressed: () {
+ setState(() {
+ step = 2;
+ });
+ },
+ child: const Text("Verifikasi"),
+ ),
+ ],
+ if (step == 2) ...[
+ const Text(
+ "Buat password baru",
+ style: TextStyle(fontSize: 18),
+ ),
+ const SizedBox(height: 20),
+ TextField(
+ obscureText: true,
+ decoration: InputDecoration(
+ hintText: "Password Baru",
+ border: OutlineInputBorder(
+ borderRadius: BorderRadius.circular(10),
+ ),
+ ),
+ ),
+ const SizedBox(height: 20),
+ TextField(
+ obscureText: true,
+ decoration: InputDecoration(
+ hintText: "Konfirmasi Password",
+ border: OutlineInputBorder(
+ borderRadius: BorderRadius.circular(10),
+ ),
+ ),
+ ),
+ const SizedBox(height: 30),
+ ElevatedButton(
+ onPressed: () {
+ Navigator.pop(context);
+ },
+ child: const Text("Simpan Password"),
+ ),
+ ],
+ ],
+ ),
+ ),
+ );
+ }
+}
diff --git a/lib/global_data.dart b/lib/global_data.dart
new file mode 100644
index 0000000..cdd3bf7
--- /dev/null
+++ b/lib/global_data.dart
@@ -0,0 +1,268 @@
+// global_data.dart
+import 'dart:convert';
+import 'package:http/http.dart' as http;
+import 'package:shared_preferences/shared_preferences.dart';
+
+const String BASE_URL = 'http://192.168.100.9/kopikaocare_api';
+
+List