diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..79c113f
--- /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
+.flutter-plugins-dependencies
+.pub-cache/
+.pub/
+/build/
+
+# Symbolication related
+app.*.symbols
+
+# Obfuscation related
+app.*.map.json
+
+# Android Studio will place build artifacts here
+/android/app/debug
+/android/app/profile
+/android/app/release
diff --git a/.metadata b/.metadata
new file mode 100644
index 0000000..d77a4e0
--- /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: "c23637390482d4cf9598c3ce3f2be31aa7332daf"
+ channel: "stable"
+
+project_type: app
+
+# Tracks metadata for the flutter migrate command
+migration:
+ platforms:
+ - platform: root
+ create_revision: c23637390482d4cf9598c3ce3f2be31aa7332daf
+ base_revision: c23637390482d4cf9598c3ce3f2be31aa7332daf
+ - platform: android
+ create_revision: c23637390482d4cf9598c3ce3f2be31aa7332daf
+ base_revision: c23637390482d4cf9598c3ce3f2be31aa7332daf
+ - platform: ios
+ create_revision: c23637390482d4cf9598c3ce3f2be31aa7332daf
+ base_revision: c23637390482d4cf9598c3ce3f2be31aa7332daf
+ - platform: linux
+ create_revision: c23637390482d4cf9598c3ce3f2be31aa7332daf
+ base_revision: c23637390482d4cf9598c3ce3f2be31aa7332daf
+ - platform: macos
+ create_revision: c23637390482d4cf9598c3ce3f2be31aa7332daf
+ base_revision: c23637390482d4cf9598c3ce3f2be31aa7332daf
+ - platform: web
+ create_revision: c23637390482d4cf9598c3ce3f2be31aa7332daf
+ base_revision: c23637390482d4cf9598c3ce3f2be31aa7332daf
+ - platform: windows
+ create_revision: c23637390482d4cf9598c3ce3f2be31aa7332daf
+ base_revision: c23637390482d4cf9598c3ce3f2be31aa7332daf
+
+ # 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..0ec856c
--- /dev/null
+++ b/android/app/build.gradle.kts
@@ -0,0 +1,44 @@
+plugins {
+ id("com.android.application")
+ id("kotlin-android")
+ // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
+ id("dev.flutter.flutter-gradle-plugin")
+}
+
+android {
+ namespace = "com.example.monarch"
+ compileSdk = flutter.compileSdkVersion
+ ndkVersion = "27.0.12077973"
+
+ compileOptions {
+ sourceCompatibility = JavaVersion.VERSION_11
+ targetCompatibility = JavaVersion.VERSION_11
+ }
+
+ kotlinOptions {
+ jvmTarget = JavaVersion.VERSION_11.toString()
+ }
+
+ defaultConfig {
+ // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
+ applicationId = "com.example.monarch"
+ // 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/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..5076217
--- /dev/null
+++ b/android/app/src/main/AndroidManifest.xml
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/android/app/src/main/kotlin/com/example/monarch/MainActivity.kt b/android/app/src/main/kotlin/com/example/monarch/MainActivity.kt
new file mode 100644
index 0000000..1b87659
--- /dev/null
+++ b/android/app/src/main/kotlin/com/example/monarch/MainActivity.kt
@@ -0,0 +1,5 @@
+package com.example.monarch
+
+import io.flutter.embedding.android.FlutterActivity
+
+class MainActivity : FlutterActivity()
diff --git a/android/app/src/main/res/drawable-v21/launch_background.xml b/android/app/src/main/res/drawable-v21/launch_background.xml
new file mode 100644
index 0000000..f74085f
--- /dev/null
+++ b/android/app/src/main/res/drawable-v21/launch_background.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
diff --git a/android/app/src/main/res/drawable/launch_background.xml b/android/app/src/main/res/drawable/launch_background.xml
new file mode 100644
index 0000000..304732f
--- /dev/null
+++ b/android/app/src/main/res/drawable/launch_background.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
new file mode 100644
index 0000000..db77bb4
Binary files /dev/null and b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ
diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
new file mode 100644
index 0000000..17987b7
Binary files /dev/null and b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ
diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
new file mode 100644
index 0000000..09d4391
Binary files /dev/null and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ
diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
new file mode 100644
index 0000000..d5f1c8d
Binary files /dev/null and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ
diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
new file mode 100644
index 0000000..4d6372e
Binary files /dev/null and b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ
diff --git a/android/app/src/main/res/values-night/styles.xml b/android/app/src/main/res/values-night/styles.xml
new file mode 100644
index 0000000..06952be
--- /dev/null
+++ b/android/app/src/main/res/values-night/styles.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
diff --git a/android/app/src/main/res/values/styles.xml b/android/app/src/main/res/values/styles.xml
new file mode 100644
index 0000000..cb1ef88
--- /dev/null
+++ b/android/app/src/main/res/values/styles.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
diff --git a/android/app/src/profile/AndroidManifest.xml b/android/app/src/profile/AndroidManifest.xml
new file mode 100644
index 0000000..399f698
--- /dev/null
+++ b/android/app/src/profile/AndroidManifest.xml
@@ -0,0 +1,7 @@
+
+
+
+
diff --git a/android/build.gradle.kts b/android/build.gradle.kts
new file mode 100644
index 0000000..89176ef
--- /dev/null
+++ b/android/build.gradle.kts
@@ -0,0 +1,21 @@
+allprojects {
+ repositories {
+ google()
+ mavenCentral()
+ }
+}
+
+val newBuildDir: Directory = rootProject.layout.buildDirectory.dir("../../build").get()
+rootProject.layout.buildDirectory.value(newBuildDir)
+
+subprojects {
+ val newSubprojectBuildDir: Directory = newBuildDir.dir(project.name)
+ project.layout.buildDirectory.value(newSubprojectBuildDir)
+}
+subprojects {
+ project.evaluationDependsOn(":app")
+}
+
+tasks.register("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..afa1e8e
--- /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.10.2-all.zip
diff --git a/android/settings.gradle.kts b/android/settings.gradle.kts
new file mode 100644
index 0000000..a439442
--- /dev/null
+++ b/android/settings.gradle.kts
@@ -0,0 +1,25 @@
+pluginManagement {
+ val flutterSdkPath = run {
+ val properties = java.util.Properties()
+ file("local.properties").inputStream().use { properties.load(it) }
+ val flutterSdkPath = properties.getProperty("flutter.sdk")
+ require(flutterSdkPath != null) { "flutter.sdk not set in local.properties" }
+ flutterSdkPath
+ }
+
+ includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
+
+ repositories {
+ google()
+ mavenCentral()
+ gradlePluginPortal()
+ }
+}
+
+plugins {
+ id("dev.flutter.flutter-plugin-loader") version "1.0.0"
+ id("com.android.application") version "8.7.0" apply false
+ id("org.jetbrains.kotlin.android") version "1.8.22" apply false
+}
+
+include(":app")
diff --git a/ios/.gitignore b/ios/.gitignore
new file mode 100644
index 0000000..7a7f987
--- /dev/null
+++ b/ios/.gitignore
@@ -0,0 +1,34 @@
+**/dgph
+*.mode1v3
+*.mode2v3
+*.moved-aside
+*.pbxuser
+*.perspectivev3
+**/*sync/
+.sconsign.dblite
+.tags*
+**/.vagrant/
+**/DerivedData/
+Icon?
+**/Pods/
+**/.symlinks/
+profile
+xcuserdata
+**/.generated/
+Flutter/App.framework
+Flutter/Flutter.framework
+Flutter/Flutter.podspec
+Flutter/Generated.xcconfig
+Flutter/ephemeral/
+Flutter/app.flx
+Flutter/app.zip
+Flutter/flutter_assets/
+Flutter/flutter_export_environment.sh
+ServiceDefinitions.json
+Runner/GeneratedPluginRegistrant.*
+
+# Exceptions to above rules.
+!default.mode1v3
+!default.mode2v3
+!default.pbxuser
+!default.perspectivev3
diff --git a/ios/Flutter/AppFrameworkInfo.plist b/ios/Flutter/AppFrameworkInfo.plist
new file mode 100644
index 0000000..7c56964
--- /dev/null
+++ b/ios/Flutter/AppFrameworkInfo.plist
@@ -0,0 +1,26 @@
+
+
+
+
+ CFBundleDevelopmentRegion
+ en
+ CFBundleExecutable
+ App
+ CFBundleIdentifier
+ io.flutter.flutter.app
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ App
+ CFBundlePackageType
+ FMWK
+ CFBundleShortVersionString
+ 1.0
+ CFBundleSignature
+ ????
+ CFBundleVersion
+ 1.0
+ MinimumOSVersion
+ 12.0
+
+
diff --git a/ios/Flutter/Debug.xcconfig b/ios/Flutter/Debug.xcconfig
new file mode 100644
index 0000000..592ceee
--- /dev/null
+++ b/ios/Flutter/Debug.xcconfig
@@ -0,0 +1 @@
+#include "Generated.xcconfig"
diff --git a/ios/Flutter/Release.xcconfig b/ios/Flutter/Release.xcconfig
new file mode 100644
index 0000000..592ceee
--- /dev/null
+++ b/ios/Flutter/Release.xcconfig
@@ -0,0 +1 @@
+#include "Generated.xcconfig"
diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj
new file mode 100644
index 0000000..edaab54
--- /dev/null
+++ b/ios/Runner.xcodeproj/project.pbxproj
@@ -0,0 +1,616 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 54;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
+ 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; };
+ 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
+ 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
+ 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
+ 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
+ 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXContainerItemProxy section */
+ 331C8085294A63A400263BE5 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 97C146E61CF9000F007C117D /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 97C146ED1CF9000F007C117D;
+ remoteInfo = Runner;
+ };
+/* End PBXContainerItemProxy section */
+
+/* Begin PBXCopyFilesBuildPhase section */
+ 9705A1C41CF9048500538489 /* Embed Frameworks */ = {
+ isa = PBXCopyFilesBuildPhase;
+ buildActionMask = 2147483647;
+ dstPath = "";
+ dstSubfolderSpec = 10;
+ files = (
+ );
+ name = "Embed Frameworks";
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXCopyFilesBuildPhase section */
+
+/* Begin PBXFileReference section */
+ 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; };
+ 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; };
+ 331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; };
+ 331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
+ 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
+ 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; };
+ 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
+ 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
+ 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; };
+ 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; };
+ 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
+ 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
+ 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
+ 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 97C146EB1CF9000F007C117D /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 331C8082294A63A400263BE5 /* RunnerTests */ = {
+ isa = PBXGroup;
+ children = (
+ 331C807B294A618700263BE5 /* RunnerTests.swift */,
+ );
+ path = RunnerTests;
+ sourceTree = "";
+ };
+ 9740EEB11CF90186004384FC /* Flutter */ = {
+ isa = PBXGroup;
+ children = (
+ 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
+ 9740EEB21CF90195004384FC /* Debug.xcconfig */,
+ 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
+ 9740EEB31CF90195004384FC /* Generated.xcconfig */,
+ );
+ name = Flutter;
+ sourceTree = "";
+ };
+ 97C146E51CF9000F007C117D = {
+ isa = PBXGroup;
+ children = (
+ 9740EEB11CF90186004384FC /* Flutter */,
+ 97C146F01CF9000F007C117D /* Runner */,
+ 97C146EF1CF9000F007C117D /* Products */,
+ 331C8082294A63A400263BE5 /* RunnerTests */,
+ );
+ sourceTree = "";
+ };
+ 97C146EF1CF9000F007C117D /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 97C146EE1CF9000F007C117D /* Runner.app */,
+ 331C8081294A63A400263BE5 /* RunnerTests.xctest */,
+ );
+ name = Products;
+ sourceTree = "";
+ };
+ 97C146F01CF9000F007C117D /* Runner */ = {
+ isa = PBXGroup;
+ children = (
+ 97C146FA1CF9000F007C117D /* Main.storyboard */,
+ 97C146FD1CF9000F007C117D /* Assets.xcassets */,
+ 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
+ 97C147021CF9000F007C117D /* Info.plist */,
+ 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
+ 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
+ 74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
+ 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
+ );
+ path = Runner;
+ sourceTree = "";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ 331C8080294A63A400263BE5 /* RunnerTests */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */;
+ buildPhases = (
+ 331C807D294A63A400263BE5 /* Sources */,
+ 331C807F294A63A400263BE5 /* Resources */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ 331C8086294A63A400263BE5 /* PBXTargetDependency */,
+ );
+ name = RunnerTests;
+ productName = RunnerTests;
+ productReference = 331C8081294A63A400263BE5 /* RunnerTests.xctest */;
+ productType = "com.apple.product-type.bundle.unit-test";
+ };
+ 97C146ED1CF9000F007C117D /* Runner */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
+ buildPhases = (
+ 9740EEB61CF901F6004384FC /* Run Script */,
+ 97C146EA1CF9000F007C117D /* Sources */,
+ 97C146EB1CF9000F007C117D /* Frameworks */,
+ 97C146EC1CF9000F007C117D /* Resources */,
+ 9705A1C41CF9048500538489 /* Embed Frameworks */,
+ 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = Runner;
+ productName = Runner;
+ productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
+ productType = "com.apple.product-type.application";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 97C146E61CF9000F007C117D /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ BuildIndependentTargetsInParallel = YES;
+ LastUpgradeCheck = 1510;
+ ORGANIZATIONNAME = "";
+ TargetAttributes = {
+ 331C8080294A63A400263BE5 = {
+ CreatedOnToolsVersion = 14.0;
+ TestTargetID = 97C146ED1CF9000F007C117D;
+ };
+ 97C146ED1CF9000F007C117D = {
+ CreatedOnToolsVersion = 7.3.1;
+ LastSwiftMigration = 1100;
+ };
+ };
+ };
+ buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
+ compatibilityVersion = "Xcode 9.3";
+ developmentRegion = en;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ Base,
+ );
+ mainGroup = 97C146E51CF9000F007C117D;
+ productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ 97C146ED1CF9000F007C117D /* Runner */,
+ 331C8080294A63A400263BE5 /* RunnerTests */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ 331C807F294A63A400263BE5 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 97C146EC1CF9000F007C117D /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
+ 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
+ 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
+ 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXShellScriptBuildPhase section */
+ 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
+ isa = PBXShellScriptBuildPhase;
+ alwaysOutOfDate = 1;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
+ );
+ name = "Thin Binary";
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
+ };
+ 9740EEB61CF901F6004384FC /* Run Script */ = {
+ isa = PBXShellScriptBuildPhase;
+ alwaysOutOfDate = 1;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ name = "Run Script";
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
+ };
+/* End PBXShellScriptBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 331C807D294A63A400263BE5 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 97C146EA1CF9000F007C117D /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
+ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXTargetDependency section */
+ 331C8086294A63A400263BE5 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 97C146ED1CF9000F007C117D /* Runner */;
+ targetProxy = 331C8085294A63A400263BE5 /* PBXContainerItemProxy */;
+ };
+/* End PBXTargetDependency section */
+
+/* Begin PBXVariantGroup section */
+ 97C146FA1CF9000F007C117D /* Main.storyboard */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 97C146FB1CF9000F007C117D /* Base */,
+ );
+ name = Main.storyboard;
+ sourceTree = "";
+ };
+ 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 97C147001CF9000F007C117D /* Base */,
+ );
+ name = LaunchScreen.storyboard;
+ sourceTree = "";
+ };
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+ 249021D3217E4FDB00AE95B9 /* Profile */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ ENABLE_NS_ASSERTIONS = NO;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ ENABLE_USER_SCRIPT_SANDBOXING = NO;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 12.0;
+ MTL_ENABLE_DEBUG_INFO = NO;
+ SDKROOT = iphoneos;
+ SUPPORTED_PLATFORMS = iphoneos;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ VALIDATE_PRODUCT = YES;
+ };
+ name = Profile;
+ };
+ 249021D4217E4FDB00AE95B9 /* Profile */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ CLANG_ENABLE_MODULES = YES;
+ CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
+ ENABLE_BITCODE = NO;
+ INFOPLIST_FILE = Runner/Info.plist;
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/Frameworks",
+ );
+ PRODUCT_BUNDLE_IDENTIFIER = com.example.monarch;
+ 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.monarch.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.monarch.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.monarch.RunnerTests;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_VERSION = 5.0;
+ TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
+ };
+ name = Profile;
+ };
+ 97C147031CF9000F007C117D /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = dwarf;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ ENABLE_TESTABILITY = YES;
+ ENABLE_USER_SCRIPT_SANDBOXING = NO;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 12.0;
+ MTL_ENABLE_DEBUG_INFO = YES;
+ ONLY_ACTIVE_ARCH = YES;
+ SDKROOT = iphoneos;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ };
+ name = Debug;
+ };
+ 97C147041CF9000F007C117D /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ ENABLE_NS_ASSERTIONS = NO;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ ENABLE_USER_SCRIPT_SANDBOXING = NO;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 12.0;
+ MTL_ENABLE_DEBUG_INFO = NO;
+ SDKROOT = iphoneos;
+ SUPPORTED_PLATFORMS = iphoneos;
+ SWIFT_COMPILATION_MODE = wholemodule;
+ SWIFT_OPTIMIZATION_LEVEL = "-O";
+ TARGETED_DEVICE_FAMILY = "1,2";
+ VALIDATE_PRODUCT = YES;
+ };
+ name = Release;
+ };
+ 97C147061CF9000F007C117D /* Debug */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ CLANG_ENABLE_MODULES = YES;
+ CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
+ ENABLE_BITCODE = NO;
+ INFOPLIST_FILE = Runner/Info.plist;
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/Frameworks",
+ );
+ PRODUCT_BUNDLE_IDENTIFIER = com.example.monarch;
+ 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.monarch;
+ 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..15cada4
--- /dev/null
+++ b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
@@ -0,0 +1,99 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ios/Runner.xcworkspace/contents.xcworkspacedata b/ios/Runner.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 0000000..1d526a1
--- /dev/null
+++ b/ios/Runner.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+
+
+
+
+
diff --git a/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
new file mode 100644
index 0000000..18d9810
--- /dev/null
+++ b/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
@@ -0,0 +1,8 @@
+
+
+
+
+ IDEDidComputeMac32BitWarning
+
+
+
diff --git a/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
new file mode 100644
index 0000000..f9b0d7c
--- /dev/null
+++ b/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
@@ -0,0 +1,8 @@
+
+
+
+
+ PreviewsEnabled
+
+
+
diff --git a/ios/Runner/AppDelegate.swift b/ios/Runner/AppDelegate.swift
new file mode 100644
index 0000000..6266644
--- /dev/null
+++ b/ios/Runner/AppDelegate.swift
@@ -0,0 +1,13 @@
+import Flutter
+import UIKit
+
+@main
+@objc class AppDelegate: FlutterAppDelegate {
+ override func application(
+ _ application: UIApplication,
+ didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
+ ) -> Bool {
+ GeneratedPluginRegistrant.register(with: self)
+ return super.application(application, didFinishLaunchingWithOptions: launchOptions)
+ }
+}
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
new file mode 100644
index 0000000..d36b1fa
--- /dev/null
+++ b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
@@ -0,0 +1,122 @@
+{
+ "images" : [
+ {
+ "size" : "20x20",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-20x20@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "20x20",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-20x20@3x.png",
+ "scale" : "3x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-29x29@1x.png",
+ "scale" : "1x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-29x29@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-29x29@3x.png",
+ "scale" : "3x"
+ },
+ {
+ "size" : "40x40",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-40x40@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "40x40",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-40x40@3x.png",
+ "scale" : "3x"
+ },
+ {
+ "size" : "60x60",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-60x60@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "60x60",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-60x60@3x.png",
+ "scale" : "3x"
+ },
+ {
+ "size" : "20x20",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-20x20@1x.png",
+ "scale" : "1x"
+ },
+ {
+ "size" : "20x20",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-20x20@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-29x29@1x.png",
+ "scale" : "1x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-29x29@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "40x40",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-40x40@1x.png",
+ "scale" : "1x"
+ },
+ {
+ "size" : "40x40",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-40x40@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "76x76",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-76x76@1x.png",
+ "scale" : "1x"
+ },
+ {
+ "size" : "76x76",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-76x76@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "83.5x83.5",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-83.5x83.5@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "1024x1024",
+ "idiom" : "ios-marketing",
+ "filename" : "Icon-App-1024x1024@1x.png",
+ "scale" : "1x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
new file mode 100644
index 0000000..dc9ada4
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
new file mode 100644
index 0000000..7353c41
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
new file mode 100644
index 0000000..797d452
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
new file mode 100644
index 0000000..6ed2d93
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
new file mode 100644
index 0000000..4cd7b00
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
new file mode 100644
index 0000000..fe73094
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
new file mode 100644
index 0000000..321773c
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
new file mode 100644
index 0000000..797d452
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
new file mode 100644
index 0000000..502f463
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
new file mode 100644
index 0000000..0ec3034
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
new file mode 100644
index 0000000..0ec3034
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
new file mode 100644
index 0000000..e9f5fea
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
new file mode 100644
index 0000000..84ac32a
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
new file mode 100644
index 0000000..8953cba
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
new file mode 100644
index 0000000..0467bf1
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ
diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
new file mode 100644
index 0000000..0bedcf2
--- /dev/null
+++ b/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
@@ -0,0 +1,23 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "LaunchImage.png",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "filename" : "LaunchImage@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "filename" : "LaunchImage@3x.png",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
new file mode 100644
index 0000000..9da19ea
Binary files /dev/null and b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png differ
diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
new file mode 100644
index 0000000..9da19ea
Binary files /dev/null and b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png differ
diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
new file mode 100644
index 0000000..9da19ea
Binary files /dev/null and b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png differ
diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
new file mode 100644
index 0000000..89c2725
--- /dev/null
+++ b/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
@@ -0,0 +1,5 @@
+# Launch Screen Assets
+
+You can customize the launch screen with your own desired assets by replacing the image files in this directory.
+
+You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
\ No newline at end of file
diff --git a/ios/Runner/Base.lproj/LaunchScreen.storyboard b/ios/Runner/Base.lproj/LaunchScreen.storyboard
new file mode 100644
index 0000000..f2e259c
--- /dev/null
+++ b/ios/Runner/Base.lproj/LaunchScreen.storyboard
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ios/Runner/Base.lproj/Main.storyboard b/ios/Runner/Base.lproj/Main.storyboard
new file mode 100644
index 0000000..f3c2851
--- /dev/null
+++ b/ios/Runner/Base.lproj/Main.storyboard
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist
new file mode 100644
index 0000000..68f28a8
--- /dev/null
+++ b/ios/Runner/Info.plist
@@ -0,0 +1,49 @@
+
+
+
+
+ CFBundleDevelopmentRegion
+ $(DEVELOPMENT_LANGUAGE)
+ CFBundleDisplayName
+ Monarch
+ CFBundleExecutable
+ $(EXECUTABLE_NAME)
+ CFBundleIdentifier
+ $(PRODUCT_BUNDLE_IDENTIFIER)
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ monarch
+ 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/main.dart b/lib/main.dart
new file mode 100644
index 0000000..b4cd8a6
--- /dev/null
+++ b/lib/main.dart
@@ -0,0 +1,131 @@
+// ignore_for_file: library_private_types_in_public_api, avoid_print, use_build_context_synchronously, unused_import
+
+import 'dart:convert';
+
+import 'package:flutter/material.dart';
+import 'package:flutter_dotenv/flutter_dotenv.dart';
+import 'package:http/http.dart' as http;
+import 'package:monarch/sppech.dart';
+import 'package:monarch/support/add.dart';
+import 'package:monarch/main_pages/Statistics/update_budget.dart';
+import 'package:monarch/main_pages/HomePage/homepage.dart';
+import 'package:monarch/main_pages/Statistics/statistics.dart';
+
+Future main() async {
+ WidgetsFlutterBinding.ensureInitialized();
+ runApp(const MyApp());
+}
+
+class MyApp extends StatelessWidget {
+ const MyApp({super.key});
+
+ @override
+ Widget build(BuildContext context) {
+ return MaterialApp(
+ debugShowCheckedModeBanner: false,
+ theme: ThemeData(primarySwatch: Colors.blue),
+ // home: const FinTrackHomePage(),
+ home: const SpeechInputPage(),
+ );
+ }
+}
+
+class AddTransactionPage extends StatefulWidget {
+ const AddTransactionPage({super.key});
+
+ @override
+ _AddTransactionPageState createState() => _AddTransactionPageState();
+}
+
+class _AddTransactionPageState extends State {
+ final TextEditingController descriptionController = TextEditingController();
+ final TextEditingController amountController = TextEditingController();
+ final baseUrl = dotenv.env['BASE_URL'];
+
+ Future addTransaction() async {
+ // Show loading indicator
+ showDialog(
+ context: context,
+ barrierDismissible: false,
+ builder: (_) => const Center(child: CircularProgressIndicator()),
+ );
+
+ try {
+ final response = await http.post(
+ Uri.parse('$baseUrl/api/transaction/add'),
+ headers: {'Content-Type': 'application/json'},
+ body: json.encode({
+ 'description': descriptionController.text,
+ 'amount': double.tryParse(amountController.text),
+ }),
+ );
+
+ Navigator.of(context).pop(); // Close loading dialog
+
+ if (response.statusCode == 200) {
+ final responseData = json.decode(response.body);
+ final predictedCategory = responseData['data']['category'];
+
+ // Clear the input fields
+ descriptionController.clear();
+ amountController.clear();
+
+ ScaffoldMessenger.of(context).showSnackBar(
+ SnackBar(
+ content: Text(
+ '✅ Transaction added and categorized as: $predictedCategory',
+ ),
+ ),
+ );
+ } else {
+ ScaffoldMessenger.of(context).showSnackBar(
+ SnackBar(
+ content: Text('❌ Failed to add transaction: ${response.body}'),
+ ),
+ );
+ }
+ } catch (e) {
+ Navigator.push(
+ context,
+ MaterialPageRoute(builder: (context) => const Statistics()),
+ );
+ ScaffoldMessenger.of(
+ context,
+ ).showSnackBar(SnackBar(content: Text('⚠️ Error: $e')));
+ }
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ appBar: AppBar(title: Text('Add Transaction')),
+ body: Padding(
+ padding: EdgeInsets.all(16),
+ child: Column(
+ children: [
+ TextField(
+ controller: descriptionController,
+ decoration: InputDecoration(labelText: 'Description'),
+ ),
+ TextField(
+ controller: amountController,
+ keyboardType: TextInputType.number,
+ decoration: InputDecoration(labelText: 'Amount'),
+ ),
+ SizedBox(height: 20),
+ ElevatedButton(onPressed: addTransaction, child: Text('Submit')),
+ ElevatedButton(
+ onPressed: () {
+ Navigator.push(
+ context,
+ MaterialPageRoute(builder: (context) => const Statistics()),
+ );
+ },
+ child: const Text('NextPage'),
+ ),
+ ],
+ ),
+ ),
+ );
+ }
+}
diff --git a/lib/main_pages/HomePage/hero_card.dart b/lib/main_pages/HomePage/hero_card.dart
new file mode 100644
index 0000000..07af0e4
--- /dev/null
+++ b/lib/main_pages/HomePage/hero_card.dart
@@ -0,0 +1,129 @@
+// ignore_for_file: deprecated_member_use
+
+import 'package:flutter/material.dart';
+import 'package:google_fonts/google_fonts.dart';
+import 'package:monarch/other_pages/colors.dart';
+ final double totalBalance = 5847.32;
+ final double monthlyIncome = 8500.00;
+ final double monthlyExpenses = 2652.68;
+
+
+class BalanceCardPage extends StatelessWidget {
+ const BalanceCardPage({super.key});
+
+ @override
+ Widget build(BuildContext context) {
+ return Container(
+ padding: const EdgeInsets.all(24),
+ decoration: BoxDecoration(
+ gradient: LinearGradient(
+ begin: Alignment.topLeft,
+ end: Alignment.bottomRight,
+ colors: [accentColor, accentColor.withOpacity(0.8)],
+ ),
+ borderRadius: BorderRadius.circular(24),
+ boxShadow: [
+ BoxShadow(
+ color: accentColor.withOpacity(0.3),
+ blurRadius: 20,
+ offset: const Offset(0, 8),
+ ),
+ ],
+ ),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Row(
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ children: [
+ Text(
+ 'Total Balance',
+ style: GoogleFonts.inter(
+ color: Colors.white.withOpacity(0.9),
+ fontSize: 16,
+ fontWeight: FontWeight.w500,
+ ),
+ ),
+ Icon(
+ Icons.visibility_outlined,
+ color: Colors.white.withOpacity(0.9),
+ size: 20,
+ ),
+ ],
+ ),
+ const SizedBox(height: 8),
+ Text(
+ '\$${totalBalance.toStringAsFixed(2)}',
+ style: GoogleFonts.inter(
+ color: Colors.white,
+ fontSize: 36,
+ fontWeight: FontWeight.w700,
+ letterSpacing: -1,
+ ),
+ ),
+ const SizedBox(height: 20),
+ Row(
+ children: [
+ Expanded(
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Text(
+ 'Income',
+ style: GoogleFonts.inter(
+ color: Colors.white.withOpacity(0.8),
+ fontSize: 14,
+ fontWeight: FontWeight.w400,
+ ),
+ ),
+ const SizedBox(height: 4),
+ Text(
+ '\$${monthlyIncome.toStringAsFixed(0)}',
+ style: GoogleFonts.inter(
+ color: Colors.white,
+ fontSize: 18,
+ fontWeight: FontWeight.w600,
+ ),
+ ),
+ ],
+ ),
+ ),
+ Container(
+ width: 1,
+ height: 40,
+ color: Colors.white.withOpacity(0.3),
+ ),
+ Expanded(
+ child: Padding(
+ padding: const EdgeInsets.only(left: 16),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Text(
+ 'Expenses',
+ style: GoogleFonts.inter(
+ color: Colors.white.withOpacity(0.8),
+ fontSize: 14,
+ fontWeight: FontWeight.w400,
+ ),
+ ),
+ const SizedBox(height: 4),
+ Text(
+ '\$${monthlyExpenses.toStringAsFixed(0)}',
+ style: GoogleFonts.inter(
+ color: Colors.white,
+ fontSize: 18,
+ fontWeight: FontWeight.w600,
+ ),
+ ),
+ ],
+ ),
+ ),
+ ),
+ ],
+ ),
+ ],
+ ),
+ );
+ }
+}
diff --git a/lib/main_pages/HomePage/homepage.dart b/lib/main_pages/HomePage/homepage.dart
new file mode 100644
index 0000000..65a48b1
--- /dev/null
+++ b/lib/main_pages/HomePage/homepage.dart
@@ -0,0 +1,155 @@
+// ignore_for_file: deprecated_member_use, unused_local_variable, use_super_parameters, avoid_print
+
+
+import 'package:flutter/material.dart';
+import 'package:google_fonts/google_fonts.dart';
+import 'package:monarch/other_pages/colors.dart';
+import 'package:monarch/support/fetch_service.dart';
+import 'package:monarch/main_pages/HomePage/hero_card.dart';
+import 'package:monarch/main_pages/HomePage/navbar.dart';
+import 'package:monarch/main_pages/HomePage/quick_actions.dart';
+import 'package:monarch/support/transcations_recent.dart';
+//import 'package:monarch/static.dart';
+
+class FinTrackHomePage extends StatefulWidget {
+ const FinTrackHomePage({Key? key}) : super(key: key);
+
+ @override
+ State createState() => _FinTrackHomePageState();
+}
+
+class _FinTrackHomePageState extends State
+ with TickerProviderStateMixin {
+ // Modern color palette
+
+ // List to hold recent transactions
+
+
+ late AnimationController _fadeController;
+ late AnimationController _slideController;
+ late Animation _fadeAnimation;
+ late Animation _slideAnimation;
+
+ // Sample data for dashboard
+
+ @override
+ void initState() {
+ super.initState();
+ fetchRecentTransactions().then((transactions) {
+ // Do something with the transactions
+ });
+
+ _fadeController = AnimationController(
+ duration: const Duration(milliseconds: 1200),
+ vsync: this,
+ );
+
+ _slideController = AnimationController(
+ duration: const Duration(milliseconds: 800),
+ vsync: this,
+ );
+
+ _fadeAnimation = Tween(
+ begin: 0.0,
+ end: 1.0,
+ ).animate(CurvedAnimation(parent: _fadeController, curve: Curves.easeOut));
+
+ _slideAnimation = Tween(
+ begin: const Offset(0, 0.3),
+ end: Offset.zero,
+ ).animate(
+ CurvedAnimation(parent: _slideController, curve: Curves.easeOutCubic),
+ );
+
+ // Start animations
+ _fadeController.forward();
+ _slideController.forward();
+ }
+
+ @override
+ void dispose() {
+ _fadeController.dispose();
+ _slideController.dispose();
+ super.dispose();
+ }
+
+ int _selectedIndex = 0;
+
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ backgroundColor: backgroundColor,
+ body: SafeArea(
+ child: FadeTransition(
+ opacity: _fadeAnimation,
+ child: SlideTransition(
+ position: _slideAnimation,
+ child: SingleChildScrollView(
+ padding: const EdgeInsets.all(20),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Row(
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ children: [
+ Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Text(
+ 'Good Morning! 👋',
+ style: GoogleFonts.inter(
+ color: primaryColor,
+ fontSize: 24,
+ fontWeight: FontWeight.w700,
+ ),
+ ),
+ ],
+ ),
+ Container(
+ width: 48,
+ height: 48,
+ decoration: BoxDecoration(
+ color: accentColor.withOpacity(0.1),
+ borderRadius: BorderRadius.circular(16),
+ ),
+ child: Icon(
+ Icons.notifications_outlined,
+ color: accentColor,
+ size: 24,
+ ),
+ ),
+ ],
+ ),
+ const SizedBox(height: 16),
+ const BalanceCardPage(),
+ const SizedBox(height: 24),
+ QuickActionsPage(),
+ const SizedBox(height: 24),
+ RecentTransactionsWidget(
+ recentTransactions: fetchRecentTransactions(),
+ ),
+ const SizedBox(height: 24),
+
+ const SizedBox(height: 32),
+ ],
+ ),
+ ),
+ ),
+ ),
+ ),
+
+ floatingActionButton: CustomNavBar(
+ currentIndex: _selectedIndex,
+ onTap: (index) {
+ setState(() => _selectedIndex = index);
+ },
+ backgroundColor: backgroundColor,
+ accentColor: accentColor,
+ primaryColor: primaryColor,
+ cardColor: cardColor,
+
+ floatingActionButtonLocation: FloatingActionButtonLocation.centerTop,
+ ),
+ );
+ }
+}
diff --git a/lib/main_pages/HomePage/navbar.dart b/lib/main_pages/HomePage/navbar.dart
new file mode 100644
index 0000000..31d0b75
--- /dev/null
+++ b/lib/main_pages/HomePage/navbar.dart
@@ -0,0 +1,149 @@
+// ignore_for_file: deprecated_member_use
+
+import 'package:flutter/material.dart';
+import 'package:monarch/support/add.dart';
+import 'package:monarch/main_pages/HomePage/homepage.dart';
+import 'package:monarch/main_pages/Statistics/statistics.dart';
+
+class CustomNavBar extends StatelessWidget {
+ final int currentIndex;
+ final void Function(int) onTap;
+ final Color backgroundColor;
+ final Color accentColor;
+ final Color primaryColor;
+ final Color cardColor;
+
+ const CustomNavBar({
+ super.key,
+ required this.currentIndex,
+ required this.onTap,
+ required this.backgroundColor,
+ required this.accentColor,
+ required this.primaryColor,
+ required this.cardColor, required FloatingActionButtonLocation floatingActionButtonLocation,
+ });
+
+ // Define navigation items configuration
+ final List _navItems = const [
+ NavItem(
+ icon: Icons.home_rounded,
+ index: 0,
+ page: FinTrackHomePage(),
+ ),
+ NavItem(
+ icon: Icons.bar_chart_rounded,
+ index: 1,
+ page: Statistics(),
+ ),
+ NavItem(
+ icon: Icons.settings_rounded,
+ index: 2,
+ page: AddExpenseScreen(),
+ ),
+ ];
+
+ @override
+ Widget build(BuildContext context) {
+ return Container(
+ margin: const EdgeInsets.symmetric(horizontal: 24, vertical: 16),
+ height: 72,
+ decoration: BoxDecoration(
+ color: cardColor,
+ borderRadius: BorderRadius.circular(36),
+ boxShadow: [
+ BoxShadow(
+ color: primaryColor.withOpacity(0.1),
+ blurRadius: 30,
+ offset: const Offset(0, 8),
+ ),
+ ],
+ ),
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.spaceEvenly,
+ children: [
+ ..._navItems.map((item) => _buildNavItem(context, item)),
+ _buildAddButton(context),
+ ],
+ ),
+ );
+ }
+
+ Widget _buildNavItem(BuildContext context, NavItem item) {
+ final isActive = currentIndex == item.index;
+
+ return Material(
+ color: Colors.transparent,
+ borderRadius: BorderRadius.circular(20),
+ child: InkWell(
+ borderRadius: BorderRadius.circular(20),
+ onTap: () {
+ onTap(item.index);
+ Navigator.pushReplacement(
+ context,
+ MaterialPageRoute(builder: (context) => item.page),
+ );
+ },
+ child: Container(
+ width: 48,
+ height: 48,
+ decoration: BoxDecoration(
+ color: isActive ? primaryColor.withOpacity(0.1) : Colors.transparent,
+ borderRadius: BorderRadius.circular(20),
+ ),
+ child: Icon(
+ item.icon,
+ color: isActive ? primaryColor : primaryColor.withOpacity(0.4),
+ size: 24,
+ ),
+ ),
+ ),
+ );
+ }
+
+ Widget _buildAddButton(BuildContext context) {
+ return Container(
+ width: 48,
+ height: 48,
+ decoration: BoxDecoration(
+ color: accentColor,
+ borderRadius: BorderRadius.circular(20),
+ boxShadow: [
+ BoxShadow(
+ color: accentColor.withOpacity(0.3),
+ blurRadius: 12,
+ offset: const Offset(0, 4),
+ ),
+ ],
+ ),
+ child: Material(
+ color: Colors.transparent,
+ borderRadius: BorderRadius.circular(20),
+ child: InkWell(
+ onTap: () => Navigator.push(
+ context,
+ MaterialPageRoute(builder: (context) => const AddExpenseScreen()),
+ ),
+ borderRadius: BorderRadius.circular(20),
+ child: const Icon(
+ Icons.add_rounded,
+ color: Colors.white,
+ size: 24,
+ ),
+ ),
+ ),
+ );
+ }
+}
+
+// Navigation item model
+class NavItem {
+ final IconData icon;
+ final int index;
+ final Widget page;
+
+ const NavItem({
+ required this.icon,
+ required this.index,
+ required this.page,
+ });
+}
diff --git a/lib/main_pages/HomePage/quick_actions.dart b/lib/main_pages/HomePage/quick_actions.dart
new file mode 100644
index 0000000..a97f572
--- /dev/null
+++ b/lib/main_pages/HomePage/quick_actions.dart
@@ -0,0 +1,117 @@
+// ignore_for_file: deprecated_member_use
+
+import 'package:flutter/material.dart';
+import 'package:flutter/services.dart';
+import 'package:google_fonts/google_fonts.dart';
+import 'package:monarch/support/add.dart';
+import 'package:monarch/other_pages/colors.dart';
+
+class QuickActionsPage extends StatelessWidget {
+ const QuickActionsPage({super.key});
+
+ @override
+ Widget build(BuildContext context) {
+ return Row(
+ children: [
+ Expanded(
+ child: GestureDetector(
+ onTap: () {
+ HapticFeedback.heavyImpact();
+ Navigator.pushReplacement(
+ context,
+ MaterialPageRoute(
+ builder: (context) => const AddExpenseScreen(),
+ ),
+ );
+ },
+ child: Container(
+ padding: const EdgeInsets.all(20),
+ decoration: BoxDecoration(
+ color: cardColor,
+ borderRadius: BorderRadius.circular(16),
+ boxShadow: [
+ BoxShadow(
+ color: primaryColor.withOpacity(0.08),
+ blurRadius: 10,
+ offset: const Offset(0, 4),
+ ),
+ ],
+ ),
+ child: Column(
+ children: [
+ Container(
+ width: 48,
+ height: 48,
+ decoration: BoxDecoration(
+ color: accentColor.withOpacity(0.1),
+ borderRadius: BorderRadius.circular(12),
+ ),
+ child: Icon(Icons.add, color: accentColor, size: 24),
+ ),
+ const SizedBox(height: 12),
+ Text(
+ 'Add Expense',
+ style: GoogleFonts.inter(
+ color: primaryColor,
+ fontSize: 14,
+ fontWeight: FontWeight.w600,
+ ),
+ ),
+ ],
+ ),
+ ),
+ ),
+ ),
+ const SizedBox(width: 16),
+ Expanded(
+ child: GestureDetector(
+ onTap: () {
+ HapticFeedback.lightImpact();
+ // Navigate to Statistics
+ },
+ child: Container(
+ padding: const EdgeInsets.all(20),
+ decoration: BoxDecoration(
+ color: cardColor,
+ borderRadius: BorderRadius.circular(16),
+ boxShadow: [
+ BoxShadow(
+ color: primaryColor.withOpacity(0.08),
+ blurRadius: 10,
+ offset: const Offset(0, 4),
+ ),
+ ],
+ ),
+ child: Column(
+ children: [
+ Container(
+ width: 48,
+ height: 48,
+ decoration: BoxDecoration(
+ color: Colors.blue.withOpacity(0.1),
+ borderRadius: BorderRadius.circular(12),
+ ),
+ child: const Icon(
+ Icons.bar_chart,
+ color: Colors.blue,
+ size: 24,
+ ),
+ ),
+ const SizedBox(height: 12),
+ Text(
+ 'Statistics',
+ style: GoogleFonts.inter(
+ color: primaryColor,
+ fontSize: 14,
+ fontWeight: FontWeight.w600,
+ ),
+ ),
+ ],
+ ),
+ ),
+ ),
+ ),
+ ],
+ );
+ }
+}
diff --git a/lib/main_pages/Statistics/budget_manager.dart b/lib/main_pages/Statistics/budget_manager.dart
new file mode 100644
index 0000000..b072ddb
--- /dev/null
+++ b/lib/main_pages/Statistics/budget_manager.dart
@@ -0,0 +1,14 @@
+import 'package:shared_preferences/shared_preferences.dart';
+
+class BudgetManager {
+ static const _budgetKey = 'user_budget';
+
+ static Future getBudget() async {
+ final prefs = await SharedPreferences.getInstance();
+ return prefs.getDouble(_budgetKey) ?? 10000.0; // Default value
+ }
+ static Future setBudget(double amount) async {
+ final prefs = await SharedPreferences.getInstance();
+ await prefs.setDouble(_budgetKey, amount);
+ }
+}
diff --git a/lib/main_pages/Statistics/statistics.dart b/lib/main_pages/Statistics/statistics.dart
new file mode 100644
index 0000000..89cad31
--- /dev/null
+++ b/lib/main_pages/Statistics/statistics.dart
@@ -0,0 +1,756 @@
+// ignore_for_file: sort_child_properties_last, use_build_context_synchronously, deprecated_member_use, unnecessary_import, unused_local_variable, unused_import, sized_box_for_whitespace
+
+import 'dart:convert';
+import 'dart:ui';
+import 'package:flutter/material.dart';
+import 'package:fl_chart/fl_chart.dart';
+import 'package:flutter_dotenv/flutter_dotenv.dart';
+import 'package:google_fonts/google_fonts.dart';
+import 'package:http/http.dart' as http;
+import 'package:monarch/support/add.dart';
+import 'package:monarch/other_pages/enviroment.dart';
+import 'package:monarch/main_pages/Statistics/update_budget.dart';
+import 'package:monarch/main_pages/Statistics/budget_manager.dart';
+import 'package:monarch/main_pages/HomePage/homepage.dart';
+import 'package:monarch/main_pages/HomePage/navbar.dart';
+
+class Transaction {
+ final String description;
+ final double amount;
+ final String category;
+ final DateTime date;
+
+ Transaction({
+ required this.description,
+ required this.amount,
+ required this.category,
+ required this.date,
+ });
+
+ factory Transaction.fromJson(Map json) {
+ return Transaction(
+ description: json['description'],
+ amount: (json['amount'] as num).toDouble(),
+ category: json['category'],
+ date: DateTime.parse(json['date']),
+ );
+ }
+}
+
+class Statistics extends StatefulWidget {
+ const Statistics({super.key});
+
+ @override
+ State createState() => StatisticsState();
+}
+
+class StatisticsState extends State with TickerProviderStateMixin {
+ List transactions = [];
+ bool isLoading = false;
+ late AnimationController _animationController;
+ late Animation _fadeAnimation;
+ late Animation _slideAnimation;
+ final List categories = [
+ 'Food',
+ 'Shopping',
+ 'Bills',
+ 'Travel',
+ 'Entertainment',
+ 'Other',
+ ];
+ String selectedCategory = 'All';
+ Map totalAmountPerCategory = {};
+ // Color Scheme
+ final Color backgroundColor = const Color(0xFFF8F9FA);
+ final Color primaryColor = const Color(0xFF2D3436);
+ final Color accentColor = const Color(0xFF00B894);
+ final Color cardColor = const Color(0xFFFFFFFF);
+ final Color textSecondary = const Color(0xFF636E72);
+ final Color surfaceColor = const Color(0xFFF1F2F6);
+
+ // Responsive methods
+ double responsiveWidth(double size) =>
+ size * (MediaQuery.of(context).size.width / 375);
+ double responsiveHeight(double size) =>
+ size * (MediaQuery.of(context).size.height / 812);
+ double responsiveText(double size) {
+ final width = MediaQuery.of(context).size.width;
+ if (width < 350) return size * 0.9;
+ if (width > 600) return size * 1.2;
+ return size;
+ }
+
+ @override
+ void initState() {
+ super.initState();
+ _animationController = AnimationController(
+ duration: const Duration(milliseconds: 1200),
+ vsync: this,
+ );
+ _fadeAnimation = Tween(begin: 0.0, end: 1.0).animate(
+ CurvedAnimation(parent: _animationController, curve: Curves.easeOut),
+ );
+ _slideAnimation = Tween(
+ begin: const Offset(0, 0.3),
+ end: Offset.zero,
+ ).animate(
+ CurvedAnimation(parent: _animationController, curve: Curves.easeOut),
+ );
+ fetchTransactions();
+ _animationController.forward();
+ }
+
+ @override
+ void dispose() {
+ _animationController.dispose();
+ super.dispose();
+ }
+
+ Future fetchTransactions({String category = 'All'}) async {
+ setState(() => isLoading = true);
+ try {
+ final uri = Uri.parse(
+ '${Environment.baseUrl}/api/transactions',
+ ).replace(
+ queryParameters: category == 'All' ? null : {'category': category},
+ );
+ final response = await http.get(uri);
+ if (response.statusCode == 200) {
+ final data = json.decode(response.body);
+ final List list = data['data'];
+ final fetched = list.map((json) => Transaction.fromJson(json)).toList();
+ final totals = {};
+ for (var tx in fetched) {
+ totals[tx.category] = (totals[tx.category] ?? 0) + tx.amount;
+ }
+ setState(() {
+ transactions = fetched;
+ totalAmountPerCategory = totals;
+ });
+ } else {
+ throw Exception('Failed to load transactions');
+ }
+ } catch (e) {
+ _showCustomSnackBar(
+ message: 'Error fetching transactions',
+ icon: Icons.data_exploration_rounded,
+ backgroundColor: const Color(0xFFFF9F43),
+ iconColor: Colors.white,
+ duration: const Duration(seconds: 4),
+ );
+ } finally {
+ setState(() => isLoading = false);
+ }
+ }
+
+ Widget _buildHeader() {
+ return Container(
+ padding: EdgeInsets.fromLTRB(
+ responsiveWidth(24),
+ responsiveHeight(60),
+ responsiveWidth(24),
+ responsiveHeight(20),
+ ),
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ children: [
+ Container(
+ width: responsiveWidth(44),
+ height: responsiveWidth(44),
+ decoration: BoxDecoration(
+ color: cardColor,
+ borderRadius: BorderRadius.circular(responsiveWidth(22)),
+ boxShadow: [
+ BoxShadow(
+ color: primaryColor.withOpacity(0.08),
+ blurRadius: responsiveWidth(20),
+ offset: const Offset(0, 4),
+ ),
+ ],
+ ),
+ child: Material(
+ color: Colors.transparent,
+ borderRadius: BorderRadius.circular(responsiveWidth(22)),
+ child: InkWell(
+ borderRadius: BorderRadius.circular(responsiveWidth(22)),
+ onTap:
+ () => Navigator.pushReplacement(
+ context,
+ MaterialPageRoute(
+ builder: (context) => const AddExpenseScreen(),
+ ),
+ ),
+ child: Icon(
+ Icons.arrow_back_ios_rounded,
+ color: primaryColor,
+ size: responsiveText(20),
+ ),
+ ),
+ ),
+ ),
+ Container(
+ width: responsiveWidth(44),
+ height: responsiveWidth(44),
+ decoration: BoxDecoration(
+ color: cardColor,
+ borderRadius: BorderRadius.circular(responsiveWidth(22)),
+ boxShadow: [
+ BoxShadow(
+ color: primaryColor.withOpacity(0.08),
+ blurRadius: responsiveWidth(20),
+ offset: const Offset(0, 4),
+ ),
+ ],
+ ),
+ child: PopupMenuButton(
+ onSelected: (String value) async {
+ final updatedBudget = await Navigator.push(
+ context,
+ MaterialPageRoute(builder: (context) => const UpdateBudget()),
+ );
+ if (updatedBudget != null) {
+ setState(() => budget = updatedBudget);
+ await BudgetManager.setBudget(updatedBudget);
+ _showCustomSnackBar(
+ message: 'Budget updated to ₹${updatedBudget.toInt()}',
+ icon: Icons.check_circle_rounded,
+ backgroundColor: const Color(0xFF00B894),
+ iconColor: Colors.white,
+ );
+ }
+ },
+ itemBuilder:
+ (BuildContext context) => [
+ PopupMenuItem(
+ value: 'update_budget',
+ child: Container(
+ padding: EdgeInsets.symmetric(
+ vertical: responsiveHeight(8),
+ horizontal: responsiveWidth(12),
+ ),
+ child: Row(
+ mainAxisSize: MainAxisSize.min,
+ children: [
+ Icon(
+ Icons.edit_rounded,
+ color: primaryColor,
+ size: responsiveText(18),
+ ),
+ SizedBox(width: responsiveWidth(12)),
+ Text(
+ 'Update Budget',
+ style: GoogleFonts.inter(
+ color: primaryColor,
+ fontSize: responsiveText(14),
+ fontWeight: FontWeight.w500,
+ ),
+ ),
+ ],
+ ),
+ ),
+ ),
+ PopupMenuItem(
+ value: 'Update Income',
+ child: Container(
+ padding: EdgeInsets.symmetric(
+ vertical: responsiveHeight(8),
+ horizontal: responsiveWidth(12),
+ ),
+ child: Row(
+ mainAxisSize: MainAxisSize.min,
+ children: [
+ Icon(
+ Icons.visibility_rounded,
+ color: primaryColor,
+ size: responsiveText(18),
+ ),
+ SizedBox(width: responsiveWidth(12)),
+ Text(
+ 'View Budget',
+ style: GoogleFonts.inter(
+ color: primaryColor,
+ fontSize: responsiveText(14),
+ fontWeight: FontWeight.w500,
+ ),
+ ),
+ ],
+ ),
+ ),
+ ),
+ ],
+ offset: Offset(0, responsiveHeight(50)),
+ elevation: 8,
+ shape: RoundedRectangleBorder(
+ borderRadius: BorderRadius.circular(responsiveWidth(16)),
+ ),
+ color: cardColor,
+ child: Material(
+ color: Colors.transparent,
+ borderRadius: BorderRadius.circular(responsiveWidth(22)),
+ child: InkWell(
+ borderRadius: BorderRadius.circular(responsiveWidth(22)),
+ child: Container(
+ padding: EdgeInsets.all(responsiveWidth(10)),
+ child: Icon(
+ Icons.more_horiz_rounded,
+ color: primaryColor,
+ size: responsiveText(24),
+ ),
+ ),
+ ),
+ ),
+ ),
+ ),
+ ],
+ ),
+ );
+ }
+
+ var budget = 10000.0 > 0 ? 10000.0 : 0.0;
+ Widget _buildTotalSpentCard() {
+ final totalSpent = transactions.fold(
+ 0,
+ (sum, tx) => sum + tx.amount,
+ );
+ final progress = totalSpent / budget;
+
+ return SlideTransition(
+ position: _slideAnimation,
+ child: FadeTransition(
+ opacity: _fadeAnimation,
+ child: Container(
+ margin: EdgeInsets.symmetric(horizontal: responsiveWidth(24)),
+ padding: EdgeInsets.all(responsiveWidth(32)),
+ decoration: BoxDecoration(
+ color: cardColor,
+ borderRadius: BorderRadius.circular(responsiveWidth(28)),
+ boxShadow: [
+ BoxShadow(
+ color: primaryColor.withOpacity(0.06),
+ blurRadius: responsiveWidth(30),
+ offset: const Offset(0, 8),
+ spreadRadius: 0,
+ ),
+ ],
+ ),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Text(
+ 'TOTAL SPENT',
+ style: GoogleFonts.inter(
+ fontSize: responsiveText(13),
+ fontWeight: FontWeight.w500,
+ color: textSecondary,
+ letterSpacing: 1.2,
+ ),
+ ),
+ SizedBox(height: responsiveHeight(12)),
+ Text(
+ '₹${totalSpent.toStringAsFixed(1)}',
+ style: GoogleFonts.inter(
+ fontSize: responsiveText(42),
+ fontWeight: FontWeight.w700,
+ color: primaryColor,
+ height: 1.1,
+ ),
+ ),
+ SizedBox(height: responsiveHeight(32)),
+ Center(
+ child: Container(
+ width: responsiveWidth(160),
+ height: responsiveWidth(160),
+ child: Stack(
+ alignment: Alignment.center,
+ children: [
+ Container(
+ width: responsiveWidth(160),
+ height: responsiveWidth(160),
+ decoration: BoxDecoration(
+ shape: BoxShape.circle,
+ border: Border.all(
+ color: surfaceColor,
+ width: responsiveWidth(8),
+ ),
+ ),
+ ),
+ SizedBox(
+ width: responsiveWidth(160),
+ height: responsiveWidth(160),
+ child: CircularProgressIndicator(
+ value: progress > 1 ? 1 : progress,
+ strokeWidth: responsiveWidth(8),
+ backgroundColor: Colors.transparent,
+ valueColor: AlwaysStoppedAnimation(
+ progress > 0.8
+ ? const Color(0xFFE74C3C)
+ : progress > 0.6
+ ? const Color(0xFFF39C12)
+ : accentColor,
+ ),
+ strokeCap: StrokeCap.round,
+ ),
+ ),
+ Column(
+ mainAxisSize: MainAxisSize.min,
+ children: [
+ Text(
+ '${(progress * 100).toInt()}%',
+ style: GoogleFonts.inter(
+ fontSize: responsiveText(24),
+ fontWeight: FontWeight.w700,
+ color: primaryColor,
+ ),
+ ),
+ SizedBox(height: responsiveHeight(4)),
+ Text(
+ 'of ₹${budget.toInt()}',
+ style: GoogleFonts.inter(
+ fontSize: responsiveText(12),
+ fontWeight: FontWeight.w500,
+ color: textSecondary,
+ ),
+ ),
+ ],
+ ),
+ ],
+ ),
+ ),
+ ),
+ SizedBox(height: responsiveHeight(24)),
+ if (totalAmountPerCategory.isNotEmpty) _buildCategoryBreakdown(),
+ ],
+ ),
+ ),
+ ),
+ );
+ }
+
+ Widget _buildCategoryBreakdown() {
+ final sortedCategories =
+ totalAmountPerCategory.entries.toList()
+ ..sort((a, b) => b.value.compareTo(a.value));
+ final topCategories = sortedCategories.take(3).toList();
+
+ return Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Text(
+ 'TOP CATEGORIES',
+ style: GoogleFonts.inter(
+ fontSize: responsiveText(11),
+ fontWeight: FontWeight.w600,
+ color: textSecondary,
+ letterSpacing: 1,
+ ),
+ ),
+ SizedBox(height: responsiveHeight(16)),
+ ...topCategories.map(
+ (entry) => _buildCategoryRow(entry.key, entry.value),
+ ),
+ ],
+ );
+ }
+
+ Widget _buildCategoryRow(String category, double amount) {
+ final total = transactions.fold(0, (sum, tx) => sum + tx.amount);
+ final percentage = total > 0 ? (amount / total) : 0.0;
+
+ return Padding(
+ padding: EdgeInsets.only(bottom: responsiveHeight(12)),
+ child: Row(
+ children: [
+ Container(
+ width: responsiveWidth(8),
+ height: responsiveWidth(8),
+ decoration: BoxDecoration(
+ color: _getCategoryColor(category),
+ shape: BoxShape.circle,
+ ),
+ ),
+ SizedBox(width: responsiveWidth(12)),
+ Expanded(
+ child: Text(
+ category,
+ style: GoogleFonts.inter(
+ fontSize: responsiveText(14),
+ fontWeight: FontWeight.w500,
+ color: primaryColor,
+ ),
+ ),
+ ),
+ Text(
+ '${(percentage * 100).toInt()}%',
+ style: GoogleFonts.inter(
+ fontSize: responsiveText(14),
+ fontWeight: FontWeight.w600,
+ color: textSecondary,
+ ),
+ ),
+ ],
+ ),
+ );
+ }
+
+ Widget buildCategoryChips() {
+ return Container(
+ height: responsiveHeight(50),
+ margin: EdgeInsets.only(bottom: responsiveHeight(16)),
+ child: ListView.builder(
+ scrollDirection: Axis.horizontal,
+ padding: EdgeInsets.symmetric(horizontal: responsiveWidth(20)),
+ itemCount: categories.length,
+ itemBuilder: (context, index) {
+ final cat = categories[index];
+ final bool isSelected = cat == selectedCategory;
+ return Container(
+ margin: EdgeInsets.only(right: responsiveWidth(12)),
+ child: FilterChip(
+ label: Text(cat),
+ selected: isSelected,
+ onSelected: (selected) {
+ if (selected) {
+ setState(() => selectedCategory = cat);
+ fetchTransactions(category: cat);
+ }
+ },
+ backgroundColor: surfaceColor,
+ selectedColor: primaryColor,
+ checkmarkColor: cardColor,
+ labelStyle: GoogleFonts.inter(
+ color: isSelected ? cardColor : textSecondary,
+ fontWeight: FontWeight.w500,
+ fontSize: responsiveText(14),
+ ),
+ side: BorderSide.none,
+ shape: RoundedRectangleBorder(
+ borderRadius: BorderRadius.circular(responsiveWidth(20)),
+ ),
+ ),
+ );
+ },
+ ),
+ );
+ }
+
+ Widget buildTransactionCard(Transaction tx) {
+ return Container(
+ margin: EdgeInsets.symmetric(
+ horizontal: responsiveWidth(24),
+ vertical: responsiveHeight(6),
+ ),
+ decoration: BoxDecoration(
+ color: cardColor,
+ borderRadius: BorderRadius.circular(responsiveWidth(20)),
+ boxShadow: [
+ BoxShadow(
+ color: primaryColor.withOpacity(0.04),
+ blurRadius: responsiveWidth(20),
+ offset: const Offset(0, 4),
+ ),
+ ],
+ ),
+ child: ListTile(
+ contentPadding: EdgeInsets.symmetric(
+ horizontal: responsiveWidth(20),
+ vertical: responsiveHeight(8),
+ ),
+ leading: Container(
+ width: responsiveWidth(48),
+ height: responsiveWidth(48),
+ decoration: BoxDecoration(
+ color: _getCategoryColor(tx.category),
+ borderRadius: BorderRadius.circular(responsiveWidth(14)),
+ ),
+ child: Icon(
+ _getCategoryIcon(tx.category),
+ color: cardColor,
+ size: responsiveText(24),
+ ),
+ ),
+ title: Text(
+ tx.description,
+ style: GoogleFonts.inter(
+ color: primaryColor,
+ fontWeight: FontWeight.w600,
+ fontSize: responsiveText(16),
+ ),
+ ),
+ subtitle: Padding(
+ padding: EdgeInsets.only(top: responsiveHeight(4)),
+ child: Text(
+ '${tx.category.toUpperCase()} • ${_formatTime(tx.date)}',
+ style: GoogleFonts.inter(
+ color: textSecondary,
+ fontSize: responsiveText(13),
+ fontWeight: FontWeight.w500,
+ ),
+ ),
+ ),
+ trailing: Text(
+ '₹${tx.amount.toStringAsFixed(1)}',
+ style: GoogleFonts.inter(
+ color: primaryColor,
+ fontWeight: FontWeight.w700,
+ fontSize: responsiveText(17),
+ ),
+ ),
+ ),
+ );
+ }
+
+ void _showCustomSnackBar({
+ required String message,
+ required IconData icon,
+ required Color backgroundColor,
+ required Color iconColor,
+ Duration duration = const Duration(seconds: 3),
+ }) {
+ ScaffoldMessenger.of(context).showSnackBar(
+ SnackBar(
+ content: Container(
+ padding: EdgeInsets.symmetric(vertical: responsiveHeight(4)),
+ child: Row(
+ children: [
+ Container(
+ padding: EdgeInsets.all(responsiveWidth(8)),
+ decoration: BoxDecoration(
+ color: Colors.white.withOpacity(0.2),
+ borderRadius: BorderRadius.circular(responsiveWidth(8)),
+ ),
+ child: Icon(icon, color: iconColor, size: responsiveText(20)),
+ ),
+ SizedBox(width: responsiveWidth(12)),
+ Expanded(
+ child: Text(
+ message,
+ style: GoogleFonts.inter(
+ fontWeight: FontWeight.w500,
+ color: Colors.white,
+ fontSize: responsiveText(14),
+ height: 1.4,
+ ),
+ ),
+ ),
+ ],
+ ),
+ ),
+ backgroundColor: backgroundColor,
+ behavior: SnackBarBehavior.floating,
+ shape: RoundedRectangleBorder(
+ borderRadius: BorderRadius.circular(responsiveWidth(12)),
+ ),
+ margin: EdgeInsets.all(responsiveWidth(16)),
+ duration: duration,
+ elevation: 8,
+ ),
+ );
+ }
+
+ Color _getCategoryColor(String category) {
+ final colors = [
+ const Color(0xFF6C5CE7),
+ const Color(0xFFE17055),
+ const Color(0xFF00B894),
+ const Color(0xFF0984E3),
+ const Color(0xFFE84393),
+ const Color(0xFFFD79A8),
+ const Color(0xFF6C5CE7),
+ ];
+ return colors[categories.indexOf(category) % colors.length];
+ }
+
+ IconData _getCategoryIcon(String category) {
+ switch (category) {
+ case 'Food':
+ return Icons.restaurant_rounded;
+ case 'Shopping':
+ return Icons.shopping_bag_rounded;
+ case 'Bills':
+ return Icons.receipt_rounded;
+ case 'Travel':
+ return Icons.flight_rounded;
+ case 'Entertainment':
+ return Icons.movie_rounded;
+ default:
+ return Icons.category_rounded;
+ }
+ }
+
+ String _formatTime(DateTime date) {
+ final now = DateTime.now();
+ final difference = now.difference(date);
+ if (difference.inDays == 0) {
+ return '${date.hour.toString().padLeft(2, '0')}:${date.minute.toString().padLeft(2, '0')}';
+ } else {
+ return '${date.day.toString().padLeft(2, '0')}-${date.month.toString().padLeft(2, '0')}';
+ }
+ }
+
+ int _selectedIndex = 0;
+
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ backgroundColor: backgroundColor,
+ body: Column(
+ children: [
+ _buildHeader(),
+ _buildTotalSpentCard(),
+ buildCategoryChips(),
+ Expanded(
+ child:
+ isLoading
+ ? Center(
+ child: CircularProgressIndicator(
+ valueColor: AlwaysStoppedAnimation(primaryColor),
+ strokeWidth: 2,
+ ),
+ )
+ : transactions.isEmpty
+ ? Center(
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Icon(
+ Icons.analytics_outlined,
+ size: responsiveWidth(64),
+ color: textSecondary.withOpacity(0.5),
+ ),
+ SizedBox(height: responsiveHeight(16)),
+ Text(
+ 'No transactions found',
+ style: GoogleFonts.inter(
+ color: textSecondary,
+ fontSize: responsiveText(16),
+ fontWeight: FontWeight.w500,
+ ),
+ ),
+ ],
+ ),
+ )
+ : ListView.builder(
+ padding: EdgeInsets.only(
+ top: responsiveHeight(8),
+ bottom: responsiveHeight(120),
+ ),
+ itemCount: transactions.length,
+ itemBuilder:
+ (context, index) =>
+ buildTransactionCard(transactions[index]),
+ ),
+ ),
+ ],
+ ),
+ floatingActionButton: CustomNavBar(
+ currentIndex: _selectedIndex,
+ onTap: (index) => setState(() => _selectedIndex = index),
+ backgroundColor: backgroundColor,
+ accentColor: accentColor,
+ primaryColor: primaryColor,
+ cardColor: cardColor,
+ floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
+ ),
+ );
+ }
+}
diff --git a/lib/main_pages/Statistics/update_budget.dart b/lib/main_pages/Statistics/update_budget.dart
new file mode 100644
index 0000000..a394e30
--- /dev/null
+++ b/lib/main_pages/Statistics/update_budget.dart
@@ -0,0 +1,423 @@
+// ignore_for_file: deprecated_member_use, use_build_context_synchronously
+
+import 'package:flutter/material.dart';
+import 'package:flutter/services.dart';
+import 'package:google_fonts/google_fonts.dart';
+import 'package:monarch/other_pages/colors.dart';
+import 'package:monarch/main_pages/Statistics/statistics.dart';
+
+class UpdateBudget extends StatefulWidget {
+ const UpdateBudget({super.key});
+
+ @override
+ State createState() => _UpdateBudgetState();
+}
+
+class _UpdateBudgetState extends State
+ with TickerProviderStateMixin {
+ // Constants and Controllers
+ static const _animationDuration = Duration(milliseconds: 600);
+ static const _fadeDuration = Duration(milliseconds: 800);
+
+
+ // Controllers and Focus Nodes
+ final TextEditingController amountController = TextEditingController();
+ final FocusNode _amountFocus = FocusNode();
+
+ // Animation Controllers
+ late AnimationController _slideController;
+ late AnimationController _fadeController;
+ late Animation _slideAnimation;
+ late Animation _fadeAnimation;
+
+ // State Variables
+ String _displayAmount = '';
+
+ @override
+ void initState() {
+ super.initState();
+ _initializeAnimations();
+ _setupFocusListeners();
+ }
+
+ @override
+ void dispose() {
+ _slideController.dispose();
+ _fadeController.dispose();
+ amountController.dispose();
+ _amountFocus.dispose();
+ super.dispose();
+ }
+
+ void _initializeAnimations() {
+ _slideController = AnimationController(
+ duration: _animationDuration,
+ vsync: this,
+ );
+ _fadeController = AnimationController(duration: _fadeDuration, vsync: this);
+
+ _slideAnimation = Tween(
+ begin: const Offset(0, 1),
+ end: Offset.zero,
+ ).animate(
+ CurvedAnimation(parent: _slideController, curve: Curves.easeOutCubic),
+ );
+
+ _fadeAnimation = Tween(
+ begin: 0.0,
+ end: 1.0,
+ ).animate(CurvedAnimation(parent: _fadeController, curve: Curves.easeOut));
+
+ _slideController.forward();
+ _fadeController.forward();
+ }
+
+ void _setupFocusListeners() {
+ _amountFocus.addListener(() => setState(() {}));
+ }
+
+ // UI Components
+ Widget _buildHeader(BuildContext context) {
+ return Padding(
+ padding: EdgeInsets.symmetric(
+ horizontal: _responsiveWidth(20, context),
+ vertical: _responsiveHeight(20, context),
+ ),
+ child: Row(
+ children: [
+ _buildBackButton(context),
+ SizedBox(width: _responsiveWidth(16, context)),
+ Text(
+ 'Budget',
+ style: GoogleFonts.inter(
+ color: Colors.white,
+ fontSize: _responsiveText(24, context),
+ fontWeight: FontWeight.w600,
+ ),
+ ),
+ ],
+ ),
+ );
+ }
+
+ Widget _buildBackButton(BuildContext context) {
+ return GestureDetector(
+ onTap: () => Navigator.pushReplacement(
+ context,
+ MaterialPageRoute(
+ builder: (context) => const Statistics(),
+ ),
+ ),
+ child: Container(
+ width: _responsiveWidth(44, context),
+ height: _responsiveWidth(44, context),
+ decoration: BoxDecoration(
+ color: primaryColor.withOpacity(0.8),
+ borderRadius: BorderRadius.circular(14),
+ border: Border.all(color: Colors.white.withOpacity(0.1), width: 1),
+ ),
+ child: const Icon(
+ Icons.arrow_back_ios_new,
+ color: Colors.white,
+ size: 20,
+ ),
+ ),
+ );
+ }
+
+ Widget _buildAmountDisplay() {
+ return Center(
+ child: Container(
+ padding: EdgeInsets.symmetric(
+ horizontal: _responsiveWidth(24, context),
+ vertical: _responsiveHeight(16, context),
+ ),
+ decoration: BoxDecoration(
+ color: cardColor,
+ borderRadius: BorderRadius.circular(20),
+ boxShadow: [
+ BoxShadow(
+ color: primaryColor.withOpacity(0.08),
+ blurRadius: 16,
+ offset: const Offset(0, 4),
+ ),
+ ],
+ ),
+ child: Text(
+ _displayAmount.isEmpty ? '₹0.00' : _displayAmount,
+ style: GoogleFonts.inter(
+ fontSize: _responsiveText(36, context),
+ fontWeight: FontWeight.w700,
+ color: primaryColor,
+ ),
+ ),
+ ),
+ );
+ }
+
+ Widget _buildKeypad(BuildContext context) {
+ return Expanded(
+ child: GridView.count(
+ physics: const NeverScrollableScrollPhysics(),
+ crossAxisCount: 3,
+ childAspectRatio: 1,
+ mainAxisSpacing: _responsiveWidth(10, context),
+ crossAxisSpacing: _responsiveWidth(10, context),
+ padding: EdgeInsets.symmetric(
+ horizontal: _responsiveWidth(10, context),
+ ),
+ children:
+ [
+ '1',
+ '2',
+ '3',
+ '4',
+ '5',
+ '6',
+ '7',
+ '8',
+ '9',
+ '.',
+ '0',
+ '⌫',
+ ].map((key) => _buildKeypadButton(key, context)).toList(),
+ ),
+ );
+ }
+
+ Widget _buildKeypadButton(String text, BuildContext context) {
+ final isSpecial = text == '.' || text == '⌫';
+
+ return GestureDetector(
+ onTap: () => _handleKeyPress(text),
+ child: Container(
+ decoration: BoxDecoration(
+ color: isSpecial ? surfaceColor : cardColor,
+ borderRadius: BorderRadius.circular(16),
+ border: Border.all(
+ color: isSpecial ? textSecondary.withOpacity(0.2) : surfaceColor,
+ width: 1,
+ ),
+ boxShadow: [
+ BoxShadow(
+ color: primaryColor.withOpacity(0.08),
+ blurRadius: 8,
+ offset: const Offset(0, 2),
+ ),
+ ],
+ ),
+ child: Center(
+ child: Text(
+ text,
+ style: GoogleFonts.inter(
+ fontSize: _responsiveText(24, context),
+ fontWeight: FontWeight.w600,
+ color: isSpecial ? textSecondary : primaryColor,
+ ),
+ ),
+ ),
+ ),
+ );
+ }
+
+ Widget _buildAddButton(BuildContext context) {
+ return ElevatedButton(
+ onPressed: () {
+ final amount = double.tryParse(amountController.text);
+ if (amount != null && amount > 0) {
+ Navigator.pop(context, amount); // Simply return the value
+ } else if (amount == null || amount <= 0) {
+ _showCustomSnackBar(
+ message: 'Please enter a valid budget amount',
+ icon: Icons.error,
+ backgroundColor: Colors.red,
+ );
+ }
+ },
+ child: Container(
+ width: double.infinity,
+ height: _responsiveHeight(60, context),
+ decoration: BoxDecoration(
+ color: accentColor,
+ borderRadius: BorderRadius.circular(16),
+ boxShadow: [
+ BoxShadow(
+ color: accentColor.withOpacity(0.3),
+ blurRadius: 20,
+ offset: const Offset(0, 8),
+ ),
+ ],
+ ),
+ child: Center(
+ child: Text(
+ 'Update Budget',
+ style: GoogleFonts.inter(
+ color: Colors.white,
+ fontSize: _responsiveText(18, context),
+ fontWeight: FontWeight.w600,
+ ),
+ ),
+ ),
+ ),
+ );
+ }
+
+ // Helper Methods
+ double _responsiveWidth(double size, BuildContext context) {
+ return size *
+ (MediaQuery.of(context).size.width / 375); // Base width 375 (iPhone 8)
+ }
+
+ double _responsiveHeight(double size, BuildContext context) {
+ return size *
+ (MediaQuery.of(context).size.height /
+ 812); // Base height 812 (iPhone 8)
+ }
+
+ double _responsiveText(double size, BuildContext context) {
+ final width = MediaQuery.of(context).size.width;
+ if (width < 350) return size * 0.9;
+ if (width > 600) return size * 1.2;
+ return size;
+ }
+
+ void _handleKeyPress(String text) {
+ HapticFeedback.heavyImpact();
+ if (text == '⌫') {
+ if (amountController.text.isNotEmpty) {
+ amountController.text = amountController.text.substring(
+ 0,
+ amountController.text.length - 1,
+ );
+ _updateDisplayAmount();
+ }
+ } else if (text == '.') {
+ if (!amountController.text.contains('.')) {
+ amountController.text += text;
+ _updateDisplayAmount();
+ }
+ } else {
+ amountController.text += text;
+ _updateDisplayAmount();
+ }
+ }
+
+ void _updateDisplayAmount() {
+ if (amountController.text.isEmpty) {
+ setState(() => _displayAmount = '');
+ return;
+ }
+
+ final cleanValue = amountController.text.replaceAll(RegExp(r'[^\d.]'), '');
+ final parts = cleanValue.split('.');
+ final cleanNumber =
+ parts.length > 2
+ ? '${parts[0]}.${parts.sublist(1).join('')}'
+ : cleanValue;
+
+ if (cleanNumber.isNotEmpty) {
+ final amount = double.tryParse(cleanNumber);
+ if (amount != null) {
+ setState(() => _displayAmount = '₹${amount.toStringAsFixed(2)}');
+ }
+ }
+ }
+
+ void _showCustomSnackBar({
+ required String message,
+ required IconData icon,
+ required Color backgroundColor,
+ Duration duration = const Duration(seconds: 3),
+ }) {
+ ScaffoldMessenger.of(context).showSnackBar(
+ SnackBar(
+ content: Row(
+ children: [
+ Container(
+ padding: const EdgeInsets.all(8),
+ decoration: BoxDecoration(
+ color: Colors.white.withOpacity(0.2),
+ borderRadius: BorderRadius.circular(8),
+ ),
+ child: Icon(icon, color: Colors.white, size: 20),
+ ),
+ const SizedBox(width: 12),
+ Expanded(
+ child: Text(
+ message,
+ style: GoogleFonts.inter(
+ fontWeight: FontWeight.w500,
+ color: Colors.white,
+ fontSize: 14,
+ height: 1.4,
+ ),
+ ),
+ ),
+ ],
+ ),
+ backgroundColor: backgroundColor,
+ behavior: SnackBarBehavior.floating,
+ shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)),
+ margin: EdgeInsets.all(_responsiveWidth(16, context)),
+ duration: duration,
+ elevation: 8,
+ ),
+ );
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ backgroundColor: primaryColor,
+ body: SafeArea(
+ child: SlideTransition(
+ position: _slideAnimation,
+ child: FadeTransition(
+ opacity: _fadeAnimation,
+ child: Column(
+ children: [
+ _buildHeader(context),
+ Expanded(
+ child: Container(
+ margin: EdgeInsets.only(top: _responsiveHeight(8, context)),
+ decoration: BoxDecoration(
+ color: backgroundColor,
+ borderRadius: const BorderRadius.only(
+ topLeft: Radius.circular(32),
+ topRight: Radius.circular(32),
+ ),
+ ),
+ child: Padding(
+ padding: EdgeInsets.all(_responsiveWidth(24, context)),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Center(
+ child: Container(
+ width: _responsiveWidth(40, context),
+ height: 4,
+ decoration: BoxDecoration(
+ color: textSecondary.withOpacity(0.3),
+ borderRadius: BorderRadius.circular(2),
+ ),
+ ),
+ ),
+ SizedBox(height: _responsiveHeight(32, context)),
+ _buildAmountDisplay(),
+ SizedBox(height: _responsiveHeight(20, context)),
+ _buildKeypad(context),
+ SizedBox(height: _responsiveHeight(24, context)),
+ _buildAddButton(context),
+ ],
+ ),
+ ),
+ ),
+ ),
+ ],
+ ),
+ ),
+ ),
+ ),
+ );
+ }
+}
diff --git a/lib/other_pages/colors.dart b/lib/other_pages/colors.dart
new file mode 100644
index 0000000..ac81239
--- /dev/null
+++ b/lib/other_pages/colors.dart
@@ -0,0 +1,8 @@
+ import 'dart:ui';
+
+final Color backgroundColor = const Color(0xFFF8F9FA); // Light cream/white
+ final Color primaryColor = const Color(0xFF2D3436); // Deep charcoal
+ final Color accentColor = const Color(0xFF00B894); // Emerald green
+ final Color cardColor = const Color(0xFFFFFFFF); // Pure white
+ final Color textSecondary = const Color(0xFF636E72); // Muted gray
+ final Color surfaceColor = const Color(0xFFF1F2F6); // Light surface
diff --git a/lib/other_pages/enviroment.dart b/lib/other_pages/enviroment.dart
new file mode 100644
index 0000000..9c3c212
--- /dev/null
+++ b/lib/other_pages/enviroment.dart
@@ -0,0 +1,3 @@
+class Environment {
+ static const String baseUrl = 'http://10.231.8.145:3000';
+}
diff --git a/lib/sppech.dart b/lib/sppech.dart
new file mode 100644
index 0000000..b0334f3
--- /dev/null
+++ b/lib/sppech.dart
@@ -0,0 +1,78 @@
+// ignore_for_file: avoid_print, library_private_types_in_public_api, depend_on_referenced_packages
+
+// For jsonEncode
+import 'package:flutter/material.dart';
+import 'package:speech_to_text/speech_to_text.dart' as stt;
+
+class SpeechInputPage extends StatelessWidget {
+ const SpeechInputPage({super.key});
+
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ appBar: AppBar(title: const Text('Speech to Text')),
+ body: const Center(
+ child: SpeechInputWidget(),
+ ),
+ );
+ }
+}
+
+class SpeechInputWidget extends StatefulWidget {
+ const SpeechInputWidget({super.key});
+
+ @override
+ State createState() => _SpeechInputWidgetState();
+}
+
+class _SpeechInputWidgetState extends State {
+ late stt.SpeechToText _speech;
+ bool _isListening = false;
+ String _spokenText = '';
+
+ @override
+ void initState() {
+ super.initState();
+ _speech = stt.SpeechToText();
+ }
+
+ void _listen() async {
+ if (!_isListening) {
+ bool available = await _speech.initialize(
+ onStatus: (val) => print('Status: $val'),
+ onError: (val) => print('Error: $val'),
+ );
+ if (available) {
+ setState(() => _isListening = true);
+ _speech.listen(
+ onResult: (val) {
+ setState(() {
+ _spokenText = val.recognizedWords;
+ });
+ },
+ );
+ }
+ } else {
+ setState(() => _isListening = false);
+ _speech.stop();
+ }
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ return Column(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Text(
+ _spokenText.isEmpty ? 'Say something…' : _spokenText,
+ style: const TextStyle(fontSize: 20),
+ ),
+ const SizedBox(height: 20),
+ FloatingActionButton(
+ onPressed: _listen,
+ child: Icon(_isListening ? Icons.mic : Icons.mic_none),
+ )
+ ],
+ );
+ }
+}
diff --git a/lib/support/add.dart b/lib/support/add.dart
new file mode 100644
index 0000000..21c6c43
--- /dev/null
+++ b/lib/support/add.dart
@@ -0,0 +1,606 @@
+// ignore_for_file: use_build_context_synchronously, deprecated_member_use
+
+import 'dart:convert';
+
+import 'package:flutter/material.dart';
+import 'package:flutter/services.dart';
+import 'package:google_fonts/google_fonts.dart';
+import 'package:http/http.dart' as http;
+import 'package:monarch/other_pages/colors.dart';
+import 'package:monarch/other_pages/enviroment.dart';
+import 'package:monarch/main_pages/Statistics/statistics.dart';
+
+class AddExpenseScreen extends StatefulWidget {
+ const AddExpenseScreen({super.key});
+
+ @override
+ State createState() => _AddExpenseScreenState();
+}
+
+class _AddExpenseScreenState extends State
+ with TickerProviderStateMixin {
+
+
+ final TextEditingController descriptionController = TextEditingController();
+ final TextEditingController amountController = TextEditingController();
+ final FocusNode _nameFocus = FocusNode();
+ final FocusNode _amountFocus = FocusNode();
+
+ late AnimationController _slideController;
+ late AnimationController _fadeController;
+ late Animation _slideAnimation;
+ late Animation _fadeAnimation;
+
+ bool _isNameFocused = false;
+ String _displayAmount = '';
+
+ @override
+ void initState() {
+ super.initState();
+
+ _slideController = AnimationController(
+ duration: const Duration(milliseconds: 600),
+ vsync: this,
+ );
+
+ _fadeController = AnimationController(
+ duration: const Duration(milliseconds: 800),
+ vsync: this,
+ );
+
+ _slideAnimation = Tween(
+ begin: const Offset(0, 1),
+ end: Offset.zero,
+ ).animate(
+ CurvedAnimation(parent: _slideController, curve: Curves.easeOutCubic),
+ );
+
+ _fadeAnimation = Tween(
+ begin: 0.0,
+ end: 1.0,
+ ).animate(CurvedAnimation(parent: _fadeController, curve: Curves.easeOut));
+
+ _nameFocus.addListener(() {
+ setState(() {
+ _isNameFocused = _nameFocus.hasFocus;
+ });
+ });
+
+ _amountFocus.addListener(() {
+ setState(() {});
+ });
+
+ // Start animations
+ _slideController.forward();
+ _fadeController.forward();
+ }
+
+ @override
+ void dispose() {
+ _slideController.dispose();
+ _fadeController.dispose();
+ descriptionController.dispose();
+ amountController.dispose();
+ _nameFocus.dispose();
+ _amountFocus.dispose();
+ super.dispose();
+ }
+
+ void _onAmountChanged(String value) {
+ if (value.isEmpty) {
+ setState(() {
+ _displayAmount = '';
+ });
+ return;
+ }
+
+ // Remove any non-digit characters except decimal point
+ String cleanValue = value.replaceAll(RegExp(r'[^\d.]'), '');
+
+ // Ensure only one decimal point
+ List parts = cleanValue.split('.');
+ if (parts.length > 2) {
+ cleanValue =
+ '₹{parts[0]}.₹{parts.sublist(1).join('
+ ')}';
+ }
+
+ if (cleanValue.isNotEmpty) {
+ double? amount = double.tryParse(cleanValue);
+ if (amount != null) {
+ setState(() {
+ _displayAmount = '₹${amount.toStringAsFixed(2)}';
+ });
+ }
+ }
+ }
+
+ Widget _buildKeypadButton(
+ String text, {
+ bool isSpecial = false,
+ double buttonHeight = 60,
+ }) {
+ return GestureDetector(
+ onTap: () {
+ HapticFeedback.lightImpact();
+ if (text == '⌫') {
+ if (amountController.text.isNotEmpty) {
+ amountController.text = amountController.text.substring(
+ 0,
+ amountController.text.length - 1,
+ );
+ _onAmountChanged(amountController.text);
+ }
+ } else if (text == '.') {
+ if (!amountController.text.contains('.')) {
+ amountController.text += text;
+ _onAmountChanged(amountController.text);
+ }
+ } else {
+ amountController.text += text;
+ _onAmountChanged(amountController.text);
+ }
+ },
+ child: Container(
+ height: buttonHeight,
+ decoration: BoxDecoration(
+ color: isSpecial ? surfaceColor : cardColor,
+ borderRadius: BorderRadius.circular(16),
+ border: Border.all(
+ color: isSpecial ? textSecondary.withOpacity(0.2) : surfaceColor,
+ width: 1,
+ ),
+ boxShadow: [
+ BoxShadow(
+ color: primaryColor.withOpacity(0.08),
+ blurRadius: 8,
+ offset: const Offset(0, 2),
+ ),
+ ],
+ ),
+ child: Center(
+ child: Text(
+ text,
+ style: GoogleFonts.inter(
+ fontSize: 24,
+ fontWeight: FontWeight.w600,
+ color: isSpecial ? textSecondary : primaryColor,
+ ),
+ ),
+ ),
+ ),
+ );
+ }
+
+ Future addTransaction() async {
+ // Validation first
+ if (descriptionController.text.trim().isEmpty ||
+ amountController.text.trim().isEmpty) {
+ _showCustomSnackBar(
+ message: 'Please fill in both name and amount',
+ icon: Icons.warning_rounded,
+ backgroundColor: const Color(0xFFFF6B6B),
+ iconColor: Colors.white,
+ );
+ return;
+ }
+
+ // Show beautiful loading indicator
+ showDialog(
+ context: context,
+ barrierDismissible: false,
+ builder:
+ (_) => Center(
+ child: Container(
+ padding: const EdgeInsets.all(24),
+ decoration: BoxDecoration(
+ color: cardColor,
+ borderRadius: BorderRadius.circular(16),
+ boxShadow: [
+ BoxShadow(
+ color: primaryColor.withOpacity(0.1),
+ blurRadius: 20,
+ offset: const Offset(0, 8),
+ ),
+ ],
+ ),
+ child: Column(
+ mainAxisSize: MainAxisSize.min,
+ children: [
+ CircularProgressIndicator(
+ valueColor: AlwaysStoppedAnimation(accentColor),
+ strokeWidth: 3,
+ ),
+ const SizedBox(height: 16),
+ Text(
+ 'Processing transaction...',
+ style: GoogleFonts.inter(
+ fontSize: 16,
+ fontWeight: FontWeight.w500,
+ color: primaryColor,
+ ),
+ ),
+ ],
+ ),
+ ),
+ ),
+ );
+
+ try {
+ final response = await http.post(
+ Uri.parse('${Environment.baseUrl}/api/transaction/add'),
+ headers: {'Content-Type': 'application/json'},
+ body: json.encode({
+ 'description': descriptionController.text,
+ 'amount': double.tryParse(amountController.text),
+ }),
+ );
+
+ Navigator.of(context).pop(); // Close loading dialog
+
+ if (response.statusCode == 200) {
+ final responseData = json.decode(response.body);
+ final predictedCategory = responseData['data']['category'];
+
+ // Clear the input fields
+ descriptionController.clear();
+ amountController.clear();
+ setState(() {
+ _displayAmount = '';
+ });
+
+ // Show success message
+ _showCustomSnackBar(
+ message:
+ 'Transaction added successfully!\nCategorized as: $predictedCategory',
+ icon: Icons.check_circle_rounded,
+ backgroundColor: accentColor,
+ iconColor: Colors.white,
+ duration: const Duration(seconds: 2),
+ );
+
+ // Navigate back to statistics page after a short delay
+ Future.delayed(const Duration(milliseconds: 1500), () {
+ if (mounted) {
+ Navigator.of(context).pop(); // Go back to previous screen
+ }
+ });
+ } else {
+ _showCustomSnackBar(
+ message: 'Failed to add transaction\nPlease try again',
+ icon: Icons.error_rounded,
+ backgroundColor: const Color(0xFFFF6B6B),
+ iconColor: Colors.white,
+ );
+ }
+ } catch (e) {
+ Navigator.of(context).pop(); // Close loading dialog
+ _showCustomSnackBar(
+ message: 'Network error occurred\nPlease check your connection',
+ icon: Icons.wifi_off_rounded,
+ backgroundColor: const Color(0xFFFF9F43),
+ iconColor: Colors.white,
+ );
+ }
+ }
+
+ void _showCustomSnackBar({
+ required String message,
+ required IconData icon,
+ required Color backgroundColor,
+ required Color iconColor,
+ Duration duration = const Duration(seconds: 3),
+ }) {
+ ScaffoldMessenger.of(context).showSnackBar(
+ SnackBar(
+ content: Container(
+ padding: const EdgeInsets.symmetric(vertical: 4),
+ child: Row(
+ children: [
+ Container(
+ padding: const EdgeInsets.all(8),
+ decoration: BoxDecoration(
+ color: Colors.white.withOpacity(0.2),
+ borderRadius: BorderRadius.circular(8),
+ ),
+ child: Icon(icon, color: iconColor, size: 20),
+ ),
+ const SizedBox(width: 12),
+ Expanded(
+ child: Text(
+ message,
+ style: GoogleFonts.inter(
+ fontWeight: FontWeight.w500,
+ color: Colors.white,
+ fontSize: 14,
+ height: 1.4,
+ ),
+ ),
+ ),
+ ],
+ ),
+ ),
+ backgroundColor: backgroundColor,
+ behavior: SnackBarBehavior.floating,
+ shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)),
+ margin: const EdgeInsets.all(16),
+ duration: duration,
+ elevation: 8,
+ ),
+ );
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ backgroundColor: primaryColor,
+ body: SafeArea(
+ child: SlideTransition(
+ position: _slideAnimation,
+ child: FadeTransition(
+ opacity: _fadeAnimation,
+ child: Column(
+ children: [
+ // Header
+ Padding(
+ padding: const EdgeInsets.all(20),
+ child: Row(
+ children: [
+ GestureDetector(
+ onTap:
+ () => Navigator.pushReplacement(
+ context,
+ MaterialPageRoute(
+ builder: (context) => Statistics(),
+ ),
+ ),
+ child: Container(
+ width: 44,
+ height: 44,
+ decoration: BoxDecoration(
+ color: primaryColor.withOpacity(0.8),
+ borderRadius: BorderRadius.circular(14),
+ border: Border.all(
+ color: Colors.white.withOpacity(0.1),
+ width: 1,
+ ),
+ ),
+ child: const Icon(
+ Icons.arrow_back_ios_new,
+ color: Colors.white,
+ size: 20,
+ ),
+ ),
+ ),
+ const SizedBox(width: 16),
+ Text(
+ 'Add Expense',
+ style: GoogleFonts.inter(
+ color: Colors.white,
+ fontSize: 24,
+ fontWeight: FontWeight.w600,
+ ),
+ ),
+ ],
+ ),
+ ),
+
+ // Main Content Card
+ Expanded(
+ child: Container(
+ margin: const EdgeInsets.only(top: 8),
+ decoration: BoxDecoration(
+ color: backgroundColor,
+ borderRadius: const BorderRadius.only(
+ topLeft: Radius.circular(32),
+ topRight: Radius.circular(32),
+ ),
+ ),
+ child: Padding(
+ padding: const EdgeInsets.all(24),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ // Drag indicator
+ Center(
+ child: Container(
+ width: 40,
+ height: 4,
+ decoration: BoxDecoration(
+ color: textSecondary.withOpacity(0.3),
+ borderRadius: BorderRadius.circular(2),
+ ),
+ ),
+ ),
+ const SizedBox(height: 32),
+
+ // Expense Name Section
+ Text(
+ 'Expense Name',
+ style: GoogleFonts.inter(
+ fontSize: 16,
+ fontWeight: FontWeight.w600,
+ color: primaryColor,
+ ),
+ ),
+ const SizedBox(height: 12),
+ Container(
+ decoration: BoxDecoration(
+ color: _isNameFocused ? cardColor : surfaceColor,
+ borderRadius: BorderRadius.circular(16),
+ border: Border.all(
+ color:
+ _isNameFocused
+ ? accentColor
+ : Colors.transparent,
+ width: 2,
+ ),
+ boxShadow:
+ _isNameFocused
+ ? [
+ BoxShadow(
+ color: accentColor.withOpacity(0.1),
+ blurRadius: 20,
+ offset: const Offset(0, 4),
+ ),
+ ]
+ : [
+ BoxShadow(
+ color: primaryColor.withOpacity(0.06),
+ blurRadius: 8,
+ offset: const Offset(0, 2),
+ ),
+ ],
+ ),
+ child: TextField(
+ controller: descriptionController,
+ focusNode: _nameFocus,
+ style: GoogleFonts.inter(
+ fontSize: 16,
+ fontWeight: FontWeight.w500,
+ color: primaryColor,
+ ),
+ decoration: InputDecoration(
+ hintText: 'Enter expense name',
+ hintStyle: GoogleFonts.inter(
+ color: textSecondary,
+ fontWeight: FontWeight.w400,
+ ),
+ border: InputBorder.none,
+ contentPadding: const EdgeInsets.all(20),
+ ),
+ ),
+ ),
+
+ const SizedBox(height: 40),
+
+ // Amount Display
+ Center(
+ child: Container(
+ padding: const EdgeInsets.symmetric(
+ horizontal: 24,
+ vertical: 16,
+ ),
+ decoration: BoxDecoration(
+ color: cardColor,
+ borderRadius: BorderRadius.circular(20),
+ boxShadow: [
+ BoxShadow(
+ color: primaryColor.withOpacity(0.08),
+ blurRadius: 16,
+ offset: const Offset(0, 4),
+ ),
+ ],
+ ),
+ child: Text(
+ _displayAmount.isEmpty
+ ? '₹0.00'
+ : _displayAmount,
+ style: GoogleFonts.inter(
+ fontSize: 36,
+ fontWeight: FontWeight.w700,
+ color: primaryColor,
+ ),
+ ),
+ ),
+ ),
+
+ const SizedBox(height: 20),
+
+ // Custom Keypad
+ Expanded(
+ child: LayoutBuilder(
+ builder: (context, constraints) {
+ double availableHeight = constraints.maxHeight;
+ double buttonHeight =
+ (availableHeight - 32) /
+ 4; // 4 rows with spacing
+ buttonHeight = buttonHeight.clamp(
+ 50.0,
+ 70.0,
+ ); // Min 50, Max 70
+
+ return GridView.builder(
+ physics: const NeverScrollableScrollPhysics(),
+ gridDelegate:
+ SliverGridDelegateWithFixedCrossAxisCount(
+ crossAxisCount: 3,
+ childAspectRatio:
+ constraints.maxWidth /
+ (buttonHeight * 3 + 32),
+ crossAxisSpacing: 10,
+ mainAxisSpacing: 10,
+ ),
+ itemCount: 12,
+ itemBuilder: (context, index) {
+ List keys = [
+ '1',
+ '2',
+ '3',
+ '4',
+ '5',
+ '6',
+ '7',
+ '8',
+ '9',
+ '.',
+ '0',
+ '⌫',
+ ];
+ return _buildKeypadButton(
+ keys[index],
+ isSpecial:
+ keys[index] == '.' ||
+ keys[index] == '⌫',
+ buttonHeight: buttonHeight,
+ );
+ },
+ );
+ },
+ ),
+ ),
+
+ const SizedBox(height: 24),
+
+ // Add Expense Button
+ GestureDetector(
+ onTap: addTransaction,
+ child: Container(
+ width: double.infinity,
+ height: 60,
+ decoration: BoxDecoration(
+ color: accentColor,
+ borderRadius: BorderRadius.circular(16),
+ boxShadow: [
+ BoxShadow(
+ color: accentColor.withOpacity(0.3),
+ blurRadius: 20,
+ offset: const Offset(0, 8),
+ ),
+ ],
+ ),
+ child: Center(
+ child: Text(
+ 'Add Expense',
+ style: GoogleFonts.inter(
+ color: Colors.white,
+ fontSize: 18,
+ fontWeight: FontWeight.w600,
+ ),
+ ),
+ ),
+ ),
+ ),
+ ],
+ ),
+ ),
+ ),
+ ),
+ ],
+ ),
+ ),
+ ),
+ ),
+ );
+ }
+}
diff --git a/lib/support/fetch_service.dart b/lib/support/fetch_service.dart
new file mode 100644
index 0000000..2ecb534
--- /dev/null
+++ b/lib/support/fetch_service.dart
@@ -0,0 +1,19 @@
+// ignore_for_file: avoid_print
+
+import 'package:http/http.dart' as http;
+import 'dart:convert';
+import '../other_pages/enviroment.dart';
+Future>> fetchRecentTransactions() async {
+ final response = await http.get(
+
+ Uri.parse('${Environment.baseUrl}/api/transactions/recent'),
+ );
+
+ if (response.statusCode == 200) {
+ final List data = jsonDecode(response.body)['data'];
+ return List