diff --git a/.gitignore b/.gitignore
index 3820a95..6f0d006 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,45 +1,45 @@
-# Miscellaneous
-*.class
-*.log
-*.pyc
-*.swp
-.DS_Store
-.atom/
-.build/
-.buildlog/
-.history
-.svn/
-.swiftpm/
-migrate_working_dir/
-
-# IntelliJ related
-*.iml
-*.ipr
-*.iws
-.idea/
-
-# The .vscode folder contains launch configuration and tasks you configure in
-# VS Code which you may wish to be included in version control, so this line
-# is commented out by default.
-#.vscode/
-
-# Flutter/Dart/Pub related
-**/doc/api/
-**/ios/Flutter/.last_build_id
-.dart_tool/
-.flutter-plugins-dependencies
-.pub-cache/
-.pub/
-/build/
-/coverage/
-
-# Symbolication related
-app.*.symbols
-
-# Obfuscation related
-app.*.map.json
-
-# Android Studio will place build artifacts here
-/android/app/debug
-/android/app/profile
-/android/app/release
+# Miscellaneous
+*.class
+*.log
+*.pyc
+*.swp
+.DS_Store
+.atom/
+.build/
+.buildlog/
+.history
+.svn/
+.swiftpm/
+migrate_working_dir/
+
+# IntelliJ related
+*.iml
+*.ipr
+*.iws
+.idea/
+
+# The .vscode folder contains launch configuration and tasks you configure in
+# VS Code which you may wish to be included in version control, so this line
+# is commented out by default.
+#.vscode/
+
+# Flutter/Dart/Pub related
+**/doc/api/
+**/ios/Flutter/.last_build_id
+.dart_tool/
+.flutter-plugins-dependencies
+.pub-cache/
+.pub/
+/build/
+/coverage/
+
+# Symbolication related
+app.*.symbols
+
+# Obfuscation related
+app.*.map.json
+
+# Android Studio will place build artifacts here
+/android/app/debug
+/android/app/profile
+/android/app/release
diff --git a/.metadata b/.metadata
index e8cf1e4..47ab4a0 100644
--- a/.metadata
+++ b/.metadata
@@ -1,33 +1,33 @@
-# This file tracks properties of this Flutter project.
-# Used by Flutter tool to assess capabilities and perform upgrades etc.
-#
-# This file should be version controlled and should not be manually edited.
-
-version:
- revision: "3b62efc2a3da49882f43c372e0bc53daef7295a6"
- channel: "stable"
-
-project_type: app
-
-# Tracks metadata for the flutter migrate command
-migration:
- platforms:
- - platform: root
- create_revision: 3b62efc2a3da49882f43c372e0bc53daef7295a6
- base_revision: 3b62efc2a3da49882f43c372e0bc53daef7295a6
- - platform: android
- create_revision: 3b62efc2a3da49882f43c372e0bc53daef7295a6
- base_revision: 3b62efc2a3da49882f43c372e0bc53daef7295a6
- - platform: ios
- create_revision: 3b62efc2a3da49882f43c372e0bc53daef7295a6
- base_revision: 3b62efc2a3da49882f43c372e0bc53daef7295a6
-
- # 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'
+# 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: "3b62efc2a3da49882f43c372e0bc53daef7295a6"
+ channel: "stable"
+
+project_type: app
+
+# Tracks metadata for the flutter migrate command
+migration:
+ platforms:
+ - platform: root
+ create_revision: 3b62efc2a3da49882f43c372e0bc53daef7295a6
+ base_revision: 3b62efc2a3da49882f43c372e0bc53daef7295a6
+ - platform: android
+ create_revision: 3b62efc2a3da49882f43c372e0bc53daef7295a6
+ base_revision: 3b62efc2a3da49882f43c372e0bc53daef7295a6
+ - platform: ios
+ create_revision: 3b62efc2a3da49882f43c372e0bc53daef7295a6
+ base_revision: 3b62efc2a3da49882f43c372e0bc53daef7295a6
+
+ # 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/README.md b/README.md
index 47bc83b..00846e6 100644
--- a/README.md
+++ b/README.md
@@ -1,16 +1,16 @@
-# e_receipt_mobile
-
-E-Receipt portal moble version
-
-## Getting Started
-
-This project is a starting point for a Flutter application.
-
-A few resources to get you started if this is your first Flutter project:
-
-- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
-- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
-
-For help getting started with Flutter development, view the
-[online documentation](https://docs.flutter.dev/), which offers tutorials,
-samples, guidance on mobile development, and a full API reference.
+# e_receipt_mobile
+
+E-Receipt portal moble version
+
+## Getting Started
+
+This project is a starting point for a Flutter application.
+
+A few resources to get you started if this is your first Flutter project:
+
+- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
+- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
+
+For help getting started with Flutter development, view the
+[online documentation](https://docs.flutter.dev/), which offers tutorials,
+samples, guidance on mobile development, and a full API reference.
diff --git a/analysis_options.yaml b/analysis_options.yaml
index 0d29021..d4e0f0c 100644
--- a/analysis_options.yaml
+++ b/analysis_options.yaml
@@ -1,28 +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
+# 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
index be3943c..c908258 100644
--- a/android/.gitignore
+++ b/android/.gitignore
@@ -1,14 +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
+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
index b4cffbf..4c23f4b 100644
--- a/android/app/build.gradle.kts
+++ b/android/app/build.gradle.kts
@@ -1,44 +1,54 @@
-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.e_receipt_mobile"
- compileSdk = flutter.compileSdkVersion
- ndkVersion = flutter.ndkVersion
-
- compileOptions {
- sourceCompatibility = JavaVersion.VERSION_17
- targetCompatibility = JavaVersion.VERSION_17
- }
-
- kotlinOptions {
- jvmTarget = JavaVersion.VERSION_17.toString()
- }
-
- defaultConfig {
- // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
- applicationId = "com.example.e_receipt_mobile"
- // 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 = "../.."
-}
+import java.util.Properties
+import java.io.FileInputStream
+
+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")
+}
+
+val keystoreProperties = Properties()
+val keystorePropertiesFile = rootProject.file("key.properties")
+if (keystorePropertiesFile.exists()) {
+ keystoreProperties.load(FileInputStream(keystorePropertiesFile))
+}
+
+
+android {
+ namespace = "com.example.e_receipt_mobile"
+ compileSdk = flutter.compileSdkVersion
+ ndkVersion = flutter.ndkVersion
+
+ compileOptions {
+ sourceCompatibility = JavaVersion.VERSION_17
+ targetCompatibility = JavaVersion.VERSION_17
+ }
+
+ kotlinOptions {
+ jvmTarget = JavaVersion.VERSION_17.toString()
+ }
+
+ defaultConfig {
+ // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
+ applicationId = "com.example.e_receipt_mobile"
+ // 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
index 399f698..8ffe024 100644
--- a/android/app/src/debug/AndroidManifest.xml
+++ b/android/app/src/debug/AndroidManifest.xml
@@ -1,7 +1,7 @@
-
-
-
-
+
+
+
+
diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml
index bbcdf52..113b9b3 100644
--- a/android/app/src/main/AndroidManifest.xml
+++ b/android/app/src/main/AndroidManifest.xml
@@ -1,45 +1,48 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/android/app/src/main/kotlin/com/example/e_receipt_mobile/MainActivity.kt b/android/app/src/main/kotlin/com/example/e_receipt_mobile/MainActivity.kt
index 62b3f5d..3e90457 100644
--- a/android/app/src/main/kotlin/com/example/e_receipt_mobile/MainActivity.kt
+++ b/android/app/src/main/kotlin/com/example/e_receipt_mobile/MainActivity.kt
@@ -1,5 +1,5 @@
-package com.example.e_receipt_mobile
-
-import io.flutter.embedding.android.FlutterActivity
-
-class MainActivity : FlutterActivity()
+package com.example.e_receipt_mobile
+
+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
index f74085f..1cb7aa2 100644
--- a/android/app/src/main/res/drawable-v21/launch_background.xml
+++ b/android/app/src/main/res/drawable-v21/launch_background.xml
@@ -1,12 +1,12 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
diff --git a/android/app/src/main/res/drawable/launch_background.xml b/android/app/src/main/res/drawable/launch_background.xml
index 304732f..8403758 100644
--- a/android/app/src/main/res/drawable/launch_background.xml
+++ b/android/app/src/main/res/drawable/launch_background.xml
@@ -1,12 +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
index db77bb4..f076017 100644
Binary files a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ
diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
index 17987b7..41c41b8 100644
Binary files a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ
diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
index 09d4391..ce12930 100644
Binary files a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ
diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
index d5f1c8d..571adf4 100644
Binary files a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ
diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
index 4d6372e..41137dd 100644
Binary files a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ
diff --git a/android/app/src/main/res/values-night/styles.xml b/android/app/src/main/res/values-night/styles.xml
index 06952be..360a160 100644
--- a/android/app/src/main/res/values-night/styles.xml
+++ b/android/app/src/main/res/values-night/styles.xml
@@ -1,18 +1,18 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+
diff --git a/android/app/src/main/res/values/styles.xml b/android/app/src/main/res/values/styles.xml
index cb1ef88..5fac679 100644
--- a/android/app/src/main/res/values/styles.xml
+++ b/android/app/src/main/res/values/styles.xml
@@ -1,18 +1,18 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+
diff --git a/android/app/src/profile/AndroidManifest.xml b/android/app/src/profile/AndroidManifest.xml
index 399f698..8ffe024 100644
--- a/android/app/src/profile/AndroidManifest.xml
+++ b/android/app/src/profile/AndroidManifest.xml
@@ -1,7 +1,7 @@
-
-
-
-
+
+
+
+
diff --git a/android/build.gradle.kts b/android/build.gradle.kts
index dbee657..1f88145 100644
--- a/android/build.gradle.kts
+++ b/android/build.gradle.kts
@@ -1,24 +1,24 @@
-allprojects {
- repositories {
- google()
- mavenCentral()
- }
-}
-
-val newBuildDir: Directory =
- rootProject.layout.buildDirectory
- .dir("../../build")
- .get()
-rootProject.layout.buildDirectory.value(newBuildDir)
-
-subprojects {
- val newSubprojectBuildDir: Directory = newBuildDir.dir(project.name)
- project.layout.buildDirectory.value(newSubprojectBuildDir)
-}
-subprojects {
- project.evaluationDependsOn(":app")
-}
-
-tasks.register("clean") {
- delete(rootProject.layout.buildDirectory)
-}
+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
index fbee1d8..21dbfa5 100644
--- a/android/gradle.properties
+++ b/android/gradle.properties
@@ -1,2 +1,2 @@
-org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError
-android.useAndroidX=true
+org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError
+android.useAndroidX=true
diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties
index e4ef43f..db3f453 100644
--- a/android/gradle/wrapper/gradle-wrapper.properties
+++ b/android/gradle/wrapper/gradle-wrapper.properties
@@ -1,5 +1,5 @@
-distributionBase=GRADLE_USER_HOME
-distributionPath=wrapper/dists
-zipStoreBase=GRADLE_USER_HOME
-zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-all.zip
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-all.zip
diff --git a/android/settings.gradle.kts b/android/settings.gradle.kts
index ca7fe06..4dcef4b 100644
--- a/android/settings.gradle.kts
+++ b/android/settings.gradle.kts
@@ -1,26 +1,26 @@
-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.11.1" apply false
- id("org.jetbrains.kotlin.android") version "2.2.20" apply false
-}
-
-include(":app")
+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.11.1" apply false
+ id("org.jetbrains.kotlin.android") version "2.2.20" apply false
+}
+
+include(":app")
diff --git a/ios/.gitignore b/ios/.gitignore
index 7a7f987..ad322bc 100644
--- a/ios/.gitignore
+++ b/ios/.gitignore
@@ -1,34 +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
+**/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
index 1dc6cf7..b5586f2 100644
--- a/ios/Flutter/AppFrameworkInfo.plist
+++ b/ios/Flutter/AppFrameworkInfo.plist
@@ -1,26 +1,26 @@
-
-
-
-
- CFBundleDevelopmentRegion
- en
- CFBundleExecutable
- App
- CFBundleIdentifier
- io.flutter.flutter.app
- CFBundleInfoDictionaryVersion
- 6.0
- CFBundleName
- App
- CFBundlePackageType
- FMWK
- CFBundleShortVersionString
- 1.0
- CFBundleSignature
- ????
- CFBundleVersion
- 1.0
- MinimumOSVersion
- 13.0
-
-
+
+
+
+
+ CFBundleDevelopmentRegion
+ en
+ CFBundleExecutable
+ App
+ CFBundleIdentifier
+ io.flutter.flutter.app
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ App
+ CFBundlePackageType
+ FMWK
+ CFBundleShortVersionString
+ 1.0
+ CFBundleSignature
+ ????
+ CFBundleVersion
+ 1.0
+ MinimumOSVersion
+ 13.0
+
+
diff --git a/ios/Flutter/Debug.xcconfig b/ios/Flutter/Debug.xcconfig
index 592ceee..dfd2626 100644
--- a/ios/Flutter/Debug.xcconfig
+++ b/ios/Flutter/Debug.xcconfig
@@ -1 +1,2 @@
-#include "Generated.xcconfig"
+#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
+#include "Generated.xcconfig"
diff --git a/ios/Flutter/Release.xcconfig b/ios/Flutter/Release.xcconfig
index 592ceee..a97381a 100644
--- a/ios/Flutter/Release.xcconfig
+++ b/ios/Flutter/Release.xcconfig
@@ -1 +1,2 @@
-#include "Generated.xcconfig"
+#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
+#include "Generated.xcconfig"
diff --git a/ios/Podfile b/ios/Podfile
new file mode 100644
index 0000000..620e46e
--- /dev/null
+++ b/ios/Podfile
@@ -0,0 +1,43 @@
+# Uncomment this line to define a global platform for your project
+# platform :ios, '13.0'
+
+# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
+ENV['COCOAPODS_DISABLE_STATS'] = 'true'
+
+project 'Runner', {
+ 'Debug' => :debug,
+ 'Profile' => :release,
+ 'Release' => :release,
+}
+
+def flutter_root
+ generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
+ unless File.exist?(generated_xcode_build_settings_path)
+ raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
+ end
+
+ File.foreach(generated_xcode_build_settings_path) do |line|
+ matches = line.match(/FLUTTER_ROOT\=(.*)/)
+ return matches[1].strip if matches
+ end
+ raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
+end
+
+require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
+
+flutter_ios_podfile_setup
+
+target 'Runner' do
+ use_frameworks!
+
+ flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
+ target 'RunnerTests' do
+ inherit! :search_paths
+ end
+end
+
+post_install do |installer|
+ installer.pods_project.targets.each do |target|
+ flutter_additional_ios_build_settings(target)
+ end
+end
diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj
index 7cf71b5..35429cc 100644
--- a/ios/Runner.xcodeproj/project.pbxproj
+++ b/ios/Runner.xcodeproj/project.pbxproj
@@ -1,616 +1,616 @@
-// !$*UTF8*$!
-{
- archiveVersion = 1;
- classes = {
- };
- objectVersion = 54;
- objects = {
-
-/* Begin PBXBuildFile section */
- 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
- 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; };
- 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
- 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
- 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
- 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
- 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
-/* End PBXBuildFile section */
-
-/* Begin PBXContainerItemProxy section */
- 331C8085294A63A400263BE5 /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = 97C146E61CF9000F007C117D /* Project object */;
- proxyType = 1;
- remoteGlobalIDString = 97C146ED1CF9000F007C117D;
- remoteInfo = Runner;
- };
-/* End PBXContainerItemProxy section */
-
-/* Begin PBXCopyFilesBuildPhase section */
- 9705A1C41CF9048500538489 /* Embed Frameworks */ = {
- isa = PBXCopyFilesBuildPhase;
- buildActionMask = 2147483647;
- dstPath = "";
- dstSubfolderSpec = 10;
- files = (
- );
- name = "Embed Frameworks";
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXCopyFilesBuildPhase section */
-
-/* Begin PBXFileReference section */
- 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; };
- 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; };
- 331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; };
- 331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
- 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
- 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; };
- 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
- 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
- 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; };
- 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; };
- 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
- 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
- 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
- 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
- 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
-/* End PBXFileReference section */
-
-/* Begin PBXFrameworksBuildPhase section */
- 97C146EB1CF9000F007C117D /* Frameworks */ = {
- isa = PBXFrameworksBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXFrameworksBuildPhase section */
-
-/* Begin PBXGroup section */
- 331C8082294A63A400263BE5 /* RunnerTests */ = {
- isa = PBXGroup;
- children = (
- 331C807B294A618700263BE5 /* RunnerTests.swift */,
- );
- path = RunnerTests;
- sourceTree = "";
- };
- 9740EEB11CF90186004384FC /* Flutter */ = {
- isa = PBXGroup;
- children = (
- 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
- 9740EEB21CF90195004384FC /* Debug.xcconfig */,
- 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
- 9740EEB31CF90195004384FC /* Generated.xcconfig */,
- );
- name = Flutter;
- sourceTree = "";
- };
- 97C146E51CF9000F007C117D = {
- isa = PBXGroup;
- children = (
- 9740EEB11CF90186004384FC /* Flutter */,
- 97C146F01CF9000F007C117D /* Runner */,
- 97C146EF1CF9000F007C117D /* Products */,
- 331C8082294A63A400263BE5 /* RunnerTests */,
- );
- sourceTree = "";
- };
- 97C146EF1CF9000F007C117D /* Products */ = {
- isa = PBXGroup;
- children = (
- 97C146EE1CF9000F007C117D /* Runner.app */,
- 331C8081294A63A400263BE5 /* RunnerTests.xctest */,
- );
- name = Products;
- sourceTree = "";
- };
- 97C146F01CF9000F007C117D /* Runner */ = {
- isa = PBXGroup;
- children = (
- 97C146FA1CF9000F007C117D /* Main.storyboard */,
- 97C146FD1CF9000F007C117D /* Assets.xcassets */,
- 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
- 97C147021CF9000F007C117D /* Info.plist */,
- 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
- 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
- 74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
- 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
- );
- path = Runner;
- sourceTree = "";
- };
-/* End PBXGroup section */
-
-/* Begin PBXNativeTarget section */
- 331C8080294A63A400263BE5 /* RunnerTests */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */;
- buildPhases = (
- 331C807D294A63A400263BE5 /* Sources */,
- 331C807F294A63A400263BE5 /* Resources */,
- );
- buildRules = (
- );
- dependencies = (
- 331C8086294A63A400263BE5 /* PBXTargetDependency */,
- );
- name = RunnerTests;
- productName = RunnerTests;
- productReference = 331C8081294A63A400263BE5 /* RunnerTests.xctest */;
- productType = "com.apple.product-type.bundle.unit-test";
- };
- 97C146ED1CF9000F007C117D /* Runner */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
- buildPhases = (
- 9740EEB61CF901F6004384FC /* Run Script */,
- 97C146EA1CF9000F007C117D /* Sources */,
- 97C146EB1CF9000F007C117D /* Frameworks */,
- 97C146EC1CF9000F007C117D /* Resources */,
- 9705A1C41CF9048500538489 /* Embed Frameworks */,
- 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
- );
- buildRules = (
- );
- dependencies = (
- );
- name = Runner;
- productName = Runner;
- productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
- productType = "com.apple.product-type.application";
- };
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
- 97C146E61CF9000F007C117D /* Project object */ = {
- isa = PBXProject;
- attributes = {
- BuildIndependentTargetsInParallel = YES;
- LastUpgradeCheck = 1510;
- ORGANIZATIONNAME = "";
- TargetAttributes = {
- 331C8080294A63A400263BE5 = {
- CreatedOnToolsVersion = 14.0;
- TestTargetID = 97C146ED1CF9000F007C117D;
- };
- 97C146ED1CF9000F007C117D = {
- CreatedOnToolsVersion = 7.3.1;
- LastSwiftMigration = 1100;
- };
- };
- };
- buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
- compatibilityVersion = "Xcode 9.3";
- developmentRegion = en;
- hasScannedForEncodings = 0;
- knownRegions = (
- en,
- Base,
- );
- mainGroup = 97C146E51CF9000F007C117D;
- productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
- projectDirPath = "";
- projectRoot = "";
- targets = (
- 97C146ED1CF9000F007C117D /* Runner */,
- 331C8080294A63A400263BE5 /* RunnerTests */,
- );
- };
-/* End PBXProject section */
-
-/* Begin PBXResourcesBuildPhase section */
- 331C807F294A63A400263BE5 /* Resources */ = {
- isa = PBXResourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- 97C146EC1CF9000F007C117D /* Resources */ = {
- isa = PBXResourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
- 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
- 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
- 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXResourcesBuildPhase section */
-
-/* Begin PBXShellScriptBuildPhase section */
- 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
- isa = PBXShellScriptBuildPhase;
- alwaysOutOfDate = 1;
- buildActionMask = 2147483647;
- files = (
- );
- inputPaths = (
- "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
- );
- name = "Thin Binary";
- outputPaths = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/sh;
- shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
- };
- 9740EEB61CF901F6004384FC /* Run Script */ = {
- isa = PBXShellScriptBuildPhase;
- alwaysOutOfDate = 1;
- buildActionMask = 2147483647;
- files = (
- );
- inputPaths = (
- );
- name = "Run Script";
- outputPaths = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/sh;
- shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
- };
-/* End PBXShellScriptBuildPhase section */
-
-/* Begin PBXSourcesBuildPhase section */
- 331C807D294A63A400263BE5 /* Sources */ = {
- isa = PBXSourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- 97C146EA1CF9000F007C117D /* Sources */ = {
- isa = PBXSourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
- 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXSourcesBuildPhase section */
-
-/* Begin PBXTargetDependency section */
- 331C8086294A63A400263BE5 /* PBXTargetDependency */ = {
- isa = PBXTargetDependency;
- target = 97C146ED1CF9000F007C117D /* Runner */;
- targetProxy = 331C8085294A63A400263BE5 /* PBXContainerItemProxy */;
- };
-/* End PBXTargetDependency section */
-
-/* Begin PBXVariantGroup section */
- 97C146FA1CF9000F007C117D /* Main.storyboard */ = {
- isa = PBXVariantGroup;
- children = (
- 97C146FB1CF9000F007C117D /* Base */,
- );
- name = Main.storyboard;
- sourceTree = "";
- };
- 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
- isa = PBXVariantGroup;
- children = (
- 97C147001CF9000F007C117D /* Base */,
- );
- name = LaunchScreen.storyboard;
- sourceTree = "";
- };
-/* End PBXVariantGroup section */
-
-/* Begin XCBuildConfiguration section */
- 249021D3217E4FDB00AE95B9 /* Profile */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
- ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
- CLANG_ANALYZER_NONNULL = YES;
- CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
- CLANG_CXX_LIBRARY = "libc++";
- CLANG_ENABLE_MODULES = YES;
- CLANG_ENABLE_OBJC_ARC = YES;
- CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
- CLANG_WARN_BOOL_CONVERSION = YES;
- CLANG_WARN_COMMA = YES;
- CLANG_WARN_CONSTANT_CONVERSION = YES;
- CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
- CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
- CLANG_WARN_EMPTY_BODY = YES;
- CLANG_WARN_ENUM_CONVERSION = YES;
- CLANG_WARN_INFINITE_RECURSION = YES;
- CLANG_WARN_INT_CONVERSION = YES;
- CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
- CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
- CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
- CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
- CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
- CLANG_WARN_STRICT_PROTOTYPES = YES;
- CLANG_WARN_SUSPICIOUS_MOVE = YES;
- CLANG_WARN_UNREACHABLE_CODE = YES;
- CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
- "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
- COPY_PHASE_STRIP = NO;
- DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
- ENABLE_NS_ASSERTIONS = NO;
- ENABLE_STRICT_OBJC_MSGSEND = YES;
- ENABLE_USER_SCRIPT_SANDBOXING = NO;
- GCC_C_LANGUAGE_STANDARD = gnu99;
- GCC_NO_COMMON_BLOCKS = YES;
- GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
- GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
- GCC_WARN_UNDECLARED_SELECTOR = YES;
- GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
- GCC_WARN_UNUSED_FUNCTION = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 13.0;
- MTL_ENABLE_DEBUG_INFO = NO;
- SDKROOT = iphoneos;
- SUPPORTED_PLATFORMS = iphoneos;
- TARGETED_DEVICE_FAMILY = "1,2";
- VALIDATE_PRODUCT = YES;
- };
- name = Profile;
- };
- 249021D4217E4FDB00AE95B9 /* Profile */ = {
- isa = XCBuildConfiguration;
- baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
- buildSettings = {
- ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
- CLANG_ENABLE_MODULES = YES;
- CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
- ENABLE_BITCODE = NO;
- INFOPLIST_FILE = Runner/Info.plist;
- LD_RUNPATH_SEARCH_PATHS = (
- "$(inherited)",
- "@executable_path/Frameworks",
- );
- PRODUCT_BUNDLE_IDENTIFIER = com.example.eReceiptMobile;
- 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.eReceiptMobile.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.eReceiptMobile.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.eReceiptMobile.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 = 13.0;
- MTL_ENABLE_DEBUG_INFO = YES;
- ONLY_ACTIVE_ARCH = YES;
- SDKROOT = iphoneos;
- TARGETED_DEVICE_FAMILY = "1,2";
- };
- name = Debug;
- };
- 97C147041CF9000F007C117D /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
- ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
- CLANG_ANALYZER_NONNULL = YES;
- CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
- CLANG_CXX_LIBRARY = "libc++";
- CLANG_ENABLE_MODULES = YES;
- CLANG_ENABLE_OBJC_ARC = YES;
- CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
- CLANG_WARN_BOOL_CONVERSION = YES;
- CLANG_WARN_COMMA = YES;
- CLANG_WARN_CONSTANT_CONVERSION = YES;
- CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
- CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
- CLANG_WARN_EMPTY_BODY = YES;
- CLANG_WARN_ENUM_CONVERSION = YES;
- CLANG_WARN_INFINITE_RECURSION = YES;
- CLANG_WARN_INT_CONVERSION = YES;
- CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
- CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
- CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
- CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
- CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
- CLANG_WARN_STRICT_PROTOTYPES = YES;
- CLANG_WARN_SUSPICIOUS_MOVE = YES;
- CLANG_WARN_UNREACHABLE_CODE = YES;
- CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
- "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
- COPY_PHASE_STRIP = NO;
- DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
- ENABLE_NS_ASSERTIONS = NO;
- ENABLE_STRICT_OBJC_MSGSEND = YES;
- ENABLE_USER_SCRIPT_SANDBOXING = NO;
- GCC_C_LANGUAGE_STANDARD = gnu99;
- GCC_NO_COMMON_BLOCKS = YES;
- GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
- GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
- GCC_WARN_UNDECLARED_SELECTOR = YES;
- GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
- GCC_WARN_UNUSED_FUNCTION = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 13.0;
- MTL_ENABLE_DEBUG_INFO = NO;
- SDKROOT = iphoneos;
- SUPPORTED_PLATFORMS = iphoneos;
- 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.eReceiptMobile;
- 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.eReceiptMobile;
- 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 */;
-}
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 54;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
+ 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; };
+ 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
+ 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
+ 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
+ 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
+ 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXContainerItemProxy section */
+ 331C8085294A63A400263BE5 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 97C146E61CF9000F007C117D /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 97C146ED1CF9000F007C117D;
+ remoteInfo = Runner;
+ };
+/* End PBXContainerItemProxy section */
+
+/* Begin PBXCopyFilesBuildPhase section */
+ 9705A1C41CF9048500538489 /* Embed Frameworks */ = {
+ isa = PBXCopyFilesBuildPhase;
+ buildActionMask = 2147483647;
+ dstPath = "";
+ dstSubfolderSpec = 10;
+ files = (
+ );
+ name = "Embed Frameworks";
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXCopyFilesBuildPhase section */
+
+/* Begin PBXFileReference section */
+ 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; };
+ 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; };
+ 331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; };
+ 331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
+ 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
+ 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; };
+ 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
+ 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
+ 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; };
+ 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; };
+ 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
+ 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
+ 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
+ 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 97C146EB1CF9000F007C117D /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 331C8082294A63A400263BE5 /* RunnerTests */ = {
+ isa = PBXGroup;
+ children = (
+ 331C807B294A618700263BE5 /* RunnerTests.swift */,
+ );
+ path = RunnerTests;
+ sourceTree = "";
+ };
+ 9740EEB11CF90186004384FC /* Flutter */ = {
+ isa = PBXGroup;
+ children = (
+ 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
+ 9740EEB21CF90195004384FC /* Debug.xcconfig */,
+ 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
+ 9740EEB31CF90195004384FC /* Generated.xcconfig */,
+ );
+ name = Flutter;
+ sourceTree = "";
+ };
+ 97C146E51CF9000F007C117D = {
+ isa = PBXGroup;
+ children = (
+ 9740EEB11CF90186004384FC /* Flutter */,
+ 97C146F01CF9000F007C117D /* Runner */,
+ 97C146EF1CF9000F007C117D /* Products */,
+ 331C8082294A63A400263BE5 /* RunnerTests */,
+ );
+ sourceTree = "";
+ };
+ 97C146EF1CF9000F007C117D /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 97C146EE1CF9000F007C117D /* Runner.app */,
+ 331C8081294A63A400263BE5 /* RunnerTests.xctest */,
+ );
+ name = Products;
+ sourceTree = "";
+ };
+ 97C146F01CF9000F007C117D /* Runner */ = {
+ isa = PBXGroup;
+ children = (
+ 97C146FA1CF9000F007C117D /* Main.storyboard */,
+ 97C146FD1CF9000F007C117D /* Assets.xcassets */,
+ 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
+ 97C147021CF9000F007C117D /* Info.plist */,
+ 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
+ 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
+ 74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
+ 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
+ );
+ path = Runner;
+ sourceTree = "";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ 331C8080294A63A400263BE5 /* RunnerTests */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */;
+ buildPhases = (
+ 331C807D294A63A400263BE5 /* Sources */,
+ 331C807F294A63A400263BE5 /* Resources */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ 331C8086294A63A400263BE5 /* PBXTargetDependency */,
+ );
+ name = RunnerTests;
+ productName = RunnerTests;
+ productReference = 331C8081294A63A400263BE5 /* RunnerTests.xctest */;
+ productType = "com.apple.product-type.bundle.unit-test";
+ };
+ 97C146ED1CF9000F007C117D /* Runner */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
+ buildPhases = (
+ 9740EEB61CF901F6004384FC /* Run Script */,
+ 97C146EA1CF9000F007C117D /* Sources */,
+ 97C146EB1CF9000F007C117D /* Frameworks */,
+ 97C146EC1CF9000F007C117D /* Resources */,
+ 9705A1C41CF9048500538489 /* Embed Frameworks */,
+ 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = Runner;
+ productName = Runner;
+ productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
+ productType = "com.apple.product-type.application";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 97C146E61CF9000F007C117D /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ BuildIndependentTargetsInParallel = YES;
+ LastUpgradeCheck = 1510;
+ ORGANIZATIONNAME = "";
+ TargetAttributes = {
+ 331C8080294A63A400263BE5 = {
+ CreatedOnToolsVersion = 14.0;
+ TestTargetID = 97C146ED1CF9000F007C117D;
+ };
+ 97C146ED1CF9000F007C117D = {
+ CreatedOnToolsVersion = 7.3.1;
+ LastSwiftMigration = 1100;
+ };
+ };
+ };
+ buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
+ compatibilityVersion = "Xcode 9.3";
+ developmentRegion = en;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ Base,
+ );
+ mainGroup = 97C146E51CF9000F007C117D;
+ productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ 97C146ED1CF9000F007C117D /* Runner */,
+ 331C8080294A63A400263BE5 /* RunnerTests */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ 331C807F294A63A400263BE5 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 97C146EC1CF9000F007C117D /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
+ 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
+ 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
+ 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXShellScriptBuildPhase section */
+ 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
+ isa = PBXShellScriptBuildPhase;
+ alwaysOutOfDate = 1;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
+ );
+ name = "Thin Binary";
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
+ };
+ 9740EEB61CF901F6004384FC /* Run Script */ = {
+ isa = PBXShellScriptBuildPhase;
+ alwaysOutOfDate = 1;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ name = "Run Script";
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
+ };
+/* End PBXShellScriptBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 331C807D294A63A400263BE5 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 97C146EA1CF9000F007C117D /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
+ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXTargetDependency section */
+ 331C8086294A63A400263BE5 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 97C146ED1CF9000F007C117D /* Runner */;
+ targetProxy = 331C8085294A63A400263BE5 /* PBXContainerItemProxy */;
+ };
+/* End PBXTargetDependency section */
+
+/* Begin PBXVariantGroup section */
+ 97C146FA1CF9000F007C117D /* Main.storyboard */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 97C146FB1CF9000F007C117D /* Base */,
+ );
+ name = Main.storyboard;
+ sourceTree = "";
+ };
+ 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 97C147001CF9000F007C117D /* Base */,
+ );
+ name = LaunchScreen.storyboard;
+ sourceTree = "";
+ };
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+ 249021D3217E4FDB00AE95B9 /* Profile */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ ENABLE_NS_ASSERTIONS = NO;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ ENABLE_USER_SCRIPT_SANDBOXING = NO;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 13.0;
+ MTL_ENABLE_DEBUG_INFO = NO;
+ SDKROOT = iphoneos;
+ SUPPORTED_PLATFORMS = iphoneos;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ VALIDATE_PRODUCT = YES;
+ };
+ name = Profile;
+ };
+ 249021D4217E4FDB00AE95B9 /* Profile */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ CLANG_ENABLE_MODULES = YES;
+ CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
+ ENABLE_BITCODE = NO;
+ INFOPLIST_FILE = Runner/Info.plist;
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/Frameworks",
+ );
+ PRODUCT_BUNDLE_IDENTIFIER = com.example.eReceiptMobile;
+ 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.eReceiptMobile.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.eReceiptMobile.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.eReceiptMobile.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 = 13.0;
+ MTL_ENABLE_DEBUG_INFO = YES;
+ ONLY_ACTIVE_ARCH = YES;
+ SDKROOT = iphoneos;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ };
+ name = Debug;
+ };
+ 97C147041CF9000F007C117D /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ ENABLE_NS_ASSERTIONS = NO;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ ENABLE_USER_SCRIPT_SANDBOXING = NO;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 13.0;
+ MTL_ENABLE_DEBUG_INFO = NO;
+ SDKROOT = iphoneos;
+ SUPPORTED_PLATFORMS = iphoneos;
+ 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.eReceiptMobile;
+ 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.eReceiptMobile;
+ 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
index 919434a..c4b79bd 100644
--- a/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
+++ b/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
@@ -1,7 +1,7 @@
-
-
-
-
-
+
+
+
+
+
diff --git a/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
index 18d9810..fc6bf80 100644
--- a/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
+++ b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
@@ -1,8 +1,8 @@
-
-
-
-
- IDEDidComputeMac32BitWarning
-
-
-
+
+
+
+
+ IDEDidComputeMac32BitWarning
+
+
+
diff --git a/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
index f9b0d7c..af0309c 100644
--- a/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
+++ b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
@@ -1,8 +1,8 @@
-
-
-
-
- PreviewsEnabled
-
-
-
+
+
+
+
+ PreviewsEnabled
+
+
+
diff --git a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
index e3773d4..bbabc4e 100644
--- a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
+++ b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
@@ -1,101 +1,101 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ios/Runner.xcworkspace/contents.xcworkspacedata b/ios/Runner.xcworkspace/contents.xcworkspacedata
index 1d526a1..59c6d39 100644
--- a/ios/Runner.xcworkspace/contents.xcworkspacedata
+++ b/ios/Runner.xcworkspace/contents.xcworkspacedata
@@ -1,7 +1,7 @@
-
-
-
-
-
+
+
+
+
+
diff --git a/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
index 18d9810..fc6bf80 100644
--- a/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
+++ b/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
@@ -1,8 +1,8 @@
-
-
-
-
- IDEDidComputeMac32BitWarning
-
-
-
+
+
+
+
+ IDEDidComputeMac32BitWarning
+
+
+
diff --git a/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
index f9b0d7c..af0309c 100644
--- a/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
+++ b/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
@@ -1,8 +1,8 @@
-
-
-
-
- PreviewsEnabled
-
-
-
+
+
+
+
+ PreviewsEnabled
+
+
+
diff --git a/ios/Runner/AppDelegate.swift b/ios/Runner/AppDelegate.swift
index 6266644..8be1cec 100644
--- a/ios/Runner/AppDelegate.swift
+++ b/ios/Runner/AppDelegate.swift
@@ -1,13 +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)
- }
-}
+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
index d36b1fa..1950fd8 100644
--- a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
+++ b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
@@ -1,122 +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"
- }
-}
+{
+ "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/LaunchImage.imageset/Contents.json b/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
index 0bedcf2..d08a4de 100644
--- a/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
+++ b/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
@@ -1,23 +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"
- }
-}
+{
+ "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/README.md b/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
index 89c2725..65a94b5 100644
--- a/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
+++ b/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
@@ -1,5 +1,5 @@
-# Launch Screen Assets
-
-You can customize the launch screen with your own desired assets by replacing the image files in this directory.
-
+# 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
index f2e259c..497371e 100644
--- a/ios/Runner/Base.lproj/LaunchScreen.storyboard
+++ b/ios/Runner/Base.lproj/LaunchScreen.storyboard
@@ -1,37 +1,37 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ios/Runner/Base.lproj/Main.storyboard b/ios/Runner/Base.lproj/Main.storyboard
index f3c2851..bbb83ca 100644
--- a/ios/Runner/Base.lproj/Main.storyboard
+++ b/ios/Runner/Base.lproj/Main.storyboard
@@ -1,26 +1,26 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist
index eb83d0e..1c28040 100644
--- a/ios/Runner/Info.plist
+++ b/ios/Runner/Info.plist
@@ -1,49 +1,49 @@
-
-
-
-
- CFBundleDevelopmentRegion
- $(DEVELOPMENT_LANGUAGE)
- CFBundleDisplayName
- E Receipt Mobile
- CFBundleExecutable
- $(EXECUTABLE_NAME)
- CFBundleIdentifier
- $(PRODUCT_BUNDLE_IDENTIFIER)
- CFBundleInfoDictionaryVersion
- 6.0
- CFBundleName
- e_receipt_mobile
- 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
-
-
-
+
+
+
+
+ CFBundleDevelopmentRegion
+ $(DEVELOPMENT_LANGUAGE)
+ CFBundleDisplayName
+ E Receipt Mobile
+ CFBundleExecutable
+ $(EXECUTABLE_NAME)
+ CFBundleIdentifier
+ $(PRODUCT_BUNDLE_IDENTIFIER)
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ e_receipt_mobile
+ 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
index 308a2a5..fae207f 100644
--- a/ios/Runner/Runner-Bridging-Header.h
+++ b/ios/Runner/Runner-Bridging-Header.h
@@ -1 +1 @@
-#import "GeneratedPluginRegistrant.h"
+#import "GeneratedPluginRegistrant.h"
diff --git a/ios/RunnerTests/RunnerTests.swift b/ios/RunnerTests/RunnerTests.swift
index 86a7c3b..4d206de 100644
--- a/ios/RunnerTests/RunnerTests.swift
+++ b/ios/RunnerTests/RunnerTests.swift
@@ -1,12 +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.
- }
-
-}
+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/core/config/app_config.dart b/lib/core/config/app_config.dart
index e4ece6f..e4933d5 100644
--- a/lib/core/config/app_config.dart
+++ b/lib/core/config/app_config.dart
@@ -1,7 +1,7 @@
-class AppConfig {
- const AppConfig._();
-
- // static const String apiBaseUrl = 'https://api-tms-uat.kbzbank.com:8443';
- static const String apiBaseUrl = 'https://receipt-nest.utsmyanmar.com';
- static const String apiSecret = 'y812J21lhha11OS';
-}
+class AppConfig {
+ const AppConfig._();
+
+ // static const String apiBaseUrl = 'https://api-tms-uat.kbzbank.com:8443';
+ static const String apiBaseUrl = 'https://receipt-nest.utsmyanmar.com';
+ static const String apiSecret = 'y812J21lhha11OS';
+}
diff --git a/lib/core/network/api_key_http_client.dart b/lib/core/network/api_key_http_client.dart
index 1ddf7ab..3328c71 100644
--- a/lib/core/network/api_key_http_client.dart
+++ b/lib/core/network/api_key_http_client.dart
@@ -1,24 +1,24 @@
-import 'package:http/http.dart' as http;
-
-class ApiKeyHttpClient extends http.BaseClient {
- ApiKeyHttpClient({required http.Client innerClient, required this.apiSecret})
- : _innerClient = innerClient;
-
- final http.Client _innerClient;
- final String apiSecret;
-
- @override
- Future send(http.BaseRequest request) {
- if (apiSecret.trim().isNotEmpty &&
- !request.headers.keys.any((k) => k.toLowerCase() == 'x-api-key')) {
- request.headers['x-api-key'] = apiSecret.trim();
- }
- return _innerClient.send(request);
- }
-
- @override
- void close() {
- _innerClient.close();
- super.close();
- }
-}
+import 'package:http/http.dart' as http;
+
+class ApiKeyHttpClient extends http.BaseClient {
+ ApiKeyHttpClient({required http.Client innerClient, required this.apiSecret})
+ : _innerClient = innerClient;
+
+ final http.Client _innerClient;
+ final String apiSecret;
+
+ @override
+ Future send(http.BaseRequest request) {
+ if (apiSecret.trim().isNotEmpty &&
+ !request.headers.keys.any((k) => k.toLowerCase() == 'x-api-key')) {
+ request.headers['x-api-key'] = apiSecret.trim();
+ }
+ return _innerClient.send(request);
+ }
+
+ @override
+ void close() {
+ _innerClient.close();
+ super.close();
+ }
+}
diff --git a/lib/core/network/auth_http_client.dart b/lib/core/network/auth_http_client.dart
index d210c44..f0d9c29 100644
--- a/lib/core/network/auth_http_client.dart
+++ b/lib/core/network/auth_http_client.dart
@@ -1,93 +1,93 @@
-import 'dart:async';
-
-import 'package:http/http.dart' as http;
-
-typedef AccessTokenProvider = String? Function();
-typedef RefreshAccessToken = Future Function();
-typedef RequestUriPredicate = bool Function(Uri uri);
-
-class AuthHttpClient extends http.BaseClient {
- AuthHttpClient({
- required http.Client innerClient,
- required AccessTokenProvider accessTokenProvider,
- required RefreshAccessToken refreshAccessToken,
- RequestUriPredicate? shouldAttachToken,
- RequestUriPredicate? shouldRefreshOnUnauthorized,
- }) : _innerClient = innerClient,
- _accessTokenProvider = accessTokenProvider,
- _refreshAccessToken = refreshAccessToken,
- _shouldAttachToken = shouldAttachToken ?? _always,
- _shouldRefreshOnUnauthorized =
- shouldRefreshOnUnauthorized ?? _always;
-
- final http.Client _innerClient;
- final AccessTokenProvider _accessTokenProvider;
- final RefreshAccessToken _refreshAccessToken;
- final RequestUriPredicate _shouldAttachToken;
- final RequestUriPredicate _shouldRefreshOnUnauthorized;
-
- Future? _ongoingRefresh;
-
- static bool _always(Uri _) => true;
-
- @override
- Future send(http.BaseRequest request) async {
- if (_shouldAttachToken(request.url)) {
- final token = _accessTokenProvider();
- if (token != null &&
- token.trim().isNotEmpty &&
- !request.headers.containsKey('Authorization')) {
- request.headers['Authorization'] = 'Bearer ${token.trim()}';
- }
- }
-
- final firstResponse = await _innerClient.send(request);
- if (firstResponse.statusCode != 401 ||
- !_shouldRefreshOnUnauthorized(request.url) ||
- request is! http.Request) {
- return firstResponse;
- }
-
- final refreshedToken = await _refreshTokenWithLock();
- if (refreshedToken == null || refreshedToken.trim().isEmpty) {
- return firstResponse;
- }
-
- await firstResponse.stream.drain();
- final retryRequest = _cloneRequest(request);
- retryRequest.headers['Authorization'] = 'Bearer ${refreshedToken.trim()}';
- return _innerClient.send(retryRequest);
- }
-
- @override
- void close() {
- _innerClient.close();
- super.close();
- }
-
- Future _refreshTokenWithLock() async {
- final inFlight = _ongoingRefresh;
- if (inFlight != null) {
- return inFlight;
- }
-
- final nextRefresh = _refreshAccessToken();
- _ongoingRefresh = nextRefresh;
- try {
- return await nextRefresh;
- } finally {
- _ongoingRefresh = null;
- }
- }
-
- http.Request _cloneRequest(http.Request original) {
- final cloned = http.Request(original.method, original.url)
- ..followRedirects = original.followRedirects
- ..maxRedirects = original.maxRedirects
- ..persistentConnection = original.persistentConnection
- ..encoding = original.encoding
- ..bodyBytes = original.bodyBytes;
- cloned.headers.addAll(original.headers);
- return cloned;
- }
-}
+import 'dart:async';
+
+import 'package:http/http.dart' as http;
+
+typedef AccessTokenProvider = String? Function();
+typedef RefreshAccessToken = Future Function();
+typedef RequestUriPredicate = bool Function(Uri uri);
+
+class AuthHttpClient extends http.BaseClient {
+ AuthHttpClient({
+ required http.Client innerClient,
+ required AccessTokenProvider accessTokenProvider,
+ required RefreshAccessToken refreshAccessToken,
+ RequestUriPredicate? shouldAttachToken,
+ RequestUriPredicate? shouldRefreshOnUnauthorized,
+ }) : _innerClient = innerClient,
+ _accessTokenProvider = accessTokenProvider,
+ _refreshAccessToken = refreshAccessToken,
+ _shouldAttachToken = shouldAttachToken ?? _always,
+ _shouldRefreshOnUnauthorized =
+ shouldRefreshOnUnauthorized ?? _always;
+
+ final http.Client _innerClient;
+ final AccessTokenProvider _accessTokenProvider;
+ final RefreshAccessToken _refreshAccessToken;
+ final RequestUriPredicate _shouldAttachToken;
+ final RequestUriPredicate _shouldRefreshOnUnauthorized;
+
+ Future? _ongoingRefresh;
+
+ static bool _always(Uri _) => true;
+
+ @override
+ Future send(http.BaseRequest request) async {
+ if (_shouldAttachToken(request.url)) {
+ final token = _accessTokenProvider();
+ if (token != null &&
+ token.trim().isNotEmpty &&
+ !request.headers.containsKey('Authorization')) {
+ request.headers['Authorization'] = 'Bearer ${token.trim()}';
+ }
+ }
+
+ final firstResponse = await _innerClient.send(request);
+ if (firstResponse.statusCode != 401 ||
+ !_shouldRefreshOnUnauthorized(request.url) ||
+ request is! http.Request) {
+ return firstResponse;
+ }
+
+ final refreshedToken = await _refreshTokenWithLock();
+ if (refreshedToken == null || refreshedToken.trim().isEmpty) {
+ return firstResponse;
+ }
+
+ await firstResponse.stream.drain();
+ final retryRequest = _cloneRequest(request);
+ retryRequest.headers['Authorization'] = 'Bearer ${refreshedToken.trim()}';
+ return _innerClient.send(retryRequest);
+ }
+
+ @override
+ void close() {
+ _innerClient.close();
+ super.close();
+ }
+
+ Future _refreshTokenWithLock() async {
+ final inFlight = _ongoingRefresh;
+ if (inFlight != null) {
+ return inFlight;
+ }
+
+ final nextRefresh = _refreshAccessToken();
+ _ongoingRefresh = nextRefresh;
+ try {
+ return await nextRefresh;
+ } finally {
+ _ongoingRefresh = null;
+ }
+ }
+
+ http.Request _cloneRequest(http.Request original) {
+ final cloned = http.Request(original.method, original.url)
+ ..followRedirects = original.followRedirects
+ ..maxRedirects = original.maxRedirects
+ ..persistentConnection = original.persistentConnection
+ ..encoding = original.encoding
+ ..bodyBytes = original.bodyBytes;
+ cloned.headers.addAll(original.headers);
+ return cloned;
+ }
+}
diff --git a/lib/core/network/logging_http_client.dart b/lib/core/network/logging_http_client.dart
index c5ea7f5..17d79c9 100644
--- a/lib/core/network/logging_http_client.dart
+++ b/lib/core/network/logging_http_client.dart
@@ -1,118 +1,118 @@
-import 'dart:convert';
-
-import 'package:flutter/foundation.dart';
-import 'package:http/http.dart' as http;
-
-class LoggingHttpClient extends http.BaseClient {
- LoggingHttpClient([http.Client? innerClient])
- : _innerClient = innerClient ?? http.Client();
-
- final http.Client _innerClient;
-
- @override
- Future send(http.BaseRequest request) async {
- final requestBody = request is http.Request ? request.body : null;
- _logRequest(request, requestBody);
-
- try {
- final response = await _innerClient.send(request);
- final responseBytes = await response.stream.toBytes();
- final responseBody = _formatBodyForLogging(
- responseBytes: responseBytes,
- contentType: response.headers['content-type'],
- );
-
- _logResponse(response, responseBody);
-
- return http.StreamedResponse(
- Stream>.fromIterable([responseBytes]),
- response.statusCode,
- contentLength: response.contentLength,
- request: response.request,
- headers: response.headers,
- isRedirect: response.isRedirect,
- persistentConnection: response.persistentConnection,
- reasonPhrase: response.reasonPhrase,
- );
- } catch (error, stackTrace) {
- debugPrint('[API][ERROR] ${request.method} ${request.url}');
- debugPrint('[API][ERROR] $error');
- debugPrint('[API][ERROR] $stackTrace');
- rethrow;
- }
- }
-
- @override
- void close() {
- _innerClient.close();
- super.close();
- }
-
- void _logRequest(http.BaseRequest request, String? requestBody) {
- final safeHeaders = _sanitizeHeaders(request.headers);
- debugPrint('[API][REQUEST] ${request.method} ${request.url}');
- debugPrint('[API][REQUEST][HEADERS] $safeHeaders');
- if (requestBody != null && requestBody.isNotEmpty) {
- debugPrint('[API][REQUEST][BODY] $requestBody');
- }
- }
-
- void _logResponse(http.StreamedResponse response, String responseBody) {
- final safeHeaders = _sanitizeHeaders(response.headers);
- debugPrint(
- '[API][RESPONSE] ${response.statusCode} ${response.request?.method} ${response.request?.url}',
- );
- debugPrint('[API][RESPONSE][HEADERS] $safeHeaders');
- if (responseBody.isNotEmpty) {
- debugPrint('[API][RESPONSE][BODY] $responseBody');
- }
- }
-
- Map _sanitizeHeaders(Map headers) {
- final safeHeaders = Map.from(headers);
- const sensitiveKeys = {
- 'authorization',
- 'x-api-key',
- 'api-key',
- 'x-signature',
- 'cookie',
- 'set-cookie',
- };
-
- for (final key in safeHeaders.keys.toList()) {
- if (sensitiveKeys.contains(key.toLowerCase())) {
- safeHeaders[key] = '***';
- }
- }
-
- return safeHeaders;
- }
-
- String _formatBodyForLogging({
- required List responseBytes,
- required String? contentType,
- }) {
- final normalizedType = contentType?.toLowerCase() ?? '';
- final isBinary =
- normalizedType.contains('application/pdf') ||
- normalizedType.contains('application/octet-stream') ||
- normalizedType.startsWith('image/') ||
- normalizedType.startsWith('audio/') ||
- normalizedType.startsWith('video/');
-
- if (isBinary) {
- return '';
- }
-
- final decoded = utf8.decode(responseBytes, allowMalformed: true).trim();
- if (decoded.isEmpty) {
- return '';
- }
-
- const maxChars = 4000;
- if (decoded.length <= maxChars) {
- return decoded;
- }
- return '${decoded.substring(0, maxChars)}…';
- }
-}
+import 'dart:convert';
+
+import 'package:flutter/foundation.dart';
+import 'package:http/http.dart' as http;
+
+class LoggingHttpClient extends http.BaseClient {
+ LoggingHttpClient([http.Client? innerClient])
+ : _innerClient = innerClient ?? http.Client();
+
+ final http.Client _innerClient;
+
+ @override
+ Future send(http.BaseRequest request) async {
+ final requestBody = request is http.Request ? request.body : null;
+ _logRequest(request, requestBody);
+
+ try {
+ final response = await _innerClient.send(request);
+ final responseBytes = await response.stream.toBytes();
+ final responseBody = _formatBodyForLogging(
+ responseBytes: responseBytes,
+ contentType: response.headers['content-type'],
+ );
+
+ _logResponse(response, responseBody);
+
+ return http.StreamedResponse(
+ Stream>.fromIterable([responseBytes]),
+ response.statusCode,
+ contentLength: response.contentLength,
+ request: response.request,
+ headers: response.headers,
+ isRedirect: response.isRedirect,
+ persistentConnection: response.persistentConnection,
+ reasonPhrase: response.reasonPhrase,
+ );
+ } catch (error, stackTrace) {
+ debugPrint('[API][ERROR] ${request.method} ${request.url}');
+ debugPrint('[API][ERROR] $error');
+ debugPrint('[API][ERROR] $stackTrace');
+ rethrow;
+ }
+ }
+
+ @override
+ void close() {
+ _innerClient.close();
+ super.close();
+ }
+
+ void _logRequest(http.BaseRequest request, String? requestBody) {
+ final safeHeaders = _sanitizeHeaders(request.headers);
+ debugPrint('[API][REQUEST] ${request.method} ${request.url}');
+ debugPrint('[API][REQUEST][HEADERS] $safeHeaders');
+ if (requestBody != null && requestBody.isNotEmpty) {
+ debugPrint('[API][REQUEST][BODY] $requestBody');
+ }
+ }
+
+ void _logResponse(http.StreamedResponse response, String responseBody) {
+ final safeHeaders = _sanitizeHeaders(response.headers);
+ debugPrint(
+ '[API][RESPONSE] ${response.statusCode} ${response.request?.method} ${response.request?.url}',
+ );
+ debugPrint('[API][RESPONSE][HEADERS] $safeHeaders');
+ if (responseBody.isNotEmpty) {
+ debugPrint('[API][RESPONSE][BODY] $responseBody');
+ }
+ }
+
+ Map _sanitizeHeaders(Map headers) {
+ final safeHeaders = Map.from(headers);
+ const sensitiveKeys = {
+ 'authorization',
+ 'x-api-key',
+ 'api-key',
+ 'x-signature',
+ 'cookie',
+ 'set-cookie',
+ };
+
+ for (final key in safeHeaders.keys.toList()) {
+ if (sensitiveKeys.contains(key.toLowerCase())) {
+ safeHeaders[key] = '***';
+ }
+ }
+
+ return safeHeaders;
+ }
+
+ String _formatBodyForLogging({
+ required List responseBytes,
+ required String? contentType,
+ }) {
+ final normalizedType = contentType?.toLowerCase() ?? '';
+ final isBinary =
+ normalizedType.contains('application/pdf') ||
+ normalizedType.contains('application/octet-stream') ||
+ normalizedType.startsWith('image/') ||
+ normalizedType.startsWith('audio/') ||
+ normalizedType.startsWith('video/');
+
+ if (isBinary) {
+ return '';
+ }
+
+ final decoded = utf8.decode(responseBytes, allowMalformed: true).trim();
+ if (decoded.isEmpty) {
+ return '';
+ }
+
+ const maxChars = 4000;
+ if (decoded.length <= maxChars) {
+ return decoded;
+ }
+ return '${decoded.substring(0, maxChars)}…';
+ }
+}
diff --git a/lib/core/theme/app_colors.dart b/lib/core/theme/app_colors.dart
index 3d13ea8..fde33bb 100644
--- a/lib/core/theme/app_colors.dart
+++ b/lib/core/theme/app_colors.dart
@@ -1,7 +1,7 @@
-import 'package:flutter/material.dart';
-
-class AppColors {
- const AppColors._();
-
- static const Color primary = Color(0xFF2A60AF);
-}
+import 'package:flutter/material.dart';
+
+class AppColors {
+ const AppColors._();
+
+ static const Color primary = Color(0xFF2A60AF);
+}
diff --git a/lib/data/repositories/api_auth_repository.dart b/lib/data/repositories/api_auth_repository.dart
index 96bc275..fef17fa 100644
--- a/lib/data/repositories/api_auth_repository.dart
+++ b/lib/data/repositories/api_auth_repository.dart
@@ -1,242 +1,242 @@
-import 'dart:convert';
-
-import 'package:e_receipt_mobile/domain/entities/login_user.dart';
-import 'package:e_receipt_mobile/domain/exceptions/auth_exceptions.dart';
-import 'package:e_receipt_mobile/domain/repositories/auth_repository.dart';
-import 'package:http/http.dart' as http;
-
-class ApiAuthRepository implements AuthRepository {
- ApiAuthRepository({
- required this.baseUrl,
- required this.apiSecret,
- http.Client? client,
- }) : _client = client ?? http.Client();
-
- final String baseUrl;
- final String apiSecret;
- final http.Client _client;
-
- @override
- Future login({
- required String username,
- required String password,
- }) async {
- final uri = Uri.parse('$baseUrl/auth/login');
- final requestBody = jsonEncode({
- 'username': username.trim().toLowerCase(),
- 'password': password,
- });
-
- final response = await _client.post(
- uri,
- headers: {
- 'Content-Type': 'application/json',
- 'x-api-key': apiSecret,
- },
- body: requestBody,
- );
-
- if (response.statusCode >= 200 && response.statusCode < 300) {
- return _parseUserFromResponse(
- response.body,
- fallbackUsername: username.trim(),
- );
- }
-
- final data = _asMap(response.body);
- final payload = _extractPayload(data);
- final require =
- _pickString(data, const ['require', 'required']) ??
- _pickString(payload, const ['require', 'required']);
- if (require == 'PASSWORD_UPDATE_REQUIRED') {
- final userId = _extractUserId(data);
- if (userId != null) {
- throw PasswordUpdateRequiredException(
- userId: userId,
- message: _extractErrorMessage(response.body),
- );
- }
- }
-
- throw Exception(_extractErrorMessage(response.body));
- }
-
- @override
- Future refreshSession({
- required String username,
- required String refreshToken,
- required String role,
- }) async {
- final uri = Uri.parse('$baseUrl/auth/refresh-token');
- final requestBody = jsonEncode({
- 'refreshToken': refreshToken,
- });
-
- final response = await _client.post(
- uri,
- headers: {
- 'Content-Type': 'application/json',
- 'x-api-key': apiSecret,
- },
- body: requestBody,
- );
-
- if (response.statusCode >= 200 && response.statusCode < 300) {
- return _parseUserFromResponse(
- response.body,
- fallbackUsername: username,
- fallbackRefreshToken: refreshToken,
- fallbackRole: role,
- );
- }
-
- throw Exception(_extractErrorMessage(response.body));
- }
-
- @override
- Future resetPassword({
- required String userId,
- required String password,
- }) async {
- final uri = Uri.parse('$baseUrl/auth/reset-password');
- final requestBody = jsonEncode({
- 'userId': userId,
- 'password': password,
- });
-
- final response = await _client.put(
- uri,
- headers: {
- 'Content-Type': 'application/json',
- 'x-api-key': apiSecret,
- },
- body: requestBody,
- );
-
- if (response.statusCode >= 200 && response.statusCode < 300) {
- return;
- }
-
- throw Exception(_extractErrorMessage(response.body));
- }
-
- @override
- Future logout({required String refreshToken}) async {
- final uri = Uri.parse('$baseUrl/auth/logout');
- final requestBody = jsonEncode({
- 'refreshToken': refreshToken,
- });
-
- final response = await _client.post(
- uri,
- headers: {
- 'Content-Type': 'application/json',
- 'x-api-key': apiSecret,
- },
- body: requestBody,
- );
-
- if (response.statusCode >= 200 && response.statusCode < 300) {
- return;
- }
-
- throw Exception(_extractErrorMessage(response.body));
- }
-
- Map _asMap(String body) {
- try {
- final decoded = jsonDecode(body);
- if (decoded is Map) {
- return decoded;
- }
- return {};
- } catch (_) {
- return {};
- }
- }
-
- String _extractErrorMessage(String body) {
- final data = _asMap(body);
- final message = data['message'] ?? data['error'] ?? data['detail'];
- if (message == null) {
- return 'Login failed';
- }
- return message.toString();
- }
-
- String? _extractUserId(Map data) {
- final rootUser = data['user'];
- if (rootUser is Map) {
- final id = _pickString(rootUser, const ['id', 'userId', 'user_id']);
- if (id != null) {
- return id;
- }
- }
-
- final payload = _extractPayload(data);
- final payloadUser = payload['user'];
- if (payloadUser is Map) {
- return _pickString(payloadUser, const ['id', 'userId', 'user_id']);
- }
-
- return _pickString(payload, const ['userId', 'user_id', 'id']);
- }
-
- LoginUser _parseUserFromResponse(
- String body, {
- required String fallbackUsername,
- String? fallbackRefreshToken,
- String? fallbackRole,
- }) {
- final data = _asMap(body);
- final payload = _extractPayload(data);
- final apiUsername = _pickString(payload, const ['username', 'email']);
- final token = _pickString(payload, const ['token', 'accessToken']);
- final refreshToken = _pickString(
- payload,
- const ['refreshToken', 'refresh_token'],
- );
- final role = _pickString(payload, const ['role']);
-
- if (token == null) {
- throw Exception('Auth response is missing token');
- }
-
- final effectiveRefreshToken = refreshToken ?? fallbackRefreshToken;
- if (effectiveRefreshToken == null) {
- throw Exception('Auth response is missing refresh token');
- }
-
- final effectiveRole = role ?? fallbackRole;
- if (effectiveRole == null || effectiveRole.trim().isEmpty) {
- throw Exception('Auth response is missing role');
- }
-
- return LoginUser(
- username: apiUsername?.trim().isNotEmpty == true
- ? apiUsername!.trim()
- : fallbackUsername.trim(),
- token: token,
- refreshToken: effectiveRefreshToken,
- role: effectiveRole,
- );
- }
-
- Map _extractPayload(Map data) {
- final dynamic nested = data['data'] ?? data['result'] ?? data['payload'];
- if (nested is Map) {
- return nested;
- }
- return data;
- }
-
- String? _pickString(Map data, List keys) {
- for (final key in keys) {
- final value = data[key];
- if (value != null && value.toString().trim().isNotEmpty) {
- return value.toString().trim();
- }
- }
- return null;
- }
-}
+import 'dart:convert';
+
+import 'package:e_receipt_mobile/domain/entities/login_user.dart';
+import 'package:e_receipt_mobile/domain/exceptions/auth_exceptions.dart';
+import 'package:e_receipt_mobile/domain/repositories/auth_repository.dart';
+import 'package:http/http.dart' as http;
+
+class ApiAuthRepository implements AuthRepository {
+ ApiAuthRepository({
+ required this.baseUrl,
+ required this.apiSecret,
+ http.Client? client,
+ }) : _client = client ?? http.Client();
+
+ final String baseUrl;
+ final String apiSecret;
+ final http.Client _client;
+
+ @override
+ Future login({
+ required String username,
+ required String password,
+ }) async {
+ final uri = Uri.parse('$baseUrl/auth/login');
+ final requestBody = jsonEncode({
+ 'username': username.trim().toLowerCase(),
+ 'password': password,
+ });
+
+ final response = await _client.post(
+ uri,
+ headers: {
+ 'Content-Type': 'application/json',
+ 'x-api-key': apiSecret,
+ },
+ body: requestBody,
+ );
+
+ if (response.statusCode >= 200 && response.statusCode < 300) {
+ return _parseUserFromResponse(
+ response.body,
+ fallbackUsername: username.trim(),
+ );
+ }
+
+ final data = _asMap(response.body);
+ final payload = _extractPayload(data);
+ final require =
+ _pickString(data, const ['require', 'required']) ??
+ _pickString(payload, const ['require', 'required']);
+ if (require == 'PASSWORD_UPDATE_REQUIRED') {
+ final userId = _extractUserId(data);
+ if (userId != null) {
+ throw PasswordUpdateRequiredException(
+ userId: userId,
+ message: _extractErrorMessage(response.body),
+ );
+ }
+ }
+
+ throw Exception(_extractErrorMessage(response.body));
+ }
+
+ @override
+ Future refreshSession({
+ required String username,
+ required String refreshToken,
+ required String role,
+ }) async {
+ final uri = Uri.parse('$baseUrl/auth/refresh-token');
+ final requestBody = jsonEncode({
+ 'refreshToken': refreshToken,
+ });
+
+ final response = await _client.post(
+ uri,
+ headers: {
+ 'Content-Type': 'application/json',
+ 'x-api-key': apiSecret,
+ },
+ body: requestBody,
+ );
+
+ if (response.statusCode >= 200 && response.statusCode < 300) {
+ return _parseUserFromResponse(
+ response.body,
+ fallbackUsername: username,
+ fallbackRefreshToken: refreshToken,
+ fallbackRole: role,
+ );
+ }
+
+ throw Exception(_extractErrorMessage(response.body));
+ }
+
+ @override
+ Future resetPassword({
+ required String userId,
+ required String password,
+ }) async {
+ final uri = Uri.parse('$baseUrl/auth/reset-password');
+ final requestBody = jsonEncode({
+ 'userId': userId,
+ 'password': password,
+ });
+
+ final response = await _client.put(
+ uri,
+ headers: {
+ 'Content-Type': 'application/json',
+ 'x-api-key': apiSecret,
+ },
+ body: requestBody,
+ );
+
+ if (response.statusCode >= 200 && response.statusCode < 300) {
+ return;
+ }
+
+ throw Exception(_extractErrorMessage(response.body));
+ }
+
+ @override
+ Future logout({required String refreshToken}) async {
+ final uri = Uri.parse('$baseUrl/auth/logout');
+ final requestBody = jsonEncode({
+ 'refreshToken': refreshToken,
+ });
+
+ final response = await _client.post(
+ uri,
+ headers: {
+ 'Content-Type': 'application/json',
+ 'x-api-key': apiSecret,
+ },
+ body: requestBody,
+ );
+
+ if (response.statusCode >= 200 && response.statusCode < 300) {
+ return;
+ }
+
+ throw Exception(_extractErrorMessage(response.body));
+ }
+
+ Map _asMap(String body) {
+ try {
+ final decoded = jsonDecode(body);
+ if (decoded is Map) {
+ return decoded;
+ }
+ return {};
+ } catch (_) {
+ return {};
+ }
+ }
+
+ String _extractErrorMessage(String body) {
+ final data = _asMap(body);
+ final message = data['message'] ?? data['error'] ?? data['detail'];
+ if (message == null) {
+ return 'Login failed';
+ }
+ return message.toString();
+ }
+
+ String? _extractUserId(Map data) {
+ final rootUser = data['user'];
+ if (rootUser is Map) {
+ final id = _pickString(rootUser, const ['id', 'userId', 'user_id']);
+ if (id != null) {
+ return id;
+ }
+ }
+
+ final payload = _extractPayload(data);
+ final payloadUser = payload['user'];
+ if (payloadUser is Map) {
+ return _pickString(payloadUser, const ['id', 'userId', 'user_id']);
+ }
+
+ return _pickString(payload, const ['userId', 'user_id', 'id']);
+ }
+
+ LoginUser _parseUserFromResponse(
+ String body, {
+ required String fallbackUsername,
+ String? fallbackRefreshToken,
+ String? fallbackRole,
+ }) {
+ final data = _asMap(body);
+ final payload = _extractPayload(data);
+ final apiUsername = _pickString(payload, const ['username', 'email']);
+ final token = _pickString(payload, const ['token', 'accessToken']);
+ final refreshToken = _pickString(
+ payload,
+ const ['refreshToken', 'refresh_token'],
+ );
+ final role = _pickString(payload, const ['role']);
+
+ if (token == null) {
+ throw Exception('Auth response is missing token');
+ }
+
+ final effectiveRefreshToken = refreshToken ?? fallbackRefreshToken;
+ if (effectiveRefreshToken == null) {
+ throw Exception('Auth response is missing refresh token');
+ }
+
+ final effectiveRole = role ?? fallbackRole;
+ if (effectiveRole == null || effectiveRole.trim().isEmpty) {
+ throw Exception('Auth response is missing role');
+ }
+
+ return LoginUser(
+ username: apiUsername?.trim().isNotEmpty == true
+ ? apiUsername!.trim()
+ : fallbackUsername.trim(),
+ token: token,
+ refreshToken: effectiveRefreshToken,
+ role: effectiveRole,
+ );
+ }
+
+ Map _extractPayload(Map data) {
+ final dynamic nested = data['data'] ?? data['result'] ?? data['payload'];
+ if (nested is Map) {
+ return nested;
+ }
+ return data;
+ }
+
+ String? _pickString(Map data, List keys) {
+ for (final key in keys) {
+ final value = data[key];
+ if (value != null && value.toString().trim().isNotEmpty) {
+ return value.toString().trim();
+ }
+ }
+ return null;
+ }
+}
diff --git a/lib/data/repositories/api_merchant_repository.dart b/lib/data/repositories/api_merchant_repository.dart
index 5582d9b..149ebaa 100644
--- a/lib/data/repositories/api_merchant_repository.dart
+++ b/lib/data/repositories/api_merchant_repository.dart
@@ -1,270 +1,270 @@
-import 'dart:convert';
-
-import 'package:e_receipt_mobile/domain/entities/merchant.dart';
-import 'package:e_receipt_mobile/domain/repositories/merchant_repository.dart';
-import 'package:e_receipt_mobile/domain/entities/terminal.dart';
-import 'package:http/http.dart' as http;
-
-class ApiMerchantRepository implements MerchantRepository {
- ApiMerchantRepository({
- required this.baseUrl,
- required this.apiSecret,
- required http.Client client,
- }) : _client = client;
-
- final String baseUrl;
- final String apiSecret;
- final http.Client _client;
-
- @override
- Future> getMerchants({
- required String token,
- int page = 1,
- int limit = 10,
- String searchTerm = '',
- }) async {
- final queryParameters = {
- 'page': page.toString(),
- 'limit': limit.toString(),
- if (searchTerm.trim().isNotEmpty) 'searchTerm': searchTerm.trim(),
- };
- final uri = Uri.parse(
- '$baseUrl/merchant',
- ).replace(queryParameters: queryParameters);
- final response = await _client.get(
- uri,
- headers: {
- 'Content-Type': 'application/json',
- 'x-api-key': apiSecret,
- 'Authorization': 'Bearer ${token.trim()}',
- },
- );
-
- if (response.statusCode >= 200 && response.statusCode < 300) {
- return _parseMerchants(response.body);
- }
-
- throw Exception(_extractErrorMessage(response.body));
- }
-
- @override
- Future> getTerminalsByMerchantId({
- required String token,
- required String merchantId,
- }) async {
- final uri = Uri.parse('$baseUrl/terminal/list/$merchantId');
- final response = await _client.get(
- uri,
- headers: {
- 'Content-Type': 'application/json',
- 'x-api-key': apiSecret,
- 'Authorization': 'Bearer ${token.trim()}',
- },
- );
-
- if (response.statusCode >= 200 && response.statusCode < 300) {
- return _parseTerminals(response.body);
- }
-
- throw Exception(_extractErrorMessage(response.body));
- }
-
- List _parseMerchants(String body) {
- final decoded = _tryDecode(body);
- final list = _extractList(decoded);
- return list.map(_merchantFromItem).whereType().toList();
- }
-
- List _parseTerminals(String body) {
- final decoded = _tryDecode(body);
- final list = _extractTerminalList(decoded);
- return list.map(_terminalFromItem).whereType().toList();
- }
-
- dynamic _tryDecode(String body) {
- try {
- return jsonDecode(body);
- } catch (_) {
- return null;
- }
- }
-
- List _extractList(dynamic decoded) {
- if (decoded is List) {
- return decoded;
- }
- if (decoded is Map) {
- final directMerchants = decoded['merchants'];
- if (directMerchants is List) {
- return directMerchants;
- }
-
- final data =
- decoded['data'] ??
- decoded['result'] ??
- decoded['payload'] ??
- decoded['merchantData'];
- if (data is List) {
- return data;
- }
- if (data is Map) {
- final nestedMerchants = data['merchants'];
- if (nestedMerchants is List) {
- return nestedMerchants;
- }
- }
- }
- return const [];
- }
-
- List _extractTerminalList(dynamic decoded) {
- if (decoded is List) {
- return decoded;
- }
- if (decoded is Map) {
- final directTerminals = decoded['terminals'];
- if (directTerminals is List) {
- return directTerminals;
- }
-
- final data =
- decoded['data'] ??
- decoded['result'] ??
- decoded['payload'] ??
- decoded['terminalData'];
- if (data is List) {
- return data;
- }
- if (data is Map) {
- final nestedTerminals = data['terminals'];
- if (nestedTerminals is List) {
- return nestedTerminals;
- }
- }
- }
- return const [];
- }
-
- Merchant? _merchantFromItem(dynamic item) {
- if (item is! Map) {
- return null;
- }
-
- return Merchant(
- id: _pickString(item, const ['id', 'merchantId', 'merchant_id']),
- name: _pickString(item, const ['name', 'merchantName', 'merchant_name']),
- mobile: _pickString(item, const ['mobile']),
- description: _pickString(item, const ['description']),
- address: _pickString(item, const ['address']),
- address2: _pickString(item, const ['address2']),
- address3: _pickString(item, const ['address3']),
- phone: _pickString(item, const ['phone']),
- mids: _pickString(item, const ['mids']),
- createdBy: _pickString(item, const ['createdBy', 'created_by']),
- updatedBy: _pickString(item, const ['updatedBy', 'updated_by']),
- createdAt: _pickString(item, const ['createdAt', 'created_at']),
- updatedAt: _pickString(item, const ['updatedAt', 'updated_at']),
- );
- }
-
- Terminal? _terminalFromItem(dynamic item) {
- if (item is! Map) {
- return null;
- }
-
- return Terminal(
- id: _pickString(item, const ['id', 'terminalId', 'terminal_id']),
- serial: _pickString(item, const ['serial']),
- address: _pickString(item, const ['address']),
- address2: _pickString(item, const ['address2']),
- address3: _pickString(item, const ['address3']),
- name: _pickString(item, const ['name', 'terminalName', 'terminal_name']),
- appId: _pickString(item, const ['appId', 'app_id']),
- tid: _pickString(item, const ['tid', 'terminalNo', 'terminal_no']),
- mids: _pickStringList(item, const ['mid', 'mids']),
- merchantId: _pickString(item, const ['merchantId', 'merchant_id']),
- status: _pickString(item, const ['status']),
- totalTransactions: _pickInt(item, const [
- 'totalTransactions',
- 'total_transactions',
- ]),
- totalAmount: _pickNum(item, const ['totalAmount', 'total_amount']),
- createdAt: _pickString(item, const ['createdAt', 'created_at']),
- updatedAt: _pickString(item, const ['updatedAt', 'updated_at']),
- );
- }
-
- String? _pickString(Map data, List keys) {
- for (final key in keys) {
- final value = data[key];
- if (value != null && value.toString().trim().isNotEmpty) {
- return value.toString().trim();
- }
- }
- return null;
- }
-
- List? _pickStringList(Map data, List keys) {
- for (final key in keys) {
- final value = data[key];
- if (value is List) {
- final results = value
- .where((e) => e != null && e.toString().trim().isNotEmpty)
- .map((e) => e.toString().trim())
- .toList();
- return results.isEmpty ? null : results;
- }
- if (value != null && value.toString().trim().isNotEmpty) {
- return [value.toString().trim()];
- }
- }
- return null;
- }
-
- int? _pickInt(Map data, List keys) {
- for (final key in keys) {
- final value = data[key];
- if (value is int) {
- return value;
- }
- if (value is num) {
- return value.toInt();
- }
- if (value != null) {
- final parsed = int.tryParse(value.toString().trim());
- if (parsed != null) {
- return parsed;
- }
- }
- }
- return null;
- }
-
- num? _pickNum(Map data, List keys) {
- for (final key in keys) {
- final value = data[key];
- if (value is num) {
- return value;
- }
- if (value != null) {
- final parsed = num.tryParse(value.toString().trim());
- if (parsed != null) {
- return parsed;
- }
- }
- }
- return null;
- }
-
- String _extractErrorMessage(String body) {
- final decoded = _tryDecode(body);
- if (decoded is Map) {
- final message =
- decoded['message'] ?? decoded['error'] ?? decoded['detail'];
- if (message != null) {
- return message.toString();
- }
- }
- return 'Failed to load merchants';
- }
-}
+import 'dart:convert';
+
+import 'package:e_receipt_mobile/domain/entities/merchant.dart';
+import 'package:e_receipt_mobile/domain/repositories/merchant_repository.dart';
+import 'package:e_receipt_mobile/domain/entities/terminal.dart';
+import 'package:http/http.dart' as http;
+
+class ApiMerchantRepository implements MerchantRepository {
+ ApiMerchantRepository({
+ required this.baseUrl,
+ required this.apiSecret,
+ required http.Client client,
+ }) : _client = client;
+
+ final String baseUrl;
+ final String apiSecret;
+ final http.Client _client;
+
+ @override
+ Future> getMerchants({
+ required String token,
+ int page = 1,
+ int limit = 10,
+ String searchTerm = '',
+ }) async {
+ final queryParameters = {
+ 'page': page.toString(),
+ 'limit': limit.toString(),
+ if (searchTerm.trim().isNotEmpty) 'searchTerm': searchTerm.trim(),
+ };
+ final uri = Uri.parse(
+ '$baseUrl/merchant',
+ ).replace(queryParameters: queryParameters);
+ final response = await _client.get(
+ uri,
+ headers: {
+ 'Content-Type': 'application/json',
+ 'x-api-key': apiSecret,
+ 'Authorization': 'Bearer ${token.trim()}',
+ },
+ );
+
+ if (response.statusCode >= 200 && response.statusCode < 300) {
+ return _parseMerchants(response.body);
+ }
+
+ throw Exception(_extractErrorMessage(response.body));
+ }
+
+ @override
+ Future> getTerminalsByMerchantId({
+ required String token,
+ required String merchantId,
+ }) async {
+ final uri = Uri.parse('$baseUrl/terminal/list/$merchantId');
+ final response = await _client.get(
+ uri,
+ headers: {
+ 'Content-Type': 'application/json',
+ 'x-api-key': apiSecret,
+ 'Authorization': 'Bearer ${token.trim()}',
+ },
+ );
+
+ if (response.statusCode >= 200 && response.statusCode < 300) {
+ return _parseTerminals(response.body);
+ }
+
+ throw Exception(_extractErrorMessage(response.body));
+ }
+
+ List _parseMerchants(String body) {
+ final decoded = _tryDecode(body);
+ final list = _extractList(decoded);
+ return list.map(_merchantFromItem).whereType().toList();
+ }
+
+ List _parseTerminals(String body) {
+ final decoded = _tryDecode(body);
+ final list = _extractTerminalList(decoded);
+ return list.map(_terminalFromItem).whereType().toList();
+ }
+
+ dynamic _tryDecode(String body) {
+ try {
+ return jsonDecode(body);
+ } catch (_) {
+ return null;
+ }
+ }
+
+ List _extractList(dynamic decoded) {
+ if (decoded is List) {
+ return decoded;
+ }
+ if (decoded is Map) {
+ final directMerchants = decoded['merchants'];
+ if (directMerchants is List) {
+ return directMerchants;
+ }
+
+ final data =
+ decoded['data'] ??
+ decoded['result'] ??
+ decoded['payload'] ??
+ decoded['merchantData'];
+ if (data is List) {
+ return data;
+ }
+ if (data is Map) {
+ final nestedMerchants = data['merchants'];
+ if (nestedMerchants is List) {
+ return nestedMerchants;
+ }
+ }
+ }
+ return const [];
+ }
+
+ List _extractTerminalList(dynamic decoded) {
+ if (decoded is List) {
+ return decoded;
+ }
+ if (decoded is Map) {
+ final directTerminals = decoded['terminals'];
+ if (directTerminals is List) {
+ return directTerminals;
+ }
+
+ final data =
+ decoded['data'] ??
+ decoded['result'] ??
+ decoded['payload'] ??
+ decoded['terminalData'];
+ if (data is List) {
+ return data;
+ }
+ if (data is Map) {
+ final nestedTerminals = data['terminals'];
+ if (nestedTerminals is List) {
+ return nestedTerminals;
+ }
+ }
+ }
+ return const [];
+ }
+
+ Merchant? _merchantFromItem(dynamic item) {
+ if (item is! Map) {
+ return null;
+ }
+
+ return Merchant(
+ id: _pickString(item, const ['id', 'merchantId', 'merchant_id']),
+ name: _pickString(item, const ['name', 'merchantName', 'merchant_name']),
+ mobile: _pickString(item, const ['mobile']),
+ description: _pickString(item, const ['description']),
+ address: _pickString(item, const ['address']),
+ address2: _pickString(item, const ['address2']),
+ address3: _pickString(item, const ['address3']),
+ phone: _pickString(item, const ['phone']),
+ mids: _pickString(item, const ['mids']),
+ createdBy: _pickString(item, const ['createdBy', 'created_by']),
+ updatedBy: _pickString(item, const ['updatedBy', 'updated_by']),
+ createdAt: _pickString(item, const ['createdAt', 'created_at']),
+ updatedAt: _pickString(item, const ['updatedAt', 'updated_at']),
+ );
+ }
+
+ Terminal? _terminalFromItem(dynamic item) {
+ if (item is! Map) {
+ return null;
+ }
+
+ return Terminal(
+ id: _pickString(item, const ['id', 'terminalId', 'terminal_id']),
+ serial: _pickString(item, const ['serial']),
+ address: _pickString(item, const ['address']),
+ address2: _pickString(item, const ['address2']),
+ address3: _pickString(item, const ['address3']),
+ name: _pickString(item, const ['name', 'terminalName', 'terminal_name']),
+ appId: _pickString(item, const ['appId', 'app_id']),
+ tid: _pickString(item, const ['tid', 'terminalNo', 'terminal_no']),
+ mids: _pickStringList(item, const ['mid', 'mids']),
+ merchantId: _pickString(item, const ['merchantId', 'merchant_id']),
+ status: _pickString(item, const ['status']),
+ totalTransactions: _pickInt(item, const [
+ 'totalTransactions',
+ 'total_transactions',
+ ]),
+ totalAmount: _pickNum(item, const ['totalAmount', 'total_amount']),
+ createdAt: _pickString(item, const ['createdAt', 'created_at']),
+ updatedAt: _pickString(item, const ['updatedAt', 'updated_at']),
+ );
+ }
+
+ String? _pickString(Map data, List keys) {
+ for (final key in keys) {
+ final value = data[key];
+ if (value != null && value.toString().trim().isNotEmpty) {
+ return value.toString().trim();
+ }
+ }
+ return null;
+ }
+
+ List? _pickStringList(Map data, List keys) {
+ for (final key in keys) {
+ final value = data[key];
+ if (value is List) {
+ final results = value
+ .where((e) => e != null && e.toString().trim().isNotEmpty)
+ .map((e) => e.toString().trim())
+ .toList();
+ return results.isEmpty ? null : results;
+ }
+ if (value != null && value.toString().trim().isNotEmpty) {
+ return [value.toString().trim()];
+ }
+ }
+ return null;
+ }
+
+ int? _pickInt(Map data, List keys) {
+ for (final key in keys) {
+ final value = data[key];
+ if (value is int) {
+ return value;
+ }
+ if (value is num) {
+ return value.toInt();
+ }
+ if (value != null) {
+ final parsed = int.tryParse(value.toString().trim());
+ if (parsed != null) {
+ return parsed;
+ }
+ }
+ }
+ return null;
+ }
+
+ num? _pickNum(Map data, List keys) {
+ for (final key in keys) {
+ final value = data[key];
+ if (value is num) {
+ return value;
+ }
+ if (value != null) {
+ final parsed = num.tryParse(value.toString().trim());
+ if (parsed != null) {
+ return parsed;
+ }
+ }
+ }
+ return null;
+ }
+
+ String _extractErrorMessage(String body) {
+ final decoded = _tryDecode(body);
+ if (decoded is Map) {
+ final message =
+ decoded['message'] ?? decoded['error'] ?? decoded['detail'];
+ if (message != null) {
+ return message.toString();
+ }
+ }
+ return 'Failed to load merchants';
+ }
+}
diff --git a/lib/data/repositories/api_receipt_repository.dart b/lib/data/repositories/api_receipt_repository.dart
index 0bf8a86..95b3c72 100644
--- a/lib/data/repositories/api_receipt_repository.dart
+++ b/lib/data/repositories/api_receipt_repository.dart
@@ -1,139 +1,139 @@
-import 'dart:convert';
-import 'dart:io';
-import 'dart:typed_data';
-
-import 'package:e_receipt_mobile/domain/entities/receipt_content.dart';
-import 'package:e_receipt_mobile/domain/repositories/receipt_repository.dart';
-import 'package:http/http.dart' as http;
-
-class ApiReceiptRepository implements ReceiptRepository {
- ApiReceiptRepository({
- required this.baseUrl,
- required this.apiSecret,
- required http.Client client,
- }) : _client = client;
-
- final String baseUrl;
- final String apiSecret;
- final http.Client _client;
-
- @override
- Future getTransactionReceipt({
- required String token,
- required String transactionId,
- required String copyFor,
- }) async {
- final uri = _normalizeLocalhostForAndroid(
- Uri.parse('$baseUrl/transaction/pdf').replace(
- queryParameters: {
- 'transactionId': transactionId,
- 'copyFor': copyFor,
- },
- ),
- );
-
- final request = http.Request('GET', uri);
- request.headers.addAll({
- 'Accept': 'application/pdf,text/html',
- 'Content-Type': 'application/json',
- 'x-api-key': apiSecret,
- if (token.trim().isNotEmpty) 'Authorization': 'Bearer ${token.trim()}',
- });
-
- final streamed = await _client.send(request);
- final bytes = await streamed.stream.toBytes();
- final contentType = streamed.headers['content-type']?.trim() ?? '';
-
- if (streamed.statusCode < 200 || streamed.statusCode >= 300) {
- final body = const Utf8Decoder(
- allowMalformed: true,
- ).convert(bytes).trim();
- throw Exception(
- body.isNotEmpty && body.length <= 500
- ? body
- : 'Failed to load receipt (${streamed.statusCode}) $contentType',
- );
- }
-
- if (_looksLikePdf(bytes: bytes, contentType: contentType)) {
- return ReceiptPdfContent(bytes);
- }
-
- final html = const Utf8Decoder(allowMalformed: true).convert(bytes);
- return ReceiptHtmlContent(html: html, contentType: contentType);
- }
-
- @override
- Future getTransactionReceiptPdfBytes({
- required String token,
- required String transactionId,
- required String copyFor,
- }) async {
- final uri = _normalizeLocalhostForAndroid(
- Uri.parse('$baseUrl/transaction/pdf').replace(
- queryParameters: {
- 'transactionId': transactionId,
- 'copyFor': copyFor,
- },
- ),
- );
-
- final request = http.Request('GET', uri);
- request.headers.addAll({
- 'Accept': 'application/pdf',
- 'Content-Type': 'application/json',
- 'x-api-key': apiSecret,
- if (token.trim().isNotEmpty) 'Authorization': 'Bearer ${token.trim()}',
- });
-
- final streamed = await _client.send(request);
- final bytes = await streamed.stream.toBytes();
- final contentType = streamed.headers['content-type']?.trim() ?? '';
-
- if (streamed.statusCode < 200 || streamed.statusCode >= 300) {
- final body = const Utf8Decoder(
- allowMalformed: true,
- ).convert(bytes).trim();
- throw Exception(
- body.isNotEmpty && body.length <= 500
- ? body
- : 'Failed to load receipt PDF (${streamed.statusCode}) $contentType',
- );
- }
-
- if (_looksLikePdf(bytes: bytes, contentType: contentType)) {
- return bytes;
- }
-
- final body = const Utf8Decoder(allowMalformed: true).convert(bytes).trim();
- throw Exception(
- body.isNotEmpty && body.length <= 500
- ? body
- : 'Server did not return a PDF ($contentType)',
- );
- }
-
- Uri _normalizeLocalhostForAndroid(Uri uri) {
- if (!Platform.isAndroid) {
- return uri;
- }
- if (uri.host != 'localhost') {
- return uri;
- }
- return uri.replace(host: '10.0.2.2');
- }
-
- bool _looksLikePdf({required List bytes, required String contentType}) {
- final type = contentType.toLowerCase();
- if (type.contains('application/pdf')) {
- return true;
- }
- if (bytes.length < 4) {
- return false;
- }
- return bytes[0] == 0x25 && // %
- bytes[1] == 0x50 && // P
- bytes[2] == 0x44 && // D
- bytes[3] == 0x46; // F
- }
-}
+import 'dart:convert';
+import 'dart:io';
+import 'dart:typed_data';
+
+import 'package:e_receipt_mobile/domain/entities/receipt_content.dart';
+import 'package:e_receipt_mobile/domain/repositories/receipt_repository.dart';
+import 'package:http/http.dart' as http;
+
+class ApiReceiptRepository implements ReceiptRepository {
+ ApiReceiptRepository({
+ required this.baseUrl,
+ required this.apiSecret,
+ required http.Client client,
+ }) : _client = client;
+
+ final String baseUrl;
+ final String apiSecret;
+ final http.Client _client;
+
+ @override
+ Future getTransactionReceipt({
+ required String token,
+ required String transactionId,
+ required String copyFor,
+ }) async {
+ final uri = _normalizeLocalhostForAndroid(
+ Uri.parse('$baseUrl/transaction/pdf').replace(
+ queryParameters: {
+ 'transactionId': transactionId,
+ 'copyFor': copyFor,
+ },
+ ),
+ );
+
+ final request = http.Request('GET', uri);
+ request.headers.addAll({
+ 'Accept': 'application/pdf,text/html',
+ 'Content-Type': 'application/json',
+ 'x-api-key': apiSecret,
+ if (token.trim().isNotEmpty) 'Authorization': 'Bearer ${token.trim()}',
+ });
+
+ final streamed = await _client.send(request);
+ final bytes = await streamed.stream.toBytes();
+ final contentType = streamed.headers['content-type']?.trim() ?? '';
+
+ if (streamed.statusCode < 200 || streamed.statusCode >= 300) {
+ final body = const Utf8Decoder(
+ allowMalformed: true,
+ ).convert(bytes).trim();
+ throw Exception(
+ body.isNotEmpty && body.length <= 500
+ ? body
+ : 'Failed to load receipt (${streamed.statusCode}) $contentType',
+ );
+ }
+
+ if (_looksLikePdf(bytes: bytes, contentType: contentType)) {
+ return ReceiptPdfContent(bytes);
+ }
+
+ final html = const Utf8Decoder(allowMalformed: true).convert(bytes);
+ return ReceiptHtmlContent(html: html, contentType: contentType);
+ }
+
+ @override
+ Future getTransactionReceiptPdfBytes({
+ required String token,
+ required String transactionId,
+ required String copyFor,
+ }) async {
+ final uri = _normalizeLocalhostForAndroid(
+ Uri.parse('$baseUrl/transaction/pdf').replace(
+ queryParameters: {
+ 'transactionId': transactionId,
+ 'copyFor': copyFor,
+ },
+ ),
+ );
+
+ final request = http.Request('GET', uri);
+ request.headers.addAll({
+ 'Accept': 'application/pdf',
+ 'Content-Type': 'application/json',
+ 'x-api-key': apiSecret,
+ if (token.trim().isNotEmpty) 'Authorization': 'Bearer ${token.trim()}',
+ });
+
+ final streamed = await _client.send(request);
+ final bytes = await streamed.stream.toBytes();
+ final contentType = streamed.headers['content-type']?.trim() ?? '';
+
+ if (streamed.statusCode < 200 || streamed.statusCode >= 300) {
+ final body = const Utf8Decoder(
+ allowMalformed: true,
+ ).convert(bytes).trim();
+ throw Exception(
+ body.isNotEmpty && body.length <= 500
+ ? body
+ : 'Failed to load receipt PDF (${streamed.statusCode}) $contentType',
+ );
+ }
+
+ if (_looksLikePdf(bytes: bytes, contentType: contentType)) {
+ return bytes;
+ }
+
+ final body = const Utf8Decoder(allowMalformed: true).convert(bytes).trim();
+ throw Exception(
+ body.isNotEmpty && body.length <= 500
+ ? body
+ : 'Server did not return a PDF ($contentType)',
+ );
+ }
+
+ Uri _normalizeLocalhostForAndroid(Uri uri) {
+ if (!Platform.isAndroid) {
+ return uri;
+ }
+ if (uri.host != 'localhost') {
+ return uri;
+ }
+ return uri.replace(host: '10.0.2.2');
+ }
+
+ bool _looksLikePdf({required List bytes, required String contentType}) {
+ final type = contentType.toLowerCase();
+ if (type.contains('application/pdf')) {
+ return true;
+ }
+ if (bytes.length < 4) {
+ return false;
+ }
+ return bytes[0] == 0x25 && // %
+ bytes[1] == 0x50 && // P
+ bytes[2] == 0x44 && // D
+ bytes[3] == 0x46; // F
+ }
+}
diff --git a/lib/data/repositories/api_transaction_repository.dart b/lib/data/repositories/api_transaction_repository.dart
index bd945bd..d63e93b 100644
--- a/lib/data/repositories/api_transaction_repository.dart
+++ b/lib/data/repositories/api_transaction_repository.dart
@@ -1,148 +1,148 @@
-import 'dart:convert';
-
-import 'package:e_receipt_mobile/domain/entities/transaction_record.dart';
-import 'package:e_receipt_mobile/domain/repositories/transaction_repository.dart';
-import 'package:http/http.dart' as http;
-
-class ApiTransactionRepository implements TransactionRepository {
- ApiTransactionRepository({
- required this.baseUrl,
- required this.apiSecret,
- required http.Client client,
- }) : _client = client;
-
- final String baseUrl;
- final String apiSecret;
- final http.Client _client;
-
- @override
- Future> getTransactions({
- required String token,
- required String serial,
- required String range,
- int page = 1,
- int limit = 8,
- String searchTerm = '',
- String sort = '',
- }) async {
- final uri = Uri.parse('$baseUrl/transaction').replace(
- queryParameters: {
- 'page': page.toString(),
- 'limit': limit.toString(),
- 'serial': serial,
- 'range': range,
- if (searchTerm.trim().isNotEmpty) 'search': searchTerm.trim(),
- if (sort.trim().isNotEmpty) 'sort': sort.trim(),
- },
- );
-
- final response = await _client.get(
- uri,
- headers: {
- 'Content-Type': 'application/json',
- 'x-api-key': apiSecret,
- 'Authorization': 'Bearer ${token.trim()}',
- },
- );
-
- if (response.statusCode >= 200 && response.statusCode < 300) {
- return _parseTransactions(response.body);
- }
-
- throw Exception(_extractErrorMessage(response.body));
- }
-
- List _parseTransactions(String body) {
- final decoded = _tryDecode(body);
- final list = _extractTransactionList(decoded);
- return list
- .map((item) => _transactionFromItem(item))
- .whereType()
- .toList();
- }
-
- dynamic _tryDecode(String body) {
- try {
- return jsonDecode(body);
- } catch (_) {
- return null;
- }
- }
-
- List _extractTransactionList(dynamic decoded) {
- if (decoded is List) {
- return decoded;
- }
- if (decoded is Map) {
- final direct = decoded['transactions'];
- if (direct is List) {
- return direct;
- }
-
- final data = decoded['data'] ?? decoded['result'] ?? decoded['payload'];
- if (data is List) {
- return data;
- }
- if (data is Map) {
- final nested = data['transactions'];
- if (nested is List) {
- return nested;
- }
- }
- }
- return const [];
- }
-
- TransactionRecord? _transactionFromItem(dynamic item) {
- if (item is! Map) {
- return null;
- }
-
- return TransactionRecord(
- id: _pickString(item, const ['id', 'transactionId', 'transaction_id']),
- rrn: _pickString(item, const ['rrn', 'referenceNo', 'reference_no', 'DE37']),
- amount: _pickNum(item, const ['amount', 'totalAmount', 'total_amount', 'DE4']),
- status: _pickString(item, const ['status', 'description', 'DE39']),
- type: _pickString(item, const ['type', 'transactionType', 'DE3']),
- createdAt: _pickString(item, const ['createdAt', 'created_at', 'CREATED_AT']),
- raw: item,
- );
- }
-
- String? _pickString(Map data, List keys) {
- for (final key in keys) {
- final value = data[key];
- if (value != null && value.toString().trim().isNotEmpty) {
- return value.toString().trim();
- }
- }
- return null;
- }
-
- num? _pickNum(Map data, List keys) {
- for (final key in keys) {
- final value = data[key];
- if (value is num) {
- return value;
- }
- if (value != null) {
- final parsed = num.tryParse(value.toString().trim());
- if (parsed != null) {
- return parsed;
- }
- }
- }
- return null;
- }
-
- String _extractErrorMessage(String body) {
- final decoded = _tryDecode(body);
- if (decoded is Map) {
- final message = decoded['message'] ?? decoded['error'] ?? decoded['detail'];
- if (message != null) {
- return message.toString();
- }
- }
- return 'Failed to load transactions';
- }
-}
+import 'dart:convert';
+
+import 'package:e_receipt_mobile/domain/entities/transaction_record.dart';
+import 'package:e_receipt_mobile/domain/repositories/transaction_repository.dart';
+import 'package:http/http.dart' as http;
+
+class ApiTransactionRepository implements TransactionRepository {
+ ApiTransactionRepository({
+ required this.baseUrl,
+ required this.apiSecret,
+ required http.Client client,
+ }) : _client = client;
+
+ final String baseUrl;
+ final String apiSecret;
+ final http.Client _client;
+
+ @override
+ Future> getTransactions({
+ required String token,
+ required String serial,
+ required String range,
+ int page = 1,
+ int limit = 8,
+ String searchTerm = '',
+ String sort = '',
+ }) async {
+ final uri = Uri.parse('$baseUrl/transaction').replace(
+ queryParameters: {
+ 'page': page.toString(),
+ 'limit': limit.toString(),
+ 'serial': serial,
+ 'range': range,
+ if (searchTerm.trim().isNotEmpty) 'search': searchTerm.trim(),
+ if (sort.trim().isNotEmpty) 'sort': sort.trim(),
+ },
+ );
+
+ final response = await _client.get(
+ uri,
+ headers: {
+ 'Content-Type': 'application/json',
+ 'x-api-key': apiSecret,
+ 'Authorization': 'Bearer ${token.trim()}',
+ },
+ );
+
+ if (response.statusCode >= 200 && response.statusCode < 300) {
+ return _parseTransactions(response.body);
+ }
+
+ throw Exception(_extractErrorMessage(response.body));
+ }
+
+ List _parseTransactions(String body) {
+ final decoded = _tryDecode(body);
+ final list = _extractTransactionList(decoded);
+ return list
+ .map((item) => _transactionFromItem(item))
+ .whereType()
+ .toList();
+ }
+
+ dynamic _tryDecode(String body) {
+ try {
+ return jsonDecode(body);
+ } catch (_) {
+ return null;
+ }
+ }
+
+ List _extractTransactionList(dynamic decoded) {
+ if (decoded is List) {
+ return decoded;
+ }
+ if (decoded is Map) {
+ final direct = decoded['transactions'];
+ if (direct is List) {
+ return direct;
+ }
+
+ final data = decoded['data'] ?? decoded['result'] ?? decoded['payload'];
+ if (data is List) {
+ return data;
+ }
+ if (data is Map) {
+ final nested = data['transactions'];
+ if (nested is List) {
+ return nested;
+ }
+ }
+ }
+ return const [];
+ }
+
+ TransactionRecord? _transactionFromItem(dynamic item) {
+ if (item is! Map) {
+ return null;
+ }
+
+ return TransactionRecord(
+ id: _pickString(item, const ['id', 'transactionId', 'transaction_id']),
+ rrn: _pickString(item, const ['rrn', 'referenceNo', 'reference_no', 'DE37']),
+ amount: _pickNum(item, const ['amount', 'totalAmount', 'total_amount', 'DE4']),
+ status: _pickString(item, const ['status', 'description', 'DE39']),
+ type: _pickString(item, const ['type', 'transactionType', 'DE3']),
+ createdAt: _pickString(item, const ['createdAt', 'created_at', 'CREATED_AT']),
+ raw: item,
+ );
+ }
+
+ String? _pickString(Map data, List keys) {
+ for (final key in keys) {
+ final value = data[key];
+ if (value != null && value.toString().trim().isNotEmpty) {
+ return value.toString().trim();
+ }
+ }
+ return null;
+ }
+
+ num? _pickNum(Map data, List keys) {
+ for (final key in keys) {
+ final value = data[key];
+ if (value is num) {
+ return value;
+ }
+ if (value != null) {
+ final parsed = num.tryParse(value.toString().trim());
+ if (parsed != null) {
+ return parsed;
+ }
+ }
+ }
+ return null;
+ }
+
+ String _extractErrorMessage(String body) {
+ final decoded = _tryDecode(body);
+ if (decoded is Map) {
+ final message = decoded['message'] ?? decoded['error'] ?? decoded['detail'];
+ if (message != null) {
+ return message.toString();
+ }
+ }
+ return 'Failed to load transactions';
+ }
+}
diff --git a/lib/data/repositories/mock_auth_repository.dart b/lib/data/repositories/mock_auth_repository.dart
index 3ed6875..045f135 100644
--- a/lib/data/repositories/mock_auth_repository.dart
+++ b/lib/data/repositories/mock_auth_repository.dart
@@ -1,70 +1,70 @@
-import 'package:e_receipt_mobile/domain/entities/login_user.dart';
-import 'package:e_receipt_mobile/domain/repositories/auth_repository.dart';
-
-class MockAuthRepository implements AuthRepository {
- @override
- Future login({
- required String username,
- required String password,
- }) async {
- await Future.delayed(const Duration(milliseconds: 800));
-
- if (username.trim().isEmpty || password.isEmpty) {
- throw Exception('Username and password are required.');
- }
-
- if (password.length < 6) {
- throw Exception('Password must be at least 6 characters.');
- }
-
- return LoginUser(
- username: username.trim(),
- token: 'mock-access-token',
- refreshToken: 'mock-refresh-token',
- role: username.trim().toLowerCase() == 'admin' ? 'admin' : 'user',
- );
- }
-
- @override
- Future refreshSession({
- required String username,
- required String refreshToken,
- required String role,
- }) async {
- await Future.delayed(const Duration(milliseconds: 300));
-
- if (refreshToken.trim().isEmpty) {
- throw Exception('Refresh token is required.');
- }
-
- return LoginUser(
- username: username.trim(),
- token: 'mock-access-token-refreshed',
- refreshToken: 'mock-refresh-token-refreshed',
- role: role,
- );
- }
-
- @override
- Future resetPassword({
- required String userId,
- required String password,
- }) async {
- await Future.delayed(const Duration(milliseconds: 500));
-
- if (userId.trim().isEmpty) {
- throw Exception('User ID is required.');
- }
- if (password.length < 8) {
- throw Exception('Password must be at least 8 characters.');
- }
- }
-
- @override
- Future logout({required String refreshToken}) async {
- await Future.delayed(const Duration(milliseconds: 250));
- if (refreshToken.trim().isEmpty) {
- throw Exception('Refresh token is required.');
- }
- }
-}
+import 'package:e_receipt_mobile/domain/entities/login_user.dart';
+import 'package:e_receipt_mobile/domain/repositories/auth_repository.dart';
+
+class MockAuthRepository implements AuthRepository {
+ @override
+ Future login({
+ required String username,
+ required String password,
+ }) async {
+ await Future.delayed(const Duration(milliseconds: 800));
+
+ if (username.trim().isEmpty || password.isEmpty) {
+ throw Exception('Username and password are required.');
+ }
+
+ if (password.length < 6) {
+ throw Exception('Password must be at least 6 characters.');
+ }
+
+ return LoginUser(
+ username: username.trim(),
+ token: 'mock-access-token',
+ refreshToken: 'mock-refresh-token',
+ role: username.trim().toLowerCase() == 'admin' ? 'admin' : 'user',
+ );
+ }
+
+ @override
+ Future refreshSession({
+ required String username,
+ required String refreshToken,
+ required String role,
+ }) async {
+ await Future.delayed(const Duration(milliseconds: 300));
+
+ if (refreshToken.trim().isEmpty) {
+ throw Exception('Refresh token is required.');
+ }
+
+ return LoginUser(
+ username: username.trim(),
+ token: 'mock-access-token-refreshed',
+ refreshToken: 'mock-refresh-token-refreshed',
+ role: role,
+ );
+ }
+
+ @override
+ Future resetPassword({
+ required String userId,
+ required String password,
+ }) async {
+ await Future.delayed(const Duration(milliseconds: 500));
+
+ if (userId.trim().isEmpty) {
+ throw Exception('User ID is required.');
+ }
+ if (password.length < 8) {
+ throw Exception('Password must be at least 8 characters.');
+ }
+ }
+
+ @override
+ Future logout({required String refreshToken}) async {
+ await Future.delayed(const Duration(milliseconds: 250));
+ if (refreshToken.trim().isEmpty) {
+ throw Exception('Refresh token is required.');
+ }
+ }
+}
diff --git a/lib/domain/entities/login_user.dart b/lib/domain/entities/login_user.dart
index c0e1f07..c4ff371 100644
--- a/lib/domain/entities/login_user.dart
+++ b/lib/domain/entities/login_user.dart
@@ -1,17 +1,17 @@
-class LoginUser {
- const LoginUser({
- required this.username,
- required this.token,
- required this.refreshToken,
- required this.role,
- });
-
- final String username;
- final String token;
- final String refreshToken;
- final String role;
-
- bool get isAdmin => role.toLowerCase() == 'admin';
-
- bool get isCashier => role.toLowerCase() == 'cashier';
-}
+class LoginUser {
+ const LoginUser({
+ required this.username,
+ required this.token,
+ required this.refreshToken,
+ required this.role,
+ });
+
+ final String username;
+ final String token;
+ final String refreshToken;
+ final String role;
+
+ bool get isAdmin => role.toLowerCase() == 'admin';
+
+ bool get isCashier => role.toLowerCase() == 'cashier';
+}
diff --git a/lib/domain/entities/merchant.dart b/lib/domain/entities/merchant.dart
index 6482bc0..8d89f08 100644
--- a/lib/domain/entities/merchant.dart
+++ b/lib/domain/entities/merchant.dart
@@ -1,31 +1,31 @@
-class Merchant {
- const Merchant({
- this.id,
- this.name,
- this.mobile,
- this.description,
- this.address,
- this.address2,
- this.address3,
- this.phone,
- this.mids,
- this.createdBy,
- this.updatedBy,
- this.createdAt,
- this.updatedAt,
- });
-
- final String? id;
- final String? name;
- final String? mobile;
- final String? description;
- final String? address;
- final String? address2;
- final String? address3;
- final String? phone;
- final String? mids;
- final String? createdBy;
- final String? updatedBy;
- final String? createdAt;
- final String? updatedAt;
-}
+class Merchant {
+ const Merchant({
+ this.id,
+ this.name,
+ this.mobile,
+ this.description,
+ this.address,
+ this.address2,
+ this.address3,
+ this.phone,
+ this.mids,
+ this.createdBy,
+ this.updatedBy,
+ this.createdAt,
+ this.updatedAt,
+ });
+
+ final String? id;
+ final String? name;
+ final String? mobile;
+ final String? description;
+ final String? address;
+ final String? address2;
+ final String? address3;
+ final String? phone;
+ final String? mids;
+ final String? createdBy;
+ final String? updatedBy;
+ final String? createdAt;
+ final String? updatedAt;
+}
diff --git a/lib/domain/entities/receipt_content.dart b/lib/domain/entities/receipt_content.dart
index 949213a..d0b41bc 100644
--- a/lib/domain/entities/receipt_content.dart
+++ b/lib/domain/entities/receipt_content.dart
@@ -1,18 +1,18 @@
-import 'dart:typed_data';
-
-sealed class ReceiptContent {
- const ReceiptContent();
-}
-
-class ReceiptPdfContent extends ReceiptContent {
- const ReceiptPdfContent(this.bytes);
-
- final Uint8List bytes;
-}
-
-class ReceiptHtmlContent extends ReceiptContent {
- const ReceiptHtmlContent({required this.html, required this.contentType});
-
- final String html;
- final String contentType;
-}
+import 'dart:typed_data';
+
+sealed class ReceiptContent {
+ const ReceiptContent();
+}
+
+class ReceiptPdfContent extends ReceiptContent {
+ const ReceiptPdfContent(this.bytes);
+
+ final Uint8List bytes;
+}
+
+class ReceiptHtmlContent extends ReceiptContent {
+ const ReceiptHtmlContent({required this.html, required this.contentType});
+
+ final String html;
+ final String contentType;
+}
diff --git a/lib/domain/entities/terminal.dart b/lib/domain/entities/terminal.dart
index 246df94..703a981 100644
--- a/lib/domain/entities/terminal.dart
+++ b/lib/domain/entities/terminal.dart
@@ -1,35 +1,35 @@
-class Terminal {
- const Terminal({
- this.id,
- this.serial,
- this.address,
- this.address2,
- this.address3,
- this.name,
- this.appId,
- this.tid,
- this.mids,
- this.merchantId,
- this.status,
- this.totalTransactions,
- this.totalAmount,
- this.createdAt,
- this.updatedAt,
- });
-
- final String? id;
- final String? serial;
- final String? address;
- final String? address2;
- final String? address3;
- final String? name;
- final String? appId;
- final String? tid;
- final List? mids;
- final String? merchantId;
- final String? status;
- final int? totalTransactions;
- final num? totalAmount;
- final String? createdAt;
- final String? updatedAt;
-}
+class Terminal {
+ const Terminal({
+ this.id,
+ this.serial,
+ this.address,
+ this.address2,
+ this.address3,
+ this.name,
+ this.appId,
+ this.tid,
+ this.mids,
+ this.merchantId,
+ this.status,
+ this.totalTransactions,
+ this.totalAmount,
+ this.createdAt,
+ this.updatedAt,
+ });
+
+ final String? id;
+ final String? serial;
+ final String? address;
+ final String? address2;
+ final String? address3;
+ final String? name;
+ final String? appId;
+ final String? tid;
+ final List? mids;
+ final String? merchantId;
+ final String? status;
+ final int? totalTransactions;
+ final num? totalAmount;
+ final String? createdAt;
+ final String? updatedAt;
+}
diff --git a/lib/domain/entities/transaction_record.dart b/lib/domain/entities/transaction_record.dart
index 91f4b12..0bbe64c 100644
--- a/lib/domain/entities/transaction_record.dart
+++ b/lib/domain/entities/transaction_record.dart
@@ -1,19 +1,19 @@
-class TransactionRecord {
- const TransactionRecord({
- this.id,
- this.rrn,
- this.amount,
- this.status,
- this.type,
- this.createdAt,
- this.raw,
- });
-
- final String? id;
- final String? rrn;
- final num? amount;
- final String? status;
- final String? type;
- final String? createdAt;
- final Map? raw;
-}
+class TransactionRecord {
+ const TransactionRecord({
+ this.id,
+ this.rrn,
+ this.amount,
+ this.status,
+ this.type,
+ this.createdAt,
+ this.raw,
+ });
+
+ final String? id;
+ final String? rrn;
+ final num? amount;
+ final String? status;
+ final String? type;
+ final String? createdAt;
+ final Map? raw;
+}
diff --git a/lib/domain/exceptions/auth_exceptions.dart b/lib/domain/exceptions/auth_exceptions.dart
index 02f9832..f42da54 100644
--- a/lib/domain/exceptions/auth_exceptions.dart
+++ b/lib/domain/exceptions/auth_exceptions.dart
@@ -1,13 +1,13 @@
-class PasswordUpdateRequiredException implements Exception {
- const PasswordUpdateRequiredException({
- required this.userId,
- this.message = 'Password update required',
- });
-
- final String userId;
- final String message;
-
- @override
- String toString() => message;
-}
-
+class PasswordUpdateRequiredException implements Exception {
+ const PasswordUpdateRequiredException({
+ required this.userId,
+ this.message = 'Password update required',
+ });
+
+ final String userId;
+ final String message;
+
+ @override
+ String toString() => message;
+}
+
diff --git a/lib/domain/repositories/auth_repository.dart b/lib/domain/repositories/auth_repository.dart
index cb898ec..5c0a4b6 100644
--- a/lib/domain/repositories/auth_repository.dart
+++ b/lib/domain/repositories/auth_repository.dart
@@ -1,15 +1,15 @@
-import 'package:e_receipt_mobile/domain/entities/login_user.dart';
-
-abstract class AuthRepository {
- Future login({required String username, required String password});
-
- Future refreshSession({
- required String username,
- required String refreshToken,
- required String role,
- });
-
- Future resetPassword({required String userId, required String password});
-
- Future logout({required String refreshToken});
-}
+import 'package:e_receipt_mobile/domain/entities/login_user.dart';
+
+abstract class AuthRepository {
+ Future login({required String username, required String password});
+
+ Future refreshSession({
+ required String username,
+ required String refreshToken,
+ required String role,
+ });
+
+ Future resetPassword({required String userId, required String password});
+
+ Future logout({required String refreshToken});
+}
diff --git a/lib/domain/repositories/merchant_repository.dart b/lib/domain/repositories/merchant_repository.dart
index a41a566..df7e8a0 100644
--- a/lib/domain/repositories/merchant_repository.dart
+++ b/lib/domain/repositories/merchant_repository.dart
@@ -1,16 +1,16 @@
-import 'package:e_receipt_mobile/domain/entities/merchant.dart';
-import 'package:e_receipt_mobile/domain/entities/terminal.dart';
-
-abstract class MerchantRepository {
- Future> getMerchants({
- required String token,
- int page = 1,
- int limit = 10,
- String searchTerm = '',
- });
-
- Future> getTerminalsByMerchantId({
- required String token,
- required String merchantId,
- });
-}
+import 'package:e_receipt_mobile/domain/entities/merchant.dart';
+import 'package:e_receipt_mobile/domain/entities/terminal.dart';
+
+abstract class MerchantRepository {
+ Future> getMerchants({
+ required String token,
+ int page = 1,
+ int limit = 10,
+ String searchTerm = '',
+ });
+
+ Future> getTerminalsByMerchantId({
+ required String token,
+ required String merchantId,
+ });
+}
diff --git a/lib/domain/repositories/receipt_repository.dart b/lib/domain/repositories/receipt_repository.dart
index f2f7c52..44a6dd7 100644
--- a/lib/domain/repositories/receipt_repository.dart
+++ b/lib/domain/repositories/receipt_repository.dart
@@ -1,17 +1,17 @@
-import 'dart:typed_data';
-
-import 'package:e_receipt_mobile/domain/entities/receipt_content.dart';
-
-abstract class ReceiptRepository {
- Future getTransactionReceipt({
- required String token,
- required String transactionId,
- required String copyFor,
- });
-
- Future getTransactionReceiptPdfBytes({
- required String token,
- required String transactionId,
- required String copyFor,
- });
-}
+import 'dart:typed_data';
+
+import 'package:e_receipt_mobile/domain/entities/receipt_content.dart';
+
+abstract class ReceiptRepository {
+ Future getTransactionReceipt({
+ required String token,
+ required String transactionId,
+ required String copyFor,
+ });
+
+ Future getTransactionReceiptPdfBytes({
+ required String token,
+ required String transactionId,
+ required String copyFor,
+ });
+}
diff --git a/lib/domain/repositories/transaction_repository.dart b/lib/domain/repositories/transaction_repository.dart
index 105a340..d697a04 100644
--- a/lib/domain/repositories/transaction_repository.dart
+++ b/lib/domain/repositories/transaction_repository.dart
@@ -1,13 +1,13 @@
-import 'package:e_receipt_mobile/domain/entities/transaction_record.dart';
-
-abstract class TransactionRepository {
- Future