diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..3820a95
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,45 @@
+# Miscellaneous
+*.class
+*.log
+*.pyc
+*.swp
+.DS_Store
+.atom/
+.build/
+.buildlog/
+.history
+.svn/
+.swiftpm/
+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-dependencies
+.pub-cache/
+.pub/
+/build/
+/coverage/
+
+# 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..84f56b1
--- /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: "d693b4b9dbac2acd4477aea4555ca6dcbea44ba2"
+ channel: "stable"
+
+project_type: app
+
+# Tracks metadata for the flutter migrate command
+migration:
+ platforms:
+ - platform: root
+ create_revision: d693b4b9dbac2acd4477aea4555ca6dcbea44ba2
+ base_revision: d693b4b9dbac2acd4477aea4555ca6dcbea44ba2
+ - platform: android
+ create_revision: d693b4b9dbac2acd4477aea4555ca6dcbea44ba2
+ base_revision: d693b4b9dbac2acd4477aea4555ca6dcbea44ba2
+ - platform: ios
+ create_revision: d693b4b9dbac2acd4477aea4555ca6dcbea44ba2
+ base_revision: d693b4b9dbac2acd4477aea4555ca6dcbea44ba2
+ - platform: linux
+ create_revision: d693b4b9dbac2acd4477aea4555ca6dcbea44ba2
+ base_revision: d693b4b9dbac2acd4477aea4555ca6dcbea44ba2
+ - platform: macos
+ create_revision: d693b4b9dbac2acd4477aea4555ca6dcbea44ba2
+ base_revision: d693b4b9dbac2acd4477aea4555ca6dcbea44ba2
+ - platform: web
+ create_revision: d693b4b9dbac2acd4477aea4555ca6dcbea44ba2
+ base_revision: d693b4b9dbac2acd4477aea4555ca6dcbea44ba2
+ - platform: windows
+ create_revision: d693b4b9dbac2acd4477aea4555ca6dcbea44ba2
+ base_revision: d693b4b9dbac2acd4477aea4555ca6dcbea44ba2
+
+ # 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..be3943c
--- /dev/null
+++ b/android/.gitignore
@@ -0,0 +1,14 @@
+gradle-wrapper.jar
+/.gradle
+/captures/
+/gradlew
+/gradlew.bat
+/local.properties
+GeneratedPluginRegistrant.java
+.cxx/
+
+# Remember to never publicly share your keystore.
+# See https://flutter.dev/to/reference-keystore
+key.properties
+**/*.keystore
+**/*.jks
diff --git a/android/app/build.gradle.kts b/android/app/build.gradle.kts
new file mode 100644
index 0000000..608e786
--- /dev/null
+++ b/android/app/build.gradle.kts
@@ -0,0 +1,47 @@
+plugins {
+ id("com.android.application")
+ // START: FlutterFire Configuration
+ id("com.google.gms.google-services")
+ // END: FlutterFire Configuration
+ 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.safebite"
+ compileSdk = flutter.compileSdkVersion
+ ndkVersion = flutter.ndkVersion
+
+ compileOptions {
+ sourceCompatibility = JavaVersion.VERSION_11
+ targetCompatibility = JavaVersion.VERSION_11
+ }
+
+ kotlinOptions {
+ jvmTarget = JavaVersion.VERSION_11.toString()
+ }
+
+ defaultConfig {
+ // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
+ applicationId = "com.example.safebite"
+ // You can update the following values to match your application needs.
+ // For more information, see: https://flutter.dev/to/review-gradle-config.
+ minSdk = flutter.minSdkVersion
+ targetSdk = flutter.targetSdkVersion
+ versionCode = flutter.versionCode
+ versionName = flutter.versionName
+ }
+
+ buildTypes {
+ release {
+ // TODO: Add your own signing config for the release build.
+ // Signing with the debug keys for now, so `flutter run --release` works.
+ signingConfig = signingConfigs.getByName("debug")
+ }
+ }
+}
+
+flutter {
+ source = "../.."
+}
diff --git a/android/app/google-services.json b/android/app/google-services.json
new file mode 100644
index 0000000..4260f81
--- /dev/null
+++ b/android/app/google-services.json
@@ -0,0 +1,29 @@
+{
+ "project_info": {
+ "project_number": "319358675566",
+ "project_id": "safebite-501da",
+ "storage_bucket": "safebite-501da.firebasestorage.app"
+ },
+ "client": [
+ {
+ "client_info": {
+ "mobilesdk_app_id": "1:319358675566:android:38e26748699fcbb861147f",
+ "android_client_info": {
+ "package_name": "com.example.safebite"
+ }
+ },
+ "oauth_client": [],
+ "api_key": [
+ {
+ "current_key": "AIzaSyChPHeIL7Zw3TRQUCIWiQfBuF0VR9LN7Ks"
+ }
+ ],
+ "services": {
+ "appinvite_service": {
+ "other_platform_oauth_client": []
+ }
+ }
+ }
+ ],
+ "configuration_version": "1"
+}
\ No newline at end of file
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..8ad5f49
--- /dev/null
+++ b/android/app/src/main/AndroidManifest.xml
@@ -0,0 +1,47 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/android/app/src/main/kotlin/com/example/safebite/MainActivity.kt b/android/app/src/main/kotlin/com/example/safebite/MainActivity.kt
new file mode 100644
index 0000000..eaf7e42
--- /dev/null
+++ b/android/app/src/main/kotlin/com/example/safebite/MainActivity.kt
@@ -0,0 +1,5 @@
+package com.example.safebite
+
+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..dec82c6
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..0e8a0a8
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..e188665
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..2c49567
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..47bf2f0
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.kts b/android/build.gradle.kts
new file mode 100644
index 0000000..dbee657
--- /dev/null
+++ b/android/build.gradle.kts
@@ -0,0 +1,24 @@
+allprojects {
+ repositories {
+ google()
+ mavenCentral()
+ }
+}
+
+val newBuildDir: Directory =
+ rootProject.layout.buildDirectory
+ .dir("../../build")
+ .get()
+rootProject.layout.buildDirectory.value(newBuildDir)
+
+subprojects {
+ val newSubprojectBuildDir: Directory = newBuildDir.dir(project.name)
+ project.layout.buildDirectory.value(newSubprojectBuildDir)
+}
+subprojects {
+ project.evaluationDependsOn(":app")
+}
+
+tasks.register("clean") {
+ delete(rootProject.layout.buildDirectory)
+}
diff --git a/android/gradle.properties b/android/gradle.properties
new file mode 100644
index 0000000..f018a61
--- /dev/null
+++ b/android/gradle.properties
@@ -0,0 +1,3 @@
+org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -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..ac3b479
--- /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.12-all.zip
diff --git a/android/settings.gradle.kts b/android/settings.gradle.kts
new file mode 100644
index 0000000..ff284ff
--- /dev/null
+++ b/android/settings.gradle.kts
@@ -0,0 +1,29 @@
+pluginManagement {
+ val flutterSdkPath =
+ run {
+ val properties = java.util.Properties()
+ file("local.properties").inputStream().use { properties.load(it) }
+ val flutterSdkPath = properties.getProperty("flutter.sdk")
+ require(flutterSdkPath != null) { "flutter.sdk not set in local.properties" }
+ flutterSdkPath
+ }
+
+ includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
+
+ repositories {
+ google()
+ mavenCentral()
+ gradlePluginPortal()
+ }
+}
+
+plugins {
+ id("dev.flutter.flutter-plugin-loader") version "1.0.0"
+ id("com.android.application") version "8.9.1" apply false
+ // START: FlutterFire Configuration
+ id("com.google.gms.google-services") version("4.3.15") apply false
+ // END: FlutterFire Configuration
+ id("org.jetbrains.kotlin.android") version "2.1.0" apply false
+}
+
+include(":app")
diff --git a/assets/images/logo_formalin.png b/assets/images/logo_formalin.png
new file mode 100644
index 0000000..6d4a6a5
Binary files /dev/null and b/assets/images/logo_formalin.png differ
diff --git a/assets/images/logo_formalin_2.png b/assets/images/logo_formalin_2.png
new file mode 100644
index 0000000..fa8c473
Binary files /dev/null and b/assets/images/logo_formalin_2.png differ
diff --git a/firebase.json b/firebase.json
new file mode 100644
index 0000000..4e0a77a
--- /dev/null
+++ b/firebase.json
@@ -0,0 +1 @@
+{"flutter":{"platforms":{"android":{"default":{"projectId":"safebite-501da","appId":"1:319358675566:android:38e26748699fcbb861147f","fileOutput":"android/app/google-services.json"}},"dart":{"lib/firebase_options.dart":{"projectId":"safebite-501da","configurations":{"android":"1:319358675566:android:38e26748699fcbb861147f","web":"1:319358675566:web:c01dc6c266465d4461147f","windows":"1:319358675566:web:d0fffa800b435e2461147f"}}}}}}
\ No newline at end of file
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..1dc6cf7
--- /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
+ 13.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..695ea6b
--- /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 = 13.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.safebite;
+ 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.safebite.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.safebite.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.safebite.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 = AppIcon;
+ 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 = 13.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 = AppIcon;
+ 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 = 13.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.safebite;
+ 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.safebite;
+ 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..e3773d4
--- /dev/null
+++ b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
@@ -0,0 +1,101 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
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..3ac7af5
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..fb350d0
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..4969121
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..52851ef
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..025a36b
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..e9e0308
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..e88aa01
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..4969121
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..92176e5
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..142ed9f
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-50x50@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png
new file mode 100644
index 0000000..0e2de6e
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png
new file mode 100644
index 0000000..7ac4392
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png
new file mode 100644
index 0000000..aa195be
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png
new file mode 100644
index 0000000..f00bb4b
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.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..142ed9f
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..0033779
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-72x72@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png
new file mode 100644
index 0000000..dec82c6
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png
new file mode 100644
index 0000000..2c49567
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.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..04e2702
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..f796497
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..2cfb45b
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..c2da7e8
--- /dev/null
+++ b/ios/Runner/Info.plist
@@ -0,0 +1,49 @@
+
+
+
+
+ CFBundleDevelopmentRegion
+ $(DEVELOPMENT_LANGUAGE)
+ CFBundleDisplayName
+ Safebite
+ CFBundleExecutable
+ $(EXECUTABLE_NAME)
+ CFBundleIdentifier
+ $(PRODUCT_BUNDLE_IDENTIFIER)
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ safebite
+ 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/firebase_options.dart b/lib/firebase_options.dart
new file mode 100644
index 0000000..3dd9f10
--- /dev/null
+++ b/lib/firebase_options.dart
@@ -0,0 +1,79 @@
+// File generated by FlutterFire CLI.
+// ignore_for_file: type=lint
+import 'package:firebase_core/firebase_core.dart' show FirebaseOptions;
+import 'package:flutter/foundation.dart'
+ show defaultTargetPlatform, kIsWeb, TargetPlatform;
+
+/// Default [FirebaseOptions] for use with your Firebase apps.
+///
+/// Example:
+/// ```dart
+/// import 'firebase_options.dart';
+/// // ...
+/// await Firebase.initializeApp(
+/// options: DefaultFirebaseOptions.currentPlatform,
+/// );
+/// ```
+class DefaultFirebaseOptions {
+ static FirebaseOptions get currentPlatform {
+ if (kIsWeb) {
+ return web;
+ }
+ switch (defaultTargetPlatform) {
+ case TargetPlatform.android:
+ return android;
+ case TargetPlatform.iOS:
+ throw UnsupportedError(
+ 'DefaultFirebaseOptions have not been configured for ios - '
+ 'you can reconfigure this by running the FlutterFire CLI again.',
+ );
+ case TargetPlatform.macOS:
+ throw UnsupportedError(
+ 'DefaultFirebaseOptions have not been configured for macos - '
+ 'you can reconfigure this by running the FlutterFire CLI again.',
+ );
+ case TargetPlatform.windows:
+ return windows;
+ case TargetPlatform.linux:
+ throw UnsupportedError(
+ 'DefaultFirebaseOptions have not been configured for linux - '
+ 'you can reconfigure this by running the FlutterFire CLI again.',
+ );
+ default:
+ throw UnsupportedError(
+ 'DefaultFirebaseOptions are not supported for this platform.',
+ );
+ }
+ }
+
+ static const FirebaseOptions web = FirebaseOptions(
+ apiKey: 'AIzaSyB0cHw-ONVE1m-MiIv1_r0P91xgNVEOQ-Q',
+ appId: '1:319358675566:web:c01dc6c266465d4461147f',
+ messagingSenderId: '319358675566',
+ projectId: 'safebite-501da',
+ authDomain: 'safebite-501da.firebaseapp.com',
+ storageBucket: 'safebite-501da.firebasestorage.app',
+ measurementId: 'G-NG8Y1LD92S',
+ databaseURL: 'https://safebite-501da-default-rtdb.firebaseio.com/',
+ );
+
+ static const FirebaseOptions android = FirebaseOptions(
+ apiKey: 'AIzaSyChPHeIL7Zw3TRQUCIWiQfBuF0VR9LN7Ks',
+ appId: '1:319358675566:android:38e26748699fcbb861147f',
+ messagingSenderId: '319358675566',
+ projectId: 'safebite-501da',
+ storageBucket: 'safebite-501da.firebasestorage.app',
+ databaseURL: 'https://safebite-501da-default-rtdb.firebaseio.com/',
+ );
+
+ static const FirebaseOptions windows = FirebaseOptions(
+ apiKey: 'AIzaSyB0cHw-ONVE1m-MiIv1_r0P91xgNVEOQ-Q',
+ appId: '1:319358675566:web:d0fffa800b435e2461147f',
+ messagingSenderId: '319358675566',
+ projectId: 'safebite-501da',
+ authDomain: 'safebite-501da.firebaseapp.com',
+ storageBucket: 'safebite-501da.firebasestorage.app',
+ measurementId: 'G-BV585SDD70',
+ databaseURL: 'https://safebite-501da-default-rtdb.firebaseio.com/',
+ );
+}
diff --git a/lib/main.dart b/lib/main.dart
new file mode 100644
index 0000000..60d18e7
--- /dev/null
+++ b/lib/main.dart
@@ -0,0 +1,113 @@
+// ============================
+// main.dart
+// ============================
+
+import 'package:flutter/material.dart';
+import 'package:firebase_core/firebase_core.dart';
+import 'package:firebase_auth/firebase_auth.dart';
+import 'package:firebase_database/firebase_database.dart';
+import 'package:flutter/foundation.dart';
+
+import 'firebase_options.dart';
+import 'widgets/whatsapp_notification.dart';
+
+// IMPORT PAGE
+import 'screen/welcome.dart';
+import 'screen/login.dart';
+import 'screen/signup.dart';
+import 'screen/dashboard.dart';
+import 'screen/notifikasi.dart';
+import 'screen/history.dart';
+
+Future main() async {
+ try {
+ WidgetsFlutterBinding.ensureInitialized();
+
+ await Firebase.initializeApp(
+ options: DefaultFirebaseOptions.currentPlatform,
+ );
+
+ // REALTIME CACHE
+ if (!kIsWeb) {
+ FirebaseDatabase.instance.setPersistenceEnabled(true);
+ }
+ } catch (e) {
+ debugPrint("Firebase Init Error: $e");
+ }
+
+ runApp(const SafebiteApp());
+}
+
+class SafebiteApp extends StatelessWidget {
+ const SafebiteApp({super.key});
+
+ @override
+ Widget build(BuildContext context) {
+ return MaterialApp(
+ navigatorKey: navigatorKey,
+ debugShowCheckedModeBanner: false,
+ title: 'Safebite',
+
+ theme: ThemeData(
+ useMaterial3: true,
+ colorSchemeSeed: const Color(0xFF4DB6AC),
+ scaffoldBackgroundColor: const Color(0xFFF2F6F6),
+ ),
+
+ initialRoute: '/',
+
+ routes: {
+ '/': (context) => AuthGate(),
+ '/welcome': (context) => WelcomePage(),
+ '/login': (context) => LoginPage(),
+ '/signup': (context) => RegisterPage(),
+ '/dashboard': (context) => const DashboardPage(),
+ '/notifikasi': (context) => const NotifikasiPage(),
+ '/history': (context) => const RiwayatPage(),
+ },
+ );
+ }
+}
+
+// ============================
+// AUTH CHECK
+// ============================
+
+class AuthGate extends StatelessWidget {
+
+ @override
+ Widget build(BuildContext context) {
+
+ return StreamBuilder(
+ stream: FirebaseAuth.instance.authStateChanges(),
+
+ builder: (context, snapshot) {
+
+ if (snapshot.hasError) {
+
+ debugPrint("AUTH ERROR: ${snapshot.error}");
+
+ return WelcomePage();
+ }
+
+ if (snapshot.connectionState ==
+ ConnectionState.waiting) {
+
+ return const Scaffold(
+ backgroundColor: Color(0xFFF2F6F6),
+ body: Center(
+ child: CircularProgressIndicator(),
+ ),
+ );
+ }
+
+ if (snapshot.hasData) {
+
+ return const DashboardPage();
+ }
+
+ return WelcomePage();
+ },
+ );
+ }
+}
\ No newline at end of file
diff --git a/lib/screen/akun.dart b/lib/screen/akun.dart
new file mode 100644
index 0000000..0db3c2b
--- /dev/null
+++ b/lib/screen/akun.dart
@@ -0,0 +1,443 @@
+import 'package:flutter/material.dart';
+import 'package:firebase_auth/firebase_auth.dart';
+import 'dashboard.dart';
+import 'history.dart';
+import 'notifikasi.dart';
+import '../widgets/whatsapp_notification.dart';
+import '../widgets/fade_in_up.dart'; // Import animasi
+import 'package:firebase_database/firebase_database.dart';
+
+class AkunPage extends StatelessWidget {
+ const AkunPage({super.key});
+
+ @override
+ Widget build(BuildContext context) {
+ final user = FirebaseAuth.instance.currentUser;
+
+ // Gunakan displayName jika ada, jika tidak gunakan bagian depan email, jika tidak ada gunakan default
+ String displayName = user?.displayName ?? "Pengguna SafeBite";
+ if (user?.displayName == null && user?.email != null) {
+ displayName = user!.email!.split('@')[0];
+ }
+ String emailOrPhone = user?.email ?? "0812xxxxxx";
+
+ return Scaffold(
+ body: Container(
+ width: double.infinity,
+ height: double.infinity,
+ decoration: const BoxDecoration(
+ gradient: LinearGradient(
+ colors: [
+ Colors.white,
+ Color(0xFFE3F2FD),
+ Color(0xFF42A5F5),
+ Color(0xFF1565C0),
+ ],
+ begin: Alignment.topCenter,
+ end: Alignment.bottomCenter,
+ ),
+ ),
+ child: SafeArea(
+ child: Column(
+ children: [
+ const SizedBox(height: 10),
+
+ // 1. PROFILE INFO SECTION (Animated & Centered)
+ Padding(
+ padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 20),
+ child: FadeInUp(
+ delay: 150,
+ child: Container(
+ width: double.infinity,
+ decoration: const BoxDecoration(
+ color: Colors.transparent,
+ ),
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ // Animated Icon
+ TweenAnimationBuilder(
+ tween: Tween(begin: 0.9, end: 1.0),
+ duration: const Duration(seconds: 2),
+ curve: Curves.easeInOut,
+ onEnd: () {}, // No-op to allow repeat if wrapped
+ builder: (context, double value, child) {
+ return Transform.scale(
+ scale: value,
+ child: child,
+ );
+ },
+ child: Container(
+ padding: const EdgeInsets.all(15),
+ decoration: BoxDecoration(
+ color: const Color(0xFF1565C0).withOpacity(0.1),
+ shape: BoxShape.circle,
+ ),
+ child: const Icon(
+ Icons.account_circle_rounded,
+ size: 80,
+ color: Color(0xFF1565C0),
+ ),
+ ),
+ ),
+ const SizedBox(height: 15),
+ const Text(
+ "Account",
+ style: TextStyle(
+ fontSize: 22,
+ fontWeight: FontWeight.bold,
+ color: Color(0xFF1565C0),
+ letterSpacing: 1.2,
+ ),
+ ),
+ const Text(
+ "SafeBite User Profile",
+ style: TextStyle(
+ fontSize: 13,
+ color: Colors.grey,
+ ),
+ ),
+ ],
+ ),
+ ),
+ ),
+ ),
+
+ // INFORMASI PROJECT DAN AKUN DENGAN ANIMASI
+ Expanded(
+ child: SingleChildScrollView(
+ padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 25),
+ child: Column(
+ children: [
+
+ // KARTU INFORMASI PROJECT
+ FadeInUp(
+ delay: 200,
+ child: Container(
+ width: double.infinity,
+ padding: const EdgeInsets.all(20),
+ decoration: BoxDecoration(
+ color: Colors.white,
+ borderRadius: BorderRadius.circular(20),
+ boxShadow: [
+ BoxShadow(
+ color: Colors.black.withOpacity(0.04),
+ blurRadius: 10,
+ offset: const Offset(0, 4),
+ ),
+ ],
+ ),
+ child: Column(
+ children: [
+ Container(
+ padding: const EdgeInsets.all(12),
+ decoration: BoxDecoration(
+ color: const Color(0xFFE3F2FD),
+ shape: BoxShape.circle,
+ ),
+ child: const Icon(Icons.verified_user_rounded, color: Color(0xFF1565C0), size: 35),
+ ),
+ const SizedBox(height: 15),
+ const Text(
+ "SafeBite Project",
+ style: TextStyle(
+ fontSize: 18,
+ fontWeight: FontWeight.bold,
+ color: Color(0xFF1565C0),
+ ),
+ ),
+ const SizedBox(height: 5),
+ Text(
+ "Alat Pendeteksi Kandungan Formalin\npada Makanan secara Real-Time",
+ textAlign: TextAlign.center,
+ style: TextStyle(
+ fontSize: 13,
+ color: Colors.grey.shade600,
+ height: 1.4,
+ ),
+ ),
+ ],
+ ),
+ ),
+ ),
+
+ const SizedBox(height: 20),
+
+ // KARTU DETAIL AKUN
+ FadeInUp(
+ delay: 300,
+ child: Container(
+ width: double.infinity,
+ padding: const EdgeInsets.all(20),
+ decoration: BoxDecoration(
+ color: Colors.white,
+ borderRadius: BorderRadius.circular(20),
+ boxShadow: [
+ BoxShadow(
+ color: Colors.black.withOpacity(0.04),
+ blurRadius: 10,
+ offset: const Offset(0, 4),
+ ),
+ ],
+ ),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ const Text(
+ "Detail Login",
+ style: TextStyle(
+ fontSize: 16,
+ fontWeight: FontWeight.bold,
+ color: Colors.black87,
+ ),
+ ),
+ const SizedBox(height: 15),
+ Row(
+ children: [
+ Container(
+ padding: const EdgeInsets.all(10),
+ decoration: BoxDecoration(
+ color: Colors.grey.shade100,
+ borderRadius: BorderRadius.circular(10),
+ ),
+ child: const Icon(Icons.email_outlined, color: Colors.black54),
+ ),
+ const SizedBox(width: 15),
+ Expanded(
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ const Text("Email", style: TextStyle(fontSize: 12, color: Colors.grey)),
+ const SizedBox(height: 2),
+ Text(
+ emailOrPhone,
+ style: const TextStyle(fontSize: 15, fontWeight: FontWeight.bold, color: Colors.black87),
+ ),
+ ],
+ ),
+ ),
+ ],
+ ),
+ const SizedBox(height: 15),
+ GestureDetector(
+ onTap: () => _handleResetPpm(context),
+ child: Container(
+ color: Colors.transparent,
+ child: Row(
+ children: [
+ Container(
+ padding: const EdgeInsets.all(10),
+ decoration: BoxDecoration(
+ color: const Color(0xFFE3F2FD),
+ borderRadius: BorderRadius.circular(10),
+ ),
+ child: const Icon(Icons.restart_alt_rounded, color: Color(0xFF1565C0)),
+ ),
+ const SizedBox(width: 15),
+ const Expanded(
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Text("Reset PPM", style: TextStyle(fontSize: 12, color: Colors.grey)),
+ SizedBox(height: 2),
+ Text(
+ "Reset Sensor PPM ke 0.0",
+ style: TextStyle(fontSize: 15, fontWeight: FontWeight.bold, color: Color(0xFF1565C0)),
+ ),
+ ],
+ ),
+ ),
+ ],
+ ),
+ ),
+ ),
+ ],
+ ),
+ ),
+ ),
+
+ const SizedBox(height: 60),
+
+ // TOMBOL LOGOUT
+ FadeInUp(
+ delay: 400,
+ child: GestureDetector(
+ onTap: () => _handleLogout(context),
+ child: Container(
+ width: double.infinity,
+ padding: const EdgeInsets.symmetric(vertical: 16),
+ decoration: BoxDecoration(
+ color: Colors.white,
+ borderRadius: BorderRadius.circular(15),
+ border: Border.all(color: Colors.redAccent.withOpacity(0.5), width: 1.5),
+ boxShadow: [
+ BoxShadow(
+ color: Colors.redAccent.withOpacity(0.05),
+ blurRadius: 10,
+ offset: const Offset(0, 4),
+ ),
+ ],
+ ),
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: const [
+ Icon(Icons.logout_rounded, color: Colors.redAccent, size: 22),
+ SizedBox(width: 10),
+ Text(
+ "Log Out",
+ style: TextStyle(
+ color: Colors.redAccent,
+ fontSize: 16,
+ fontWeight: FontWeight.bold,
+ letterSpacing: 0.5,
+ ),
+ ),
+ ],
+ ),
+ ),
+ ),
+ ),
+ const SizedBox(height: 20),
+ ],
+ ),
+ ),
+ ),
+ ],
+ ),
+ ),
+ ),
+ bottomNavigationBar: BottomNavigationBar(
+ currentIndex: 3, // Highlight index Akun (0: Home, 1: History, 2: Notif, 3: Akun)
+ selectedItemColor: const Color(0xFF1565C0),
+ unselectedItemColor: Colors.grey,
+ type: BottomNavigationBarType.fixed, // Penting jika item > 3
+ onTap: (index) {
+ if (index == 0) {
+ Navigator.pushReplacement(
+ context,
+ MaterialPageRoute(builder: (context) => const DashboardPage()),
+ );
+ } else if (index == 1) {
+ Navigator.pushReplacement(
+ context,
+ MaterialPageRoute(builder: (context) => const RiwayatPage()),
+ );
+ } else if (index == 2) {
+ Navigator.pushReplacement(
+ context,
+ MaterialPageRoute(builder: (context) => const NotifikasiPage()),
+ );
+ }
+ },
+ items: const [
+ BottomNavigationBarItem(icon: Icon(Icons.home), label: "Beranda"),
+ BottomNavigationBarItem(icon: Icon(Icons.history), label: "History"),
+ BottomNavigationBarItem(icon: Icon(Icons.notifications), label: "Notif"),
+ BottomNavigationBarItem(icon: Icon(Icons.person), label: "Saya"),
+ ],
+ ),
+ );
+ } void _handleResetPpm(BuildContext context) async {
+ bool confirm = await showDialog(
+ context: context,
+ builder: (context) => AlertDialog(
+ shape: RoundedRectangleBorder(
+ borderRadius: BorderRadius.circular(15),
+ ),
+ title: Row(
+ children: const [
+ Icon(Icons.restart_alt_rounded, color: Color(0xFF1565C0)),
+ SizedBox(width: 10),
+ Text("Reset PPM Sensor"),
+ ],
+ ),
+ content: const Text(
+ "Apakah Anda yakin ingin mereset nilai PPM sensor menjadi 0.0?",
+ style: TextStyle(fontSize: 14),
+ ),
+ actions: [
+ TextButton(
+ onPressed: () => Navigator.pop(context, false),
+ child: const Text("Batal", style: TextStyle(color: Colors.grey)),
+ ),
+ TextButton(
+ onPressed: () => Navigator.pop(context, true),
+ child: const Text(
+ "Reset",
+ style: TextStyle(color: Colors.red, fontWeight: FontWeight.bold),
+ ),
+ ),
+ ],
+ ),
+ ) ??
+ false;
+
+ if (confirm) {
+ try {
+ await FirebaseDatabase.instance.ref().child("kontrol/reset").set(1);
+ if (context.mounted) {
+ ScaffoldMessenger.of(context).showSnackBar(
+ const SnackBar(
+ content: Row(
+ children: [
+ Icon(Icons.check_circle_outline, color: Colors.white),
+ SizedBox(width: 10),
+ Expanded(
+ child: Text("Perintah Reset dikirim! Kalibrasi sensor dimulai..."),
+ ),
+ ],
+ ),
+ backgroundColor: Colors.green,
+ behavior: SnackBarBehavior.floating,
+ ),
+ );
+ }
+ } catch (e) {
+ if (context.mounted) {
+ ScaffoldMessenger.of(context).showSnackBar(
+ SnackBar(
+ content: Row(
+ children: [
+ const Icon(Icons.error_outline, color: Colors.white),
+ const SizedBox(width: 10),
+ Expanded(child: Text("Gagal mereset PPM: $e")),
+ ],
+ ),
+ backgroundColor: Colors.redAccent,
+ behavior: SnackBarBehavior.floating,
+ ),
+ );
+ }
+ }
+ }
+ }
+
+ void _handleLogout(BuildContext context) async {
+ bool confirm = await showDialog(
+ context: context,
+ builder: (context) => AlertDialog(
+ title: const Text("Konfirmasi Logout"),
+ content: const Text("Apakah Anda yakin ingin keluar dari akun ini?"),
+ actions: [
+ TextButton(
+ onPressed: () => Navigator.pop(context, false),
+ child: const Text("Batal", style: TextStyle(color: Colors.grey)),
+ ),
+ TextButton(
+ onPressed: () => Navigator.pop(context, true),
+ child: const Text("Keluar", style: TextStyle(color: Colors.red, fontWeight: FontWeight.bold)),
+ ),
+ ],
+ ),
+ ) ??
+ false;
+
+ if (confirm) {
+ WhatsAppNotificationService().stopListening();
+ await FirebaseAuth.instance.signOut();
+ if (context.mounted) {
+ Navigator.pushNamedAndRemoveUntil(context, '/welcome', (route) => false);
+ }
+ }
+ }
+}
diff --git a/lib/screen/dashboard.dart b/lib/screen/dashboard.dart
new file mode 100644
index 0000000..74d71ae
--- /dev/null
+++ b/lib/screen/dashboard.dart
@@ -0,0 +1,1232 @@
+import 'dart:async';
+import 'package:flutter/material.dart';
+import 'package:firebase_database/firebase_database.dart';
+import 'package:firebase_auth/firebase_auth.dart';
+import 'package:fl_chart/fl_chart.dart';
+import 'package:intl/intl.dart';
+import 'history.dart';
+import 'notifikasi.dart';
+import '../widgets/fade_in_up.dart';
+import '../widgets/whatsapp_notification.dart';
+import 'akun.dart';
+import '../utils/knn_classifier.dart';
+
+class DashboardPage extends StatefulWidget {
+ const DashboardPage({super.key});
+
+ @override
+ State createState() => _DashboardPageState();
+}
+
+class _DashboardPageState extends State {
+ final db = FirebaseDatabase.instance.ref();
+
+ double ppm = 0.0;
+ double displayPpm = 0.0;
+ double lastTestedPpm = 0.0;
+ Timer? _interpolationTimer;
+ int fanStatus = 0;
+
+ String selectedFood = "Monitoring";
+ bool isTesting = false;
+ bool isFoodMenuExpanded = false;
+
+ // 🔥 REALTIME GRAPH
+ List realtimeData = [];
+ int timeIndex = 0;
+
+ StreamSubscription? startListener;
+ StreamSubscription? _ppmSubscription;
+ StreamSubscription? _historySubscription;
+ StreamSubscription? _fanSubscription;
+ bool _isInteractingWithChart = false;
+
+ @override
+ void initState() {
+ super.initState();
+ WhatsAppNotificationService().startListening();
+ readData();
+ // Inisialisasi awal Firebase ke mode monitoring
+ db.child("kontrol").update({"makanan": "Monitoring", "start": 0});
+ }
+
+ @override
+ void dispose() {
+ startListener?.cancel();
+ _ppmSubscription?.cancel();
+ _historySubscription?.cancel();
+ _fanSubscription?.cancel();
+ _interpolationTimer?.cancel();
+ super.dispose();
+ }
+
+ void readData() {
+ // ================= SENSOR REALTIME =================
+ _ppmSubscription?.cancel();
+ _ppmSubscription = db.child("sensor/formalin_ppm").onValue.listen((event) {
+ print("REALTIME PPM: ${event.snapshot.value}");
+
+ final data = event.snapshot.value;
+
+ if (data != null && mounted) {
+ double val = double.tryParse(data.toString()) ?? 0.0;
+
+ setState(() {
+ ppm = val;
+ if (!isTesting) {
+ displayPpm = val;
+
+ // Tambahkan data ke grafik secara realtime saat standby
+ realtimeData.add(FlSpot(timeIndex.toDouble(), val));
+ timeIndex++;
+ if (realtimeData.length > 30) {
+ realtimeData.removeAt(0);
+ }
+ }
+ });
+ }
+ });
+
+ // ================= LAST TEST RESULT =================
+ _historySubscription?.cancel();
+ _historySubscription = db.child("sensor/history").limitToLast(1).onValue.listen((event) {
+ final data = event.snapshot.value as Map?;
+ if (data != null && data.isNotEmpty && mounted) {
+ final lastEntry = data.values.first as Map?;
+ double lastPpm = double.tryParse(lastEntry?["ppm"]?.toString() ?? "") ?? 0.0;
+
+ setState(() {
+ lastTestedPpm = lastPpm;
+ });
+ }
+ });
+
+ // ================= FAN REALTIME =================
+ _fanSubscription?.cancel();
+ _fanSubscription = db.child("sensor/fan").onValue.listen((event) {
+ print("REALTIME FAN: ${event.snapshot.value}");
+
+ final data = event.snapshot.value;
+
+ if (data != null && mounted) {
+ int newFanStatus = int.tryParse(data.toString()) ?? 0;
+ setState(() {
+ fanStatus = newFanStatus;
+ });
+ }
+ });
+
+ // ================= START REALTIME =================
+ startListener?.cancel();
+
+ startListener = db.child("kontrol/start").onValue.listen((event) {
+ print("REALTIME START: ${event.snapshot.value}");
+
+ final val = event.snapshot.value;
+
+ final startValue = int.tryParse(val.toString()) ?? 0;
+
+ // TEST SELESAI
+ if (startValue == 0 && isTesting && mounted) {
+ final testedFood = selectedFood;
+ _interpolationTimer?.cancel();
+
+ // Delay 1 detik untuk menghindari race condition agar Firebase selesai memproses data baru dari ESP32
+ Future.delayed(const Duration(milliseconds: 1000), () async {
+ if (!mounted) return;
+
+ double finalPpm = ppm;
+ try {
+ final snapshot = await db.child("sensor/hasil_akhir").get();
+ if (snapshot.value != null) {
+ finalPpm = double.tryParse(snapshot.value.toString()) ?? ppm;
+ }
+ } catch (e) {
+ print("Error fetching hasil_akhir: $e");
+ }
+
+ if (mounted) {
+ setState(() {
+ isTesting = false;
+ selectedFood = "Monitoring"; // Kembalikan ke mode monitoring di UI
+ lastTestedPpm = finalPpm;
+ displayPpm = finalPpm;
+ realtimeData.clear();
+ timeIndex = 0;
+ });
+
+ tampilkanHasil(testedFood);
+
+ // Update Firebase ke mode monitoring
+ db.child("kontrol").update({"makanan": "Monitoring", "start": 0});
+
+ // 🔥 SINKRONISASI: Simpan hasil uji ke history Firebase
+ final historyRef = db.child("sensor/history").push();
+ final nowSeconds = DateTime.now().millisecondsSinceEpoch ~/ 1000;
+ String statusKnn = klasifikasiKNN(finalPpm);
+ historyRef.set({
+ "makanan": testedFood,
+ "ppm": finalPpm,
+ "timestamp": nowSeconds,
+ "keterangan": statusKnn,
+ });
+
+ // 🔥 SINKRONISASI: Kirim notifikasi / alert ke path notifikasi Firebase
+ final notifRef = db.child("notifikasi").push();
+ final timeString = DateFormat('HH:mm').format(DateTime.now());
+ notifRef.set({
+ "title": statusKnn == "Bahaya" ? "Peringatan Bahaya!" : (statusKnn == "Sedang" ? "Peringatan Sedang!" : "Pemberitahuan Aman"),
+ "message": statusKnn == "Bahaya"
+ ? "Terdeteksi kandungan formalin tinggi pada $testedFood (${finalPpm.toStringAsFixed(2)} PPM)!"
+ : (statusKnn == "Sedang"
+ ? "Terdeteksi kandungan formalin sedang pada $testedFood (${finalPpm.toStringAsFixed(2)} PPM)."
+ : "$testedFood aman dari kandungan formalin (${finalPpm.toStringAsFixed(2)} PPM)."),
+ "timestamp": DateTime.now().millisecondsSinceEpoch,
+ "time": timeString,
+ });
+ }
+ });
+ }
+ });
+ }
+
+
+
+ // ================= DETEKSI =================
+ void mulaiPengujian(String makanan) async {
+ if (isTesting) return;
+
+ setState(() {
+ isTesting = true;
+ selectedFood = makanan;
+ displayPpm = 0.0;
+
+ // reset grafik realtime
+ realtimeData.clear();
+ timeIndex = 0;
+ });
+
+ _startInterpolation();
+
+ await db.child("kontrol").update({"makanan": makanan, "start": 1});
+
+ ScaffoldMessenger.of(context).showSnackBar(
+ SnackBar(content: Text("Mendeteksi $makanan selama 10 detik...")),
+ );
+ }
+
+ void batalkanPengujian() async {
+ _interpolationTimer?.cancel();
+ setState(() {
+ isTesting = false;
+ selectedFood = "Monitoring";
+ displayPpm = ppm;
+ realtimeData.clear();
+ timeIndex = 0;
+ });
+
+ await db.child("kontrol").update({"makanan": "Monitoring", "start": 0, "reset": 1});
+
+ ScaffoldMessenger.of(context).showSnackBar(
+ const SnackBar(
+ duration: Duration(milliseconds: 1500),
+ content: Text("Pengujian dibatalkan. Kembali ke mode Monitoring."),
+ ),
+ );
+ }
+
+ void _startInterpolation() {
+ _interpolationTimer?.cancel();
+ _interpolationTimer = Timer.periodic(const Duration(milliseconds: 100), (timer) {
+ if (!mounted || !isTesting) {
+ timer.cancel();
+ return;
+ }
+
+ setState(() {
+ if (displayPpm < ppm) {
+ double diff = ppm - displayPpm;
+ if (diff > 0.02) {
+ displayPpm += diff * 0.12; // Asymptotical rise
+ } else {
+ displayPpm = ppm;
+ }
+ } else if (displayPpm > ppm) {
+ double diff = displayPpm - ppm;
+ if (diff > 0.02) {
+ displayPpm -= diff * 0.12;
+ } else {
+ displayPpm = ppm;
+ }
+ }
+
+ double roundedDisplay = double.parse((displayPpm ?? 0.0).toStringAsFixed(2));
+
+ realtimeData.add(FlSpot(timeIndex.toDouble(), roundedDisplay));
+ timeIndex++;
+ if (realtimeData.length > 30) {
+ realtimeData.removeAt(0);
+ }
+ });
+ });
+ }
+
+ void tampilkanHasil(String makanan) {
+ String status;
+ String message;
+ double resultPpm = lastTestedPpm ?? 0.0;
+ String statusKnn = klasifikasiKNN(resultPpm);
+
+ if (statusKnn == "Bahaya") {
+ status = "Hasil Uji: BERBAHAYA!";
+ message =
+ "Peringatan! Terdeteksi kandungan FORMALIN TINGGI pada $makanan (Rata-rata: ${resultPpm.toStringAsFixed(2)} PPM). JANGAN DIKONSUMSI!";
+ } else if (statusKnn == "Sedang") {
+ status = "Hasil Uji: SEDANG";
+ message = "Perhatian. Terdeteksi kandungan formalin tingkat SEDANG pada $makanan (Rata-rata: ${resultPpm.toStringAsFixed(2)} PPM). Disarankan untuk lebih waspada.";
+ } else {
+ status = "Hasil Uji: AMAN";
+ message =
+ "Makanan $makanan AMAN dari formalin. Silakan konsumsi!";
+ }
+
+ showDialog(
+ context: context,
+ builder: (context) => AlertDialog(
+ title: Text(
+ status,
+ style: TextStyle(
+ color: statusKnn == "Bahaya"
+ ? Colors.redAccent
+ : (statusKnn == "Sedang" ? Colors.orangeAccent : const Color(0xFF1565C0)),
+ fontWeight: FontWeight.bold,
+ ),
+ ),
+ content: Text(
+ "Kadar HCHO pada $makanan adalah ${resultPpm.toStringAsFixed(2)} PPM\n\n$message",
+ ),
+ actions: [
+ TextButton(
+ onPressed: () => Navigator.pop(context),
+ child: const Text("OK"),
+ ),
+ ],
+ ),
+ );
+ }
+
+
+
+
+ @override
+ Widget build(BuildContext context) {
+ final statusKnn = klasifikasiKNN(displayPpm);
+ bool isBahaya = statusKnn == "Bahaya";
+
+ return Scaffold(
+ body: Container(
+ width: double.infinity,
+ height: double.infinity,
+ decoration: const BoxDecoration(
+ gradient: LinearGradient(
+ colors: [
+ Colors.white,
+ Color(0xFFE3F2FD), // Light blue
+ Color(0xFF42A5F5), // Medium blue
+ Color(0xFF1565C0), // Dark blue
+ ],
+ begin: Alignment.topCenter,
+ end: Alignment.bottomCenter,
+ ),
+ ),
+ child: SafeArea(
+ child: SingleChildScrollView(
+ physics: _isInteractingWithChart
+ ? const NeverScrollableScrollPhysics()
+ : const BouncingScrollPhysics(),
+ padding: const EdgeInsets.all(20),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ // 0. GREETING SECTION
+ FadeInUp(
+ delay: 50,
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ const Text(
+ "Hello!",
+ style: TextStyle(
+ fontSize: 24,
+ fontWeight: FontWeight.bold,
+ color: Color(0xFF1565C0),
+ ),
+ ),
+ Text(
+ "Welcome to SafeBite",
+ style: TextStyle(
+ fontSize: 14,
+ fontWeight: FontWeight.w500,
+ color: const Color(0xFF1565C0).withOpacity(0.7),
+ ),
+ ),
+ ],
+ ),
+ ),
+
+ const SizedBox(height: 15),
+
+ // 1. FORMALIN PPM CARD (Replacing Status Aman/Berbahaya)
+ FadeInUp(
+ delay: 100,
+ child: AnimatedContainer(
+ duration: const Duration(milliseconds: 600),
+ curve: Curves.easeInOut,
+ width: double.infinity,
+ padding: const EdgeInsets.symmetric(
+ vertical: 25,
+ horizontal: 20,
+ ),
+ decoration: BoxDecoration(
+ color: statusKnn == "Bahaya"
+ ? Colors.redAccent
+ : (statusKnn == "Sedang"
+ ? Colors.orangeAccent
+ : const Color(0xFF1565C0)),
+ borderRadius: BorderRadius.circular(18),
+ boxShadow: [
+ BoxShadow(
+ color: (statusKnn == "Bahaya"
+ ? Colors.redAccent
+ : (statusKnn == "Sedang"
+ ? Colors.orangeAccent
+ : const Color(0xFF1565C0)))
+ .withOpacity(statusKnn == "Bahaya" ? 0.45 : 0.25),
+ blurRadius: statusKnn == "Bahaya" ? 24 : 12,
+ spreadRadius: statusKnn == "Bahaya" ? 3 : 0,
+ offset: const Offset(0, 8),
+ ),
+ ],
+ ),
+ child: Column(
+ children: [
+ Text(
+ "FORMALIN PPM",
+ style: TextStyle(
+ fontSize: 16,
+ fontWeight: FontWeight.bold,
+ color: Colors.white.withOpacity(0.8),
+ letterSpacing: 1.2,
+ ),
+ ),
+ const SizedBox(height: 10),
+ TweenAnimationBuilder(
+ tween: Tween(begin: 0.0, end: displayPpm ?? 0.0),
+ duration: const Duration(milliseconds: 600),
+ curve: Curves.easeOutCubic,
+ builder: (context, val, child) {
+ return Text(
+ (val ?? 0.0).toStringAsFixed(2),
+ style: const TextStyle(
+ fontSize: 48,
+ fontWeight: FontWeight.bold,
+ color: Colors.white,
+ ),
+ );
+ },
+ ),
+ const SizedBox(height: 5),
+ AnimatedSwitcher(
+ duration: const Duration(milliseconds: 300),
+ transitionBuilder: (child, animation) {
+ return FadeTransition(
+ opacity: animation,
+ child: ScaleTransition(scale: animation, child: child),
+ );
+ },
+ child: Text(
+ statusKnn == "Bahaya"
+ ? "BAHAYA"
+ : (statusKnn == "Sedang"
+ ? "SEDANG"
+ : "AMAN"),
+ key: ValueKey(statusKnn),
+ style: const TextStyle(
+ fontSize: 16,
+ fontWeight: FontWeight.bold,
+ color: Colors.white,
+ letterSpacing: 1.0,
+ ),
+ ),
+ ),
+ ],
+ ),
+ ),
+ ),
+
+ const SizedBox(height: 25),
+
+ // 2. PILIHAN MAKANAN
+ FadeInUp(
+ delay: 200,
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ GestureDetector(
+ onTap: () {
+ if (!isTesting) {
+ setState(() {
+ isFoodMenuExpanded = !isFoodMenuExpanded;
+ });
+ }
+ },
+ child: AnimatedContainer(
+ duration: const Duration(milliseconds: 300),
+ padding: const EdgeInsets.symmetric(
+ horizontal: 20,
+ vertical: 16,
+ ),
+ decoration: BoxDecoration(
+ color: Colors.white,
+ borderRadius: BorderRadius.circular(18),
+ border: Border.all(
+ color: const Color(0xFF1565C0).withOpacity(0.12),
+ width: 1.5,
+ ),
+ boxShadow: [
+ BoxShadow(
+ color: const Color(0xFF1565C0).withOpacity(0.06),
+ blurRadius: 10,
+ offset: const Offset(0, 4),
+ ),
+ ],
+ ),
+ child: Row(
+ children: [
+ Container(
+ padding: const EdgeInsets.all(10),
+ decoration: const BoxDecoration(
+ color: Color(0xFFE3F2FD),
+ shape: BoxShape.circle,
+ ),
+ child: const Icon(
+ Icons.restaurant_menu_rounded,
+ color: Color(0xFF1565C0),
+ size: 24,
+ ),
+ ),
+ const SizedBox(width: 15),
+ Expanded(
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ const Text(
+ "Pilih Menu Makanan",
+ style: TextStyle(
+ fontSize: 16,
+ fontWeight: FontWeight.bold,
+ color: Color(0xFF1565C0),
+ letterSpacing: 0.3,
+ ),
+ ),
+ const SizedBox(height: 3),
+ Text(
+ isTesting
+ ? "Sedang Menguji: $selectedFood"
+ : (selectedFood == "Monitoring"
+ ? "Mode: Monitoring (Ketuk opsi di bawah)"
+ : "Terpilih: $selectedFood (Ketuk untuk ganti)"),
+ style: TextStyle(
+ fontSize: 12,
+ fontWeight: FontWeight.w500,
+ color: (selectedFood == "Monitoring" || isTesting)
+ ? Colors.grey.shade600
+ : const Color(0xFF1565C0),
+ ),
+ ),
+ ],
+ ),
+ ),
+ const SizedBox(width: 5),
+ AnimatedRotation(
+ turns: isFoodMenuExpanded ? 0.5 : 0.0,
+ duration: const Duration(milliseconds: 300),
+ child: Icon(
+ Icons.keyboard_arrow_down_rounded,
+ color: const Color(0xFF1565C0).withOpacity(0.7),
+ size: 26,
+ ),
+ ),
+ ],
+ ),
+ ),
+ ),
+ AnimatedSize(
+ duration: const Duration(milliseconds: 300),
+ curve: Curves.easeInOut,
+ child: Container(
+ child: isFoodMenuExpanded
+ ? Padding(
+ padding: const EdgeInsets.only(top: 15.0),
+ child: Column(
+ children: [
+ Row(
+ children: [
+ Expanded(
+ child: _foodButton(
+ "Mie Ayam",
+ Icons.ramen_dining,
+ ),
+ ),
+ const SizedBox(width: 15),
+ Expanded(
+ child: _foodButton(
+ "Bakso",
+ Icons.soup_kitchen,
+ ),
+ ),
+ ],
+ ),
+ const SizedBox(height: 15),
+ Row(
+ children: [
+ Expanded(
+ child: _foodButton(
+ "Air Mineral",
+ Icons.local_drink_rounded,
+ ),
+ ),
+ const SizedBox(width: 15),
+ const Expanded(
+ child: SizedBox.shrink(),
+ ),
+ ],
+ ),
+ ],
+ ),
+ )
+ : const SizedBox.shrink(),
+ ),
+ ),
+ ],
+ ),
+ ),
+
+ const SizedBox(height: 25),
+
+ // 3. STATUS KIPAS
+ FadeInUp(
+ delay: 300,
+ child: FanControlCard(
+ isFanActive: fanStatus == 1,
+ ),
+ ),
+
+ const SizedBox(height: 25),
+
+ // 4. GRAFIK
+ FadeInUp(
+ delay: 400,
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ const Text(
+ "Grafik Realtime",
+ style: TextStyle(
+ fontSize: 16,
+ fontWeight: FontWeight.bold,
+ color: Colors.white,
+ ),
+ ),
+ const SizedBox(height: 10),
+ Container(
+ height: 200,
+ padding: const EdgeInsets.all(15),
+ decoration: BoxDecoration(
+ color: Colors.white,
+ borderRadius: BorderRadius.circular(15),
+ ),
+ child: Listener(
+ onPointerDown: (_) {
+ setState(() {
+ _isInteractingWithChart = true;
+ });
+ },
+ onPointerUp: (_) {
+ setState(() {
+ _isInteractingWithChart = false;
+ });
+ },
+ onPointerCancel: (_) {
+ setState(() {
+ _isInteractingWithChart = false;
+ });
+ },
+ child: InteractiveViewer(
+ panEnabled: true,
+ scaleEnabled: true,
+ minScale: 0.8,
+ maxScale: 5.0,
+ child: LineChart(
+ LineChartData(
+ gridData: FlGridData(
+ show: true,
+ drawVerticalLine: true,
+ horizontalInterval: 0.5,
+ verticalInterval: 5,
+ getDrawingHorizontalLine: (value) {
+ return FlLine(
+ color: Colors.blue.shade50,
+ strokeWidth: 1,
+ );
+ },
+ getDrawingVerticalLine: (value) {
+ return FlLine(
+ color: Colors.blue.shade50,
+ strokeWidth: 1,
+ );
+ },
+ ),
+ titlesData: const FlTitlesData(
+ show: true,
+ rightTitles: AxisTitles(
+ sideTitles: SideTitles(showTitles: false),
+ ),
+ topTitles: AxisTitles(
+ sideTitles: SideTitles(showTitles: false),
+ ),
+ leftTitles: AxisTitles(
+ sideTitles: SideTitles(
+ showTitles: true,
+ reservedSize: 30,
+ ),
+ ),
+ bottomTitles: AxisTitles(
+ sideTitles: SideTitles(
+ showTitles: true,
+ reservedSize: 22,
+ ),
+ ),
+ ),
+ borderData: FlBorderData(
+ show: true,
+ border: Border.all(color: Colors.blue.shade100, width: 1),
+ ),
+ lineTouchData: LineTouchData(
+ handleBuiltInTouches: true,
+ touchTooltipData: LineTouchTooltipData(
+ tooltipBgColor: const Color(0xFF1565C0).withOpacity(0.8),
+ getTooltipItems: (List touchedBarSpots) {
+ return touchedBarSpots.map((barSpot) {
+ return LineTooltipItem(
+ '${barSpot.y.toStringAsFixed(2)} PPM',
+ const TextStyle(color: Colors.white, fontWeight: FontWeight.bold),
+ );
+ }).toList();
+ },
+ ),
+ ),
+ lineBarsData: [
+ LineChartBarData(
+ spots: realtimeData.length >= 2
+ ? realtimeData
+ : [FlSpot(0, displayPpm), FlSpot(1, displayPpm)],
+ isCurved: true,
+ preventCurveOverShooting: true,
+ barWidth: 4,
+ color: isTesting
+ ? Colors.orange
+ : const Color(0xFF1565C0),
+ isStrokeCapRound: true,
+ dotData: FlDotData(
+ show: true,
+ getDotPainter: (spot, percent, barData, index) =>
+ FlDotCirclePainter(
+ radius: 3,
+ color: isTesting ? Colors.orange : const Color(0xFF1565C0),
+ strokeWidth: 1,
+ strokeColor: Colors.white,
+ ),
+ ),
+ belowBarData: BarAreaData(
+ show: true,
+ gradient: LinearGradient(
+ colors: [
+ (isTesting ? Colors.orange : const Color(0xFF1565C0))
+ .withOpacity(0.2),
+ (isTesting ? Colors.orange : const Color(0xFF1565C0))
+ .withOpacity(0.0),
+ ],
+ begin: Alignment.topCenter,
+ end: Alignment.bottomCenter,
+ ),
+ ),
+ ),
+ ],
+ ),
+ duration: const Duration(milliseconds: 350),
+ curve: Curves.easeOutCubic,
+ ),
+ ),
+ ),
+ ),
+ ],
+ ),
+ ),
+ ],
+ ),
+ ),
+ ),
+ ),
+ bottomNavigationBar: BottomNavigationBar(
+ currentIndex: 0,
+ selectedItemColor: const Color(0xFF1565C0),
+ unselectedItemColor: Colors.grey,
+ type: BottomNavigationBarType.fixed,
+ onTap: (index) {
+ if (index == 1) {
+ Navigator.pushReplacement(
+ context,
+ MaterialPageRoute(builder: (context) => const RiwayatPage()),
+ );
+ } else if (index == 2) {
+ Navigator.pushReplacement(
+ context,
+ MaterialPageRoute(builder: (context) => const NotifikasiPage()),
+ );
+ } else if (index == 3) {
+ Navigator.pushReplacement(
+ context,
+ MaterialPageRoute(builder: (context) => const AkunPage()),
+ );
+ }
+ },
+ items: const [
+ BottomNavigationBarItem(icon: Icon(Icons.home), label: "Home"),
+ BottomNavigationBarItem(icon: Icon(Icons.history), label: "History"),
+ BottomNavigationBarItem(
+ icon: Icon(Icons.notifications),
+ label: "Notif",
+ ),
+ BottomNavigationBarItem(icon: Icon(Icons.person), label: "Akun"),
+ ],
+ ),
+ );
+ }
+
+ Widget _foodButton(String title, IconData icon) {
+ bool isSelected = selectedFood == title;
+ bool loading = isTesting && isSelected;
+
+ return FoodSelectionCard(
+ title: title,
+ icon: icon,
+ isSelected: isSelected,
+ isLoading: loading,
+ onTap: () {
+ if (selectedFood == title) {
+ batalkanPengujian();
+ } else {
+ mulaiPengujian(title);
+ }
+ },
+ );
+ }
+}
+
+class FoodSelectionCard extends StatefulWidget {
+ final String title;
+ final IconData icon;
+ final bool isSelected;
+ final bool isLoading;
+ final VoidCallback onTap;
+
+ const FoodSelectionCard({
+ super.key,
+ required this.title,
+ required this.icon,
+ required this.isSelected,
+ required this.isLoading,
+ required this.onTap,
+ });
+
+ @override
+ State createState() => _FoodSelectionCardState();
+}
+
+class _FoodSelectionCardState extends State
+ with SingleTickerProviderStateMixin {
+ bool _isPressed = false;
+ late AnimationController _rotationController;
+
+ @override
+ void initState() {
+ super.initState();
+ _rotationController = AnimationController(
+ duration: const Duration(seconds: 2),
+ vsync: this,
+ );
+ if (widget.isLoading) {
+ _rotationController.repeat();
+ }
+ }
+
+ @override
+ void didUpdateWidget(covariant FoodSelectionCard oldWidget) {
+ super.didUpdateWidget(oldWidget);
+ if (widget.isLoading && !_rotationController.isAnimating) {
+ _rotationController.repeat();
+ } else if (!widget.isLoading && _rotationController.isAnimating) {
+ _rotationController.stop();
+ }
+ }
+
+ @override
+ void dispose() {
+ _rotationController.dispose();
+ super.dispose();
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ double scale = 1.0;
+ if (_isPressed) {
+ scale = 0.94;
+ } else if (widget.isSelected) {
+ scale = 1.04;
+ }
+
+ Gradient gradient;
+ List shadows;
+ Color iconColor;
+ Color textColor;
+ Border border;
+
+ if (widget.isLoading) {
+ gradient = const LinearGradient(
+ colors: [Color(0xFFFF9100), Color(0xFFFF3D00)],
+ begin: Alignment.topLeft,
+ end: Alignment.bottomRight,
+ );
+ shadows = [
+ BoxShadow(
+ color: Colors.deepOrange.withOpacity(0.4),
+ blurRadius: 15,
+ offset: const Offset(0, 8),
+ ),
+ ];
+ iconColor = Colors.white;
+ textColor = Colors.white;
+ border = Border.all(color: Colors.transparent);
+ } else if (widget.isSelected) {
+ gradient = const LinearGradient(
+ colors: [Color(0xFF2196F3), Color(0xFF0D47A1)],
+ begin: Alignment.topLeft,
+ end: Alignment.bottomRight,
+ );
+ shadows = [
+ BoxShadow(
+ color: const Color(0xFF0D47A1).withOpacity(0.4),
+ blurRadius: 15,
+ offset: const Offset(0, 8),
+ ),
+ ];
+ iconColor = Colors.white;
+ textColor = Colors.white;
+ border = Border.all(color: Colors.transparent);
+ } else {
+ gradient = const LinearGradient(
+ colors: [Colors.white, Color(0xFFF5F7FA)],
+ begin: Alignment.topLeft,
+ end: Alignment.bottomRight,
+ );
+ shadows = [
+ BoxShadow(
+ color: Colors.black.withOpacity(0.04),
+ blurRadius: 10,
+ offset: const Offset(0, 4),
+ ),
+ ];
+ iconColor = const Color(0xFF1565C0);
+ textColor = Colors.black87;
+ border = Border.all(
+ color: const Color(0xFF1565C0).withOpacity(0.12),
+ width: 1.5,
+ );
+ }
+
+ return GestureDetector(
+ onTapDown: (_) => setState(() => _isPressed = true),
+ onTapUp: (_) => setState(() => _isPressed = false),
+ onTapCancel: () => setState(() => _isPressed = false),
+ onTap: widget.onTap,
+ child: AnimatedScale(
+ scale: scale,
+ duration: const Duration(milliseconds: 150),
+ curve: Curves.easeOutBack,
+ child: AnimatedContainer(
+ duration: const Duration(milliseconds: 300),
+ curve: Curves.easeInOut,
+ padding: const EdgeInsets.symmetric(vertical: 20, horizontal: 16),
+ decoration: BoxDecoration(
+ gradient: gradient,
+ borderRadius: BorderRadius.circular(20),
+ border: border,
+ boxShadow: shadows,
+ ),
+ child: Column(
+ mainAxisSize: MainAxisSize.min,
+ children: [
+ RotationTransition(
+ turns: _rotationController,
+ child: AnimatedContainer(
+ duration: const Duration(milliseconds: 300),
+ padding: const EdgeInsets.all(10),
+ decoration: BoxDecoration(
+ color: widget.isLoading
+ ? Colors.white.withOpacity(0.25)
+ : (widget.isSelected
+ ? Colors.white.withOpacity(0.15)
+ : const Color(0xFFE3F2FD)),
+ shape: BoxShape.circle,
+ ),
+ child: Icon(widget.icon, size: 28, color: iconColor),
+ ),
+ ),
+ const SizedBox(height: 12),
+ AnimatedDefaultTextStyle(
+ duration: const Duration(milliseconds: 200),
+ style: TextStyle(
+ fontSize: 15,
+ fontWeight: FontWeight.bold,
+ color: textColor,
+ letterSpacing: 0.3,
+ ),
+ child: Text(widget.isLoading ? "Menguji..." : widget.title),
+ ),
+ const SizedBox(height: 4),
+ AnimatedDefaultTextStyle(
+ duration: const Duration(milliseconds: 200),
+ style: TextStyle(
+ fontSize: 11,
+ fontWeight: FontWeight.w500,
+ color: widget.isLoading
+ ? Colors.white.withOpacity(0.8)
+ : (widget.isSelected
+ ? Colors.white.withOpacity(0.8)
+ : Colors.grey.shade600),
+ ),
+ child: Text(
+ widget.isLoading
+ ? "Harap Tunggu"
+ : (widget.isSelected ? "Ketuk utk Batal" : "Uji Sekarang"),
+ ),
+ ),
+ ],
+ ),
+ ),
+ ),
+ );
+ }
+}
+
+class FanControlCard extends StatefulWidget {
+ final bool isFanActive;
+
+ const FanControlCard({
+ super.key,
+ required this.isFanActive,
+ });
+
+ @override
+ State createState() => _FanControlCardState();
+}
+
+class _FanControlCardState extends State
+ with SingleTickerProviderStateMixin {
+ late AnimationController _spinController;
+
+ @override
+ void initState() {
+ super.initState();
+ _spinController = AnimationController(
+ duration: const Duration(seconds: 2),
+ vsync: this,
+ );
+ if (widget.isFanActive) {
+ _spinController.repeat();
+ }
+ }
+
+ @override
+ void didUpdateWidget(covariant FanControlCard oldWidget) {
+ super.didUpdateWidget(oldWidget);
+ if (widget.isFanActive && !_spinController.isAnimating) {
+ _spinController.repeat();
+ } else if (!widget.isFanActive && _spinController.isAnimating) {
+ _spinController.stop();
+ }
+ }
+
+ @override
+ void dispose() {
+ _spinController.dispose();
+ super.dispose();
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ Gradient gradient;
+ Border border;
+
+ if (widget.isFanActive) {
+ gradient = const LinearGradient(
+ colors: [Color(0xFFE0F7FA), Color(0xFFE3F2FD)],
+ begin: Alignment.topLeft,
+ end: Alignment.bottomRight,
+ );
+ border = Border.all(
+ color: const Color(0xFF00E5FF).withOpacity(0.3),
+ width: 1.5,
+ );
+ } else {
+ gradient = const LinearGradient(
+ colors: [Colors.white, Color(0xFFF8F9FA)],
+ begin: Alignment.topLeft,
+ end: Alignment.bottomRight,
+ );
+ border = Border.all(
+ color: const Color(0xFF1565C0).withOpacity(0.12),
+ width: 1.5,
+ );
+ }
+
+ return AnimatedContainer(
+ duration: const Duration(milliseconds: 300),
+ curve: Curves.easeInOut,
+ padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 16),
+ decoration: BoxDecoration(
+ gradient: gradient,
+ borderRadius: BorderRadius.circular(20),
+ border: border,
+ boxShadow: [
+ BoxShadow(
+ color: Colors.black.withOpacity(0.04),
+ blurRadius: 10,
+ offset: const Offset(0, 4),
+ ),
+ ],
+ ),
+ child: Column(
+ children: [
+ Row(
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ children: [
+ Row(
+ children: [
+ RotationTransition(
+ turns: _spinController,
+ child: Container(
+ padding: const EdgeInsets.all(10),
+ decoration: BoxDecoration(
+ color: widget.isFanActive
+ ? const Color(0xFF00E5FF).withOpacity(0.2)
+ : const Color(0xFFE3F2FD),
+ shape: BoxShape.circle,
+ ),
+ child: Icon(
+ Icons.toys_outlined,
+ color: widget.isFanActive
+ ? const Color(0xFF00E5FF)
+ : const Color(0xFF1565C0),
+ size: 24,
+ ),
+ ),
+ ),
+ const SizedBox(width: 12),
+ const Text(
+ "Kipas Sirkulasi Otomatis",
+ style: TextStyle(
+ fontSize: 16,
+ fontWeight: FontWeight.bold,
+ color: Color(0xFF1565C0),
+ ),
+ ),
+ ],
+ ),
+ Container(
+ padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 6),
+ decoration: BoxDecoration(
+ color: widget.isFanActive
+ ? Colors.green.shade50
+ : Colors.grey.shade100,
+ borderRadius: BorderRadius.circular(8),
+ border: Border.all(
+ color: widget.isFanActive
+ ? Colors.green.shade300
+ : Colors.grey.shade300,
+ ),
+ ),
+ child: Row(
+ mainAxisSize: MainAxisSize.min,
+ children: [
+ Container(
+ width: 8,
+ height: 8,
+ decoration: BoxDecoration(
+ color: widget.isFanActive ? Colors.green : Colors.grey,
+ shape: BoxShape.circle,
+ ),
+ ),
+ const SizedBox(width: 6),
+ Text(
+ widget.isFanActive ? "AKTIF" : "MATI",
+ style: TextStyle(
+ fontSize: 10,
+ fontWeight: FontWeight.bold,
+ color: widget.isFanActive
+ ? Colors.green.shade700
+ : Colors.grey.shade700,
+ ),
+ ),
+ ],
+ ),
+ ),
+ ],
+ ),
+ const Divider(height: 24, thickness: 1),
+ Row(
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ children: [
+ Expanded(
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Text(
+ widget.isFanActive ? "Kipas Sedang Menyala" : "Kipas Sedang Mati",
+ style: const TextStyle(
+ fontSize: 14,
+ fontWeight: FontWeight.bold,
+ color: Colors.black87,
+ ),
+ ),
+ const SizedBox(height: 4),
+ Text(
+ widget.isFanActive
+ ? "Terdeteksi formalin, kipas aktif secara otomatis untuk menetralisir udara sekitar."
+ : "Sensor dalam kondisi aman. Kipas akan otomatis menyala jika kadar formalin meningkat.",
+ style: TextStyle(
+ fontSize: 11,
+ color: Colors.grey.shade600,
+ ),
+ ),
+ ],
+ ),
+ ),
+ ],
+ ),
+ ],
+ ),
+ );
+ }
+}
diff --git a/lib/screen/history.dart b/lib/screen/history.dart
new file mode 100644
index 0000000..2588ed2
--- /dev/null
+++ b/lib/screen/history.dart
@@ -0,0 +1,483 @@
+import 'dart:async';
+import 'package:flutter/material.dart';
+import 'package:firebase_database/firebase_database.dart';
+import 'package:firebase_auth/firebase_auth.dart';
+import 'package:intl/intl.dart';
+import 'dashboard.dart';
+import 'notifikasi.dart';
+import '../widgets/fade_in_up.dart';
+import '../widgets/whatsapp_notification.dart';
+import 'akun.dart';
+import '../utils/knn_classifier.dart';
+
+class RiwayatPage extends StatefulWidget {
+ const RiwayatPage({super.key});
+
+ @override
+ State createState() => _RiwayatPageState();
+}
+
+class _RiwayatPageState extends State {
+ final db = FirebaseDatabase.instance.ref();
+
+ List