From 11fc5c43bf3993c3c85cffa09cd0022a048bf35e Mon Sep 17 00:00:00 2001 From: Patrick Alvin Alcala Date: Tue, 25 Feb 2025 15:18:41 +0800 Subject: [PATCH] update --- .../arm64-v8a/configure_fingerprint.bin | 24 +- .../armeabi-v7a/configure_fingerprint.bin | 24 +- .../k6q1g3c4/x86/configure_fingerprint.bin | 24 +- .../k6q1g3c4/x86_64/configure_fingerprint.bin | 24 +- .../arm64-v8a/configure_fingerprint.bin | 24 +- .../armeabi-v7a/configure_fingerprint.bin | 24 +- .../14495r4k/x86/configure_fingerprint.bin | 24 +- .../14495r4k/x86_64/configure_fingerprint.bin | 24 +- android/app/build.gradle | 1 + android/app/src/main/AndroidManifest.xml | 4 +- android/app/src/profile/AndroidManifest.xml | 1 + android/build.gradle | 1 + .../reports/problems/problems-report.html | 663 ++++++++++++++++++ ios/Runner/Info.plist | 6 + lib/main.dart | 7 +- lib/pages/add_medicine_page.dart | 31 +- lib/pages/add_stock_page.dart | 35 +- .../customer_pages/customer_cart_page.dart | 22 +- .../customer_itemview_page.dart | 31 + .../customer_pages/customer_search_page.dart | 25 + lib/security/encryption.dart | 24 + lib/tables/ref_medicines.dart | 5 +- lib/widgets/dropdown_wrapper_widget.dart | 5 +- lib/widgets/dropdown_wrappermulti_widget.dart | 5 +- lib/widgets/input_widget.dart | 1 + pubspec.lock | 96 +++ pubspec.yaml | 2 + .../flutter/generated_plugin_registrant.cc | 6 + windows/flutter/generated_plugins.cmake | 2 + 29 files changed, 1041 insertions(+), 124 deletions(-) create mode 100644 android/build/reports/problems/problems-report.html create mode 100644 lib/pages/customer_pages/customer_itemview_page.dart create mode 100644 lib/security/encryption.dart diff --git a/android/app/.cxx/Debug/k6q1g3c4/arm64-v8a/configure_fingerprint.bin b/android/app/.cxx/Debug/k6q1g3c4/arm64-v8a/configure_fingerprint.bin index afbc01d..a8d9ac5 100644 --- a/android/app/.cxx/Debug/k6q1g3c4/arm64-v8a/configure_fingerprint.bin +++ b/android/app/.cxx/Debug/k6q1g3c4/arm64-v8a/configure_fingerprint.bin @@ -2,27 +2,27 @@ C/C++ Structured Logz x v/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/arm64-v8a/additional_project_files.txtC A -?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  Ͻ2  2w +?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  Ç2  2w u -s/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/arm64-v8a/android_gradle_build.json  Ͻ2 Ǖ2| +s/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/arm64-v8a/android_gradle_build.json  Ç2 Ǖ2| z -x/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/arm64-v8a/android_gradle_build_mini.json  Ͻ2 򕂎2i +x/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/arm64-v8a/android_gradle_build_mini.json  Ç2 򕂎2i g -e/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/arm64-v8a/build.ninja  Ͻ2 2m +e/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/arm64-v8a/build.ninja  Ç2 2m k -i/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/arm64-v8a/build.ninja.txt  Ͻ2r +i/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/arm64-v8a/build.ninja.txt  Ç2r p -n/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/arm64-v8a/build_file_index.txt  Ͻ2 ^ 2s +n/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/arm64-v8a/build_file_index.txt  Ç2 ^ 2s q -o/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/arm64-v8a/compile_commands.json  Ͻ2w +o/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/arm64-v8a/compile_commands.json  Ç2w u -s/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/arm64-v8a/compile_commands.json.bin  Ͻ2 } +s/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/arm64-v8a/compile_commands.json.bin  Ç2 } { -y/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/arm64-v8a/metadata_generation_command.txt  Ͻ2 +y/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/arm64-v8a/metadata_generation_command.txt  Ç2  2p n -l/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/arm64-v8a/prefab_config.json  Ͻ2  ( 2u +l/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/arm64-v8a/prefab_config.json  Ç2  ( 2u s -q/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/arm64-v8a/symbol_folder_index.txt  Ͻ2  h 2b +q/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/arm64-v8a/symbol_folder_index.txt  Ç2  h 2b ` -^/home/patrick/fvm/versions/3.29.0/packages/flutter_tools/gradle/src/main/groovy/CMakeLists.txt  Ͻ2  ȼ2 \ No newline at end of file +^/home/patrick/fvm/versions/3.29.0/packages/flutter_tools/gradle/src/main/groovy/CMakeLists.txt  Ç2  ȼ2 \ No newline at end of file diff --git a/android/app/.cxx/Debug/k6q1g3c4/armeabi-v7a/configure_fingerprint.bin b/android/app/.cxx/Debug/k6q1g3c4/armeabi-v7a/configure_fingerprint.bin index 6b153f2..6a51c37 100644 --- a/android/app/.cxx/Debug/k6q1g3c4/armeabi-v7a/configure_fingerprint.bin +++ b/android/app/.cxx/Debug/k6q1g3c4/armeabi-v7a/configure_fingerprint.bin @@ -2,27 +2,27 @@ C/C++ Structured Log| z x/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/armeabi-v7a/additional_project_files.txtC A -?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  Ͻ2  2y +?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  Ç2  2y w -u/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/armeabi-v7a/android_gradle_build.json  Ͻ2 2~ +u/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/armeabi-v7a/android_gradle_build.json  Ç2 2~ | -z/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/armeabi-v7a/android_gradle_build_mini.json  Ͻ2 2k +z/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/armeabi-v7a/android_gradle_build_mini.json  Ç2 2k i -g/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/armeabi-v7a/build.ninja  Ͻ2 2o +g/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/armeabi-v7a/build.ninja  Ç2 2o m -k/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/armeabi-v7a/build.ninja.txt  Ͻ2t +k/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/armeabi-v7a/build.ninja.txt  Ç2t r -p/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/armeabi-v7a/build_file_index.txt  Ͻ2 ^ 2u +p/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/armeabi-v7a/build_file_index.txt  Ç2 ^ 2u s -q/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/armeabi-v7a/compile_commands.json  Ͻ2y +q/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/armeabi-v7a/compile_commands.json  Ç2y w -u/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/armeabi-v7a/compile_commands.json.bin  Ͻ2  +u/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/armeabi-v7a/compile_commands.json.bin  Ç2  } -{/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/armeabi-v7a/metadata_generation_command.txt  Ͻ2 +{/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/armeabi-v7a/metadata_generation_command.txt  Ç2  2r p -n/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/armeabi-v7a/prefab_config.json  Ͻ2  ( 2w +n/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/armeabi-v7a/prefab_config.json  Ç2  ( 2w u -s/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/armeabi-v7a/symbol_folder_index.txt  Ͻ2  j 2b +s/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/armeabi-v7a/symbol_folder_index.txt  Ç2  j 2b ` -^/home/patrick/fvm/versions/3.29.0/packages/flutter_tools/gradle/src/main/groovy/CMakeLists.txt  Ͻ2  ȼ2 \ No newline at end of file +^/home/patrick/fvm/versions/3.29.0/packages/flutter_tools/gradle/src/main/groovy/CMakeLists.txt  Ç2  ȼ2 \ No newline at end of file diff --git a/android/app/.cxx/Debug/k6q1g3c4/x86/configure_fingerprint.bin b/android/app/.cxx/Debug/k6q1g3c4/x86/configure_fingerprint.bin index a142207..4dd890c 100644 --- a/android/app/.cxx/Debug/k6q1g3c4/x86/configure_fingerprint.bin +++ b/android/app/.cxx/Debug/k6q1g3c4/x86/configure_fingerprint.bin @@ -2,27 +2,27 @@ C/C++ Structured Logt r p/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/x86/additional_project_files.txtC A -?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  Ͻ2  2q +?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  ć2  2q o -m/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/x86/android_gradle_build.json  Ͻ2 2v +m/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/x86/android_gradle_build.json  ć2 2v t -r/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/x86/android_gradle_build_mini.json  Ͻ2 2c +r/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/x86/android_gradle_build_mini.json  ć2 2c a -_/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/x86/build.ninja  Ͻ2 2g +_/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/x86/build.ninja  ć2 2g e -c/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/x86/build.ninja.txt  Ͻ2l +c/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/x86/build.ninja.txt  ć2l j -h/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/x86/build_file_index.txt  Ͻ2 ^ 2m +h/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/x86/build_file_index.txt  ć2 ^ 2m k -i/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/x86/compile_commands.json  Ͻ2q +i/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/x86/compile_commands.json  ć2q o -m/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/x86/compile_commands.json.bin  Ͻ2 w +m/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/x86/compile_commands.json.bin  ć2 w u -s/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/x86/metadata_generation_command.txt  Ͻ2 +s/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/x86/metadata_generation_command.txt  ć2  2j h -f/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/x86/prefab_config.json  Ͻ2  ( 2o +f/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/x86/prefab_config.json  ć2  ( 2o m -k/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/x86/symbol_folder_index.txt  Ͻ2  b 2b +k/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/x86/symbol_folder_index.txt  ć2  b 2b ` -^/home/patrick/fvm/versions/3.29.0/packages/flutter_tools/gradle/src/main/groovy/CMakeLists.txt  Ͻ2  ȼ2 \ No newline at end of file +^/home/patrick/fvm/versions/3.29.0/packages/flutter_tools/gradle/src/main/groovy/CMakeLists.txt  ć2  ȼ2 \ No newline at end of file diff --git a/android/app/.cxx/Debug/k6q1g3c4/x86_64/configure_fingerprint.bin b/android/app/.cxx/Debug/k6q1g3c4/x86_64/configure_fingerprint.bin index f43566b..37166cf 100644 --- a/android/app/.cxx/Debug/k6q1g3c4/x86_64/configure_fingerprint.bin +++ b/android/app/.cxx/Debug/k6q1g3c4/x86_64/configure_fingerprint.bin @@ -2,27 +2,27 @@ C/C++ Structured Logw u s/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/x86_64/additional_project_files.txtC A -?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  Ͻ2  2t +?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  ć2  2t r -p/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/x86_64/android_gradle_build.json  Ͻ2 2y +p/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/x86_64/android_gradle_build.json  ć2 2y w -u/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/x86_64/android_gradle_build_mini.json  Ͻ2 2f +u/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/x86_64/android_gradle_build_mini.json  ć2 2f d -b/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/x86_64/build.ninja  Ͻ2 2j +b/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/x86_64/build.ninja  ć2 2j h -f/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/x86_64/build.ninja.txt  Ͻ2o +f/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/x86_64/build.ninja.txt  ć2o m -k/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/x86_64/build_file_index.txt  Ͻ2 ^ 2p +k/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/x86_64/build_file_index.txt  ć2 ^ 2p n -l/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/x86_64/compile_commands.json  Ͻ2t +l/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/x86_64/compile_commands.json  ć2t r -p/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/x86_64/compile_commands.json.bin  Ͻ2 z +p/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/x86_64/compile_commands.json.bin  ć2 z x -v/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/x86_64/metadata_generation_command.txt  Ͻ2 +v/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/x86_64/metadata_generation_command.txt  ć2  2m k -i/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/x86_64/prefab_config.json  Ͻ2  ( 2r +i/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/x86_64/prefab_config.json  ć2  ( 2r p -n/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/x86_64/symbol_folder_index.txt  Ͻ2  e 2b +n/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/x86_64/symbol_folder_index.txt  ć2  e 2b ` -^/home/patrick/fvm/versions/3.29.0/packages/flutter_tools/gradle/src/main/groovy/CMakeLists.txt  Ͻ2  ȼ2 \ No newline at end of file +^/home/patrick/fvm/versions/3.29.0/packages/flutter_tools/gradle/src/main/groovy/CMakeLists.txt  ć2  ȼ2 \ No newline at end of file diff --git a/android/app/.cxx/RelWithDebInfo/14495r4k/arm64-v8a/configure_fingerprint.bin b/android/app/.cxx/RelWithDebInfo/14495r4k/arm64-v8a/configure_fingerprint.bin index 7f8493e..27defba 100644 --- a/android/app/.cxx/RelWithDebInfo/14495r4k/arm64-v8a/configure_fingerprint.bin +++ b/android/app/.cxx/RelWithDebInfo/14495r4k/arm64-v8a/configure_fingerprint.bin @@ -2,27 +2,27 @@ C/C++ Structured Log  /home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/arm64-v8a/additional_project_files.txtC A -?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  ӽ2  퇏2 +?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  2  퇏2 ~ -|/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/arm64-v8a/android_gradle_build.json  ӽ2 퇏2 +|/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/arm64-v8a/android_gradle_build.json  2 퇏2  -/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/arm64-v8a/android_gradle_build_mini.json  ӽ2 퇏2r +/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/arm64-v8a/android_gradle_build_mini.json  2 퇏2r p -n/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/arm64-v8a/build.ninja  ӽ2ߺ 퇏2v +n/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/arm64-v8a/build.ninja  2ߺ 퇏2v t -r/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/arm64-v8a/build.ninja.txt  ӽ2{ +r/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/arm64-v8a/build.ninja.txt  2{ y -w/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/arm64-v8a/build_file_index.txt  ӽ2 ^ 퇏2| +w/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/arm64-v8a/build_file_index.txt  2 ^ 퇏2| z -x/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/arm64-v8a/compile_commands.json  ӽ2 +x/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/arm64-v8a/compile_commands.json  2 ~ -|/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/arm64-v8a/compile_commands.json.bin  ӽ2  +|/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/arm64-v8a/compile_commands.json.bin  2   -/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/arm64-v8a/metadata_generation_command.txt  ӽ2 +/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/arm64-v8a/metadata_generation_command.txt  2  퇏2y w -u/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/arm64-v8a/prefab_config.json  ӽ2  ( 퇏2~ +u/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/arm64-v8a/prefab_config.json  2  ( 퇏2~ | -z/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/arm64-v8a/symbol_folder_index.txt  ӽ2  q 퇏2b +z/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/arm64-v8a/symbol_folder_index.txt  2  q 퇏2b ` -^/home/patrick/fvm/versions/3.29.0/packages/flutter_tools/gradle/src/main/groovy/CMakeLists.txt  ӽ2  ȼ2 \ No newline at end of file +^/home/patrick/fvm/versions/3.29.0/packages/flutter_tools/gradle/src/main/groovy/CMakeLists.txt  2  ȼ2 \ No newline at end of file diff --git a/android/app/.cxx/RelWithDebInfo/14495r4k/armeabi-v7a/configure_fingerprint.bin b/android/app/.cxx/RelWithDebInfo/14495r4k/armeabi-v7a/configure_fingerprint.bin index 0c303ea..014e0f1 100644 --- a/android/app/.cxx/RelWithDebInfo/14495r4k/armeabi-v7a/configure_fingerprint.bin +++ b/android/app/.cxx/RelWithDebInfo/14495r4k/armeabi-v7a/configure_fingerprint.bin @@ -2,27 +2,27 @@ C/C++ Structured Log  /home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/armeabi-v7a/additional_project_files.txtC A -?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  ӽ2  2 +?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  2  2  -~/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/armeabi-v7a/android_gradle_build.json  ӽ2 2 +~/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/armeabi-v7a/android_gradle_build.json  2 2  -/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/armeabi-v7a/android_gradle_build_mini.json  ӽ2 2t +/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/armeabi-v7a/android_gradle_build_mini.json  2 2t r -p/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/armeabi-v7a/build.ninja  ӽ2 2x +p/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/armeabi-v7a/build.ninja  2 2x v -t/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/armeabi-v7a/build.ninja.txt  ӽ2} +t/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/armeabi-v7a/build.ninja.txt  2} { -y/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/armeabi-v7a/build_file_index.txt  ӽ2 ^ 2~ +y/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/armeabi-v7a/build_file_index.txt  2 ^ 2~ | -z/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/armeabi-v7a/compile_commands.json  ӽ2 +z/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/armeabi-v7a/compile_commands.json  2  -~/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/armeabi-v7a/compile_commands.json.bin  ӽ2  +~/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/armeabi-v7a/compile_commands.json.bin  2   -/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/armeabi-v7a/metadata_generation_command.txt  ӽ2 +/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/armeabi-v7a/metadata_generation_command.txt  2  2{ y -w/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/armeabi-v7a/prefab_config.json  ӽ2  ( 2 +w/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/armeabi-v7a/prefab_config.json  2  ( 2 ~ -|/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/armeabi-v7a/symbol_folder_index.txt  ӽ2  s 2b +|/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/armeabi-v7a/symbol_folder_index.txt  2  s 2b ` -^/home/patrick/fvm/versions/3.29.0/packages/flutter_tools/gradle/src/main/groovy/CMakeLists.txt  ӽ2  ȼ2 \ No newline at end of file +^/home/patrick/fvm/versions/3.29.0/packages/flutter_tools/gradle/src/main/groovy/CMakeLists.txt  2  ȼ2 \ No newline at end of file diff --git a/android/app/.cxx/RelWithDebInfo/14495r4k/x86/configure_fingerprint.bin b/android/app/.cxx/RelWithDebInfo/14495r4k/x86/configure_fingerprint.bin index 0354007..4b9c4af 100644 --- a/android/app/.cxx/RelWithDebInfo/14495r4k/x86/configure_fingerprint.bin +++ b/android/app/.cxx/RelWithDebInfo/14495r4k/x86/configure_fingerprint.bin @@ -2,27 +2,27 @@ C/C++ Structured Log} { y/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86/additional_project_files.txtC A -?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  ӽ2  2z +?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  2  2z x -v/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86/android_gradle_build.json  ӽ2 2 +v/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86/android_gradle_build.json  2 2 } -{/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86/android_gradle_build_mini.json  ӽ2 2l +{/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86/android_gradle_build_mini.json  2 2l j -h/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86/build.ninja  ӽ2 2p +h/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86/build.ninja  2 2p n -l/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86/build.ninja.txt  ӽ2u +l/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86/build.ninja.txt  2u s -q/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86/build_file_index.txt  ӽ2 ^ 2v +q/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86/build_file_index.txt  2 ^ 2v t -r/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86/compile_commands.json  ӽ2z +r/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86/compile_commands.json  2z x -v/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86/compile_commands.json.bin  ӽ2  +v/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86/compile_commands.json.bin  2  ~ -|/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86/metadata_generation_command.txt  ӽ2 +|/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86/metadata_generation_command.txt  2  2s q -o/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86/prefab_config.json  ӽ2  ( 2x +o/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86/prefab_config.json  2  ( 2x v -t/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86/symbol_folder_index.txt  ӽ2  k 2b +t/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86/symbol_folder_index.txt  2  k 2b ` -^/home/patrick/fvm/versions/3.29.0/packages/flutter_tools/gradle/src/main/groovy/CMakeLists.txt  ӽ2  ȼ2 \ No newline at end of file +^/home/patrick/fvm/versions/3.29.0/packages/flutter_tools/gradle/src/main/groovy/CMakeLists.txt  2  ȼ2 \ No newline at end of file diff --git a/android/app/.cxx/RelWithDebInfo/14495r4k/x86_64/configure_fingerprint.bin b/android/app/.cxx/RelWithDebInfo/14495r4k/x86_64/configure_fingerprint.bin index 2bc9fb9..934e152 100644 --- a/android/app/.cxx/RelWithDebInfo/14495r4k/x86_64/configure_fingerprint.bin +++ b/android/app/.cxx/RelWithDebInfo/14495r4k/x86_64/configure_fingerprint.bin @@ -2,27 +2,27 @@ C/C++ Structured Log ~ |/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86_64/additional_project_files.txtC A -?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  ӽ2  2} +?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  2  2} { -y/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86_64/android_gradle_build.json  ӽ2 2 +y/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86_64/android_gradle_build.json  2 2  -~/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86_64/android_gradle_build_mini.json  ӽ2 2o +~/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86_64/android_gradle_build_mini.json  2 2o m -k/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86_64/build.ninja  ӽ2к 2s +k/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86_64/build.ninja  2к 2s q -o/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86_64/build.ninja.txt  ӽ2x +o/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86_64/build.ninja.txt  2x v -t/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86_64/build_file_index.txt  ӽ2 ^ 2y +t/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86_64/build_file_index.txt  2 ^ 2y w -u/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86_64/compile_commands.json  ӽ2} +u/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86_64/compile_commands.json  2} { -y/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86_64/compile_commands.json.bin  ӽ2  +y/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86_64/compile_commands.json.bin  2   -/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86_64/metadata_generation_command.txt  ӽ2 +/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86_64/metadata_generation_command.txt  2  2v t -r/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86_64/prefab_config.json  ӽ2  ( 2{ +r/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86_64/prefab_config.json  2  ( 2{ y -w/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86_64/symbol_folder_index.txt  ӽ2  n 2b +w/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86_64/symbol_folder_index.txt  2  n 2b ` -^/home/patrick/fvm/versions/3.29.0/packages/flutter_tools/gradle/src/main/groovy/CMakeLists.txt  ӽ2  ȼ2 \ No newline at end of file +^/home/patrick/fvm/versions/3.29.0/packages/flutter_tools/gradle/src/main/groovy/CMakeLists.txt  2  ȼ2 \ No newline at end of file diff --git a/android/app/build.gradle b/android/app/build.gradle index 7b5f438..b1c4c2d 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -42,3 +42,4 @@ android { flutter { source = "../.." } + diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 4d4bef6..acb9adb 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -1,8 +1,9 @@ + + diff --git a/android/app/src/profile/AndroidManifest.xml b/android/app/src/profile/AndroidManifest.xml index 399f698..a3c2a68 100644 --- a/android/app/src/profile/AndroidManifest.xml +++ b/android/app/src/profile/AndroidManifest.xml @@ -4,4 +4,5 @@ to allow setting breakpoints, to provide hot reload, etc. --> + diff --git a/android/build.gradle b/android/build.gradle index d2ffbff..457de89 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -16,3 +16,4 @@ subprojects { tasks.register("clean", Delete) { delete rootProject.buildDir } + diff --git a/android/build/reports/problems/problems-report.html b/android/build/reports/problems/problems-report.html new file mode 100644 index 0000000..d23b31a --- /dev/null +++ b/android/build/reports/problems/problems-report.html @@ -0,0 +1,663 @@ + + + + + + + + + + + + + Gradle Configuration Cache + + + +
+ +
+ Loading... +
+ + + + + + diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist index f4309be..42f0bf0 100644 --- a/ios/Runner/Info.plist +++ b/ios/Runner/Info.plist @@ -45,5 +45,11 @@ UIApplicationSupportsIndirectInputEvents + + diff --git a/lib/main.dart b/lib/main.dart index bfd03f5..d39819c 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -6,6 +6,7 @@ import 'package:pharmacy_mobile/pages/add_medicine_page.dart'; import 'package:pharmacy_mobile/pages/add_stock_page.dart'; import 'package:pharmacy_mobile/pages/add_type_page.dart'; import 'package:pharmacy_mobile/pages/customer_page.dart'; +import 'package:pharmacy_mobile/pages/customer_pages/customer_itemview_page.dart'; import 'package:pharmacy_mobile/pages/delete_stock_page.dart'; import 'package:pharmacy_mobile/pages/list_stocks_page.dart'; import 'package:pharmacy_mobile/pages/login_page.dart'; @@ -92,10 +93,14 @@ final _router = GoRouter( path: '/customer', builder: (context, state) => const CustomerPage(), ), + GoRoute( + name: 'itemview', + path: '/itemview', + builder: (context, state) => const CustomerItemviewPage(), + ), ], ); - class MyApp extends StatelessWidget { const MyApp({super.key}); diff --git a/lib/pages/add_medicine_page.dart b/lib/pages/add_medicine_page.dart index 4b57b72..57862f1 100644 --- a/lib/pages/add_medicine_page.dart +++ b/lib/pages/add_medicine_page.dart @@ -1,3 +1,4 @@ +import 'dart:developer'; import 'dart:io'; import 'dart:typed_data'; @@ -5,6 +6,7 @@ import 'package:flutter/material.dart'; import 'package:gap/gap.dart'; import 'package:image_picker/image_picker.dart'; import 'package:internet_connection_checker/internet_connection_checker.dart'; +import 'package:pharmacy_mobile/security/encryption.dart'; import 'package:pharmacy_mobile/tables/ref_categories.dart'; import 'package:pharmacy_mobile/tables/ref_generic_names.dart'; import 'package:pharmacy_mobile/tables/ref_manufactorers.dart'; @@ -21,6 +23,7 @@ import 'package:pharmacy_mobile/widgets/snackbar_widget.dart'; import 'package:pharmacy_mobile/widgets/text_widget.dart'; import 'package:pharmacy_mobile/widgets/title_widget.dart'; import 'package:go_router/go_router.dart'; +import 'package:simple_barcode_scanner/simple_barcode_scanner.dart'; import 'package:uuid/uuid.dart'; import 'package:flutter_image_compress/flutter_image_compress.dart'; @@ -40,6 +43,7 @@ class _AddMedicinePageState extends State { final _refMedicines = RefMedicines(); final _storage = Storage(); final _nameController = TextEditingController(); + final _barcodeController = TextEditingController(); final FocusNode _focusNode = FocusNode(); bool _isLoading = false; @@ -134,17 +138,37 @@ class _AddMedicinePageState extends State { _selectedManufactorer = manufactorer; } + Future _scanBarcode() async { + String? barcode = await SimpleBarcodeScanner.scanBarcode( + context, + // barcodeAppBar: const BarcodeAppBar( + // // appBarTitle: 'Test', + // // centerTitle: false, + // // enableBackButton: false, + // // backButtonIcon: Icon(Icons.arrow_back_ios), + // ), + // isShowFlashIcon: true, + delayMillis: 2000, + scanType: ScanType.barcode, + cameraFace: CameraFace.back, + ); + _barcodeController.text = barcode != '-1' ? barcode ?? '' : ''; + } + void _saveMedicine() async { setState(() => _isLoading = true); try { + final String encrpytedBarcode = await encrypt(_barcodeController.text); + if (await InternetConnectionChecker.instance.hasConnection) { final medName = _nameController.text; final medGenericUUID = await _refGenericNames.getUUID(_selectedGeneric); final medTypeUUID = await _refTypes.getUUID(_selectedType); final medManufactorerUUID = await _refManufactorer.getUUID(_selectedManufactorer); - await _refMedicines.postMedicine(uuid, medName, medManufactorerUUID, medGenericUUID, medTypeUUID); + await _refMedicines.postMedicine( + uuid, medName, medManufactorerUUID, medGenericUUID, medTypeUUID, encrpytedBarcode); } else { if (mounted) { showNotification(context, 'Error: No Internet Connection', false); @@ -191,6 +215,7 @@ class _AddMedicinePageState extends State { void dispose() { _nameController.dispose(); _focusNode.dispose(); + _barcodeController.dispose(); _genericNameList = []; _selectedGeneric = ''; @@ -245,6 +270,10 @@ class _AddMedicinePageState extends State { list: _manufactorerList, listTitle: 'manufactorer_name', onChanged: _updateManufactorer), + const Gap(16), + InputWidget(label: 'Barcode', controller: _barcodeController), + const Gap(8), + ButtonWidget(text: 'Scan Barcode', onPressed: _scanBarcode), const Gap(32), if (imageUrl.isNotEmpty) Center( diff --git a/lib/pages/add_stock_page.dart b/lib/pages/add_stock_page.dart index 2364e1a..ff0a035 100644 --- a/lib/pages/add_stock_page.dart +++ b/lib/pages/add_stock_page.dart @@ -1,3 +1,5 @@ +import 'dart:developer'; + import 'package:flutter/material.dart'; import 'package:gap/gap.dart'; import 'package:pharmacy_mobile/tables/ref_medicines.dart'; @@ -10,6 +12,7 @@ import 'package:pharmacy_mobile/widgets/input_widget.dart'; import 'package:pharmacy_mobile/widgets/page_background_widget.dart'; import 'package:pharmacy_mobile/widgets/text_widget.dart'; import 'package:pharmacy_mobile/widgets/title_widget.dart'; +import 'package:simple_barcode_scanner/simple_barcode_scanner.dart'; class AddStockPage extends StatefulWidget { const AddStockPage({super.key}); @@ -18,7 +21,7 @@ class AddStockPage extends StatefulWidget { State createState() => _AddStockPageState(); } -class _AddStockPageState extends State { +class _AddStockPageState extends State with WidgetsBindingObserver { final _formKey = GlobalKey(); final FocusNode _focusNode = FocusNode(); final _refMedicines = RefMedicines(); @@ -31,6 +34,7 @@ class _AddStockPageState extends State { late List _medicineList = []; late String _selectedMedicine = ''; late DateTime selectedDate = DateTime.now(); + late String barcode = ''; void autoRun() async { _medicineList = await _refMedicines.getList(); @@ -101,7 +105,34 @@ class _AddStockPageState extends State { value: selectedDate, ), const Gap(32), - ButtonWidget(text: 'Add Stock', onPressed: _saveStock) + ButtonWidget(text: 'Add Stock', onPressed: _saveStock), + const Gap(16), + ButtonWidget( + text: 'Barcode', + onPressed: () async { + String? bc = await SimpleBarcodeScanner.scanBarcode( + context, + // barcodeAppBar: const BarcodeAppBar( + // // appBarTitle: 'Test', + // // centerTitle: false, + // // enableBackButton: false, + // // backButtonIcon: Icon(Icons.arrow_back_ios), + // ), + // isShowFlashIcon: true, + delayMillis: 2000, + scanType: ScanType.barcode, + cameraFace: CameraFace.back, + ); + setState(() { + barcode = bc as String; + }); + }, + ), + const Gap(16), + TextWidget( + text: barcode, + size: 14, + ) ], ), ), diff --git a/lib/pages/customer_pages/customer_cart_page.dart b/lib/pages/customer_pages/customer_cart_page.dart index f2266c3..423a9f2 100644 --- a/lib/pages/customer_pages/customer_cart_page.dart +++ b/lib/pages/customer_pages/customer_cart_page.dart @@ -15,19 +15,15 @@ class CustomerCartPage extends StatelessWidget { body: PageBackgroundWidget( child: Column( children: [ - Column( - children: [ - const Gap(96), - const TitleWidget( - firstTextSize: 14, - secondTextSize: 24, - logoSize: 90, - ), - const Gap(32), - const TextWidget(text: 'My Cart'), - const Gap(16), - ], - ) + const Gap(96), + const TitleWidget( + firstTextSize: 14, + secondTextSize: 24, + logoSize: 90, + ), + const Gap(32), + const TextWidget(text: 'My Cart'), + const Gap(16), ], ))); } diff --git a/lib/pages/customer_pages/customer_itemview_page.dart b/lib/pages/customer_pages/customer_itemview_page.dart new file mode 100644 index 0000000..1fa330b --- /dev/null +++ b/lib/pages/customer_pages/customer_itemview_page.dart @@ -0,0 +1,31 @@ +import 'package:flutter/material.dart'; +import 'package:pharmacy_mobile/tables/storage.dart'; +import 'package:pharmacy_mobile/widgets/page_background_widget.dart'; + +class CustomerItemviewPage extends StatelessWidget { + const CustomerItemviewPage({super.key}); + + @override + Widget build(BuildContext context) { + final storage = Storage(); + + void getURL() async { + final image = await storage.getPublicURL('ref_medicines_images', 'cb6eafdb-d86f-460a-9571-44446570d4cb.webp'); + // setState(() { + // imageUrl = image; + } + + return Scaffold( + body: PageBackgroundWidget( + child: Column( + children: [ + Image.network('imageUrl', + fit: BoxFit.cover, + width: 21, + height: 21 / 1.4, + cacheWidth: (21 * MediaQuery.of(context).devicePixelRatio).round()), + ], + )), + ); + } +} diff --git a/lib/pages/customer_pages/customer_search_page.dart b/lib/pages/customer_pages/customer_search_page.dart index ad97e71..50528e3 100644 --- a/lib/pages/customer_pages/customer_search_page.dart +++ b/lib/pages/customer_pages/customer_search_page.dart @@ -76,6 +76,7 @@ class _CustomerSearchPageState extends State { return Scaffold( body: PageBackgroundWidget( + // height: MediaQuery.of(context).size.height * 2, child: Column( children: [ Column( @@ -121,6 +122,30 @@ class _CustomerSearchPageState extends State { // padding: EdgeInsets.all(8), // ), // ) + Column( + children: [ + Padding( + padding: const EdgeInsets.fromLTRB(0, 8, 0, 8), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + ItemCardWidget( + imageUrl: imageUrl, + text: 'sample', + price: 500, + quantity: 15, + ), + ItemCardWidget( + imageUrl: imageUrl, + text: 'sample', + price: 20, + quantity: 85, + ), + ], + ), + ) + ], + ), Column( children: [ Padding( diff --git a/lib/security/encryption.dart b/lib/security/encryption.dart new file mode 100644 index 0000000..bc2d9de --- /dev/null +++ b/lib/security/encryption.dart @@ -0,0 +1,24 @@ +import 'package:lazyxchacha/keypair.dart' as kp; +import 'package:lazyxchacha/lazyxchacha.dart'; + +final key = kp.KeyPair.newKeyPair(); + +Future encrypt(String text) async { + final lazyxchacha = LazyXChaCha.instance; + final localKey = await key; + + final sharedKey = await localKey.sharedKey(localKey.pk); + final ciphertext = await lazyxchacha.encrypt(text, sharedKey); + + return ciphertext; +} + +Future decrypt(String encrypted) async { + final lazyXChaCha = LazyXChaCha.instance; + final localKey = await key; + + final sharedKey = await localKey.sharedKey(localKey.pk); + final plaintext = await lazyXChaCha.decrypt(encrypted, sharedKey); + + return plaintext; +} diff --git a/lib/tables/ref_medicines.dart b/lib/tables/ref_medicines.dart index 5b41516..8d17369 100644 --- a/lib/tables/ref_medicines.dart +++ b/lib/tables/ref_medicines.dart @@ -29,13 +29,14 @@ class RefMedicines { return data.first['ref_medicines_uuid']; } - Future postMedicine(String uuid, String name, String muuid, String guuid, String tuuid) async { + Future postMedicine(String uuid, String name, String muuid, String guuid, String tuuid, String barcode) async { final medicine = { 'ref_medicines_uuid': uuid, 'medicine_name': name, 'ref_manufactorers_uuid': muuid, 'ref_generic_names_uuid': guuid, - 'ref_types_uuid': tuuid + 'ref_types_uuid': tuuid, + 'barcode': barcode }; await _supabase.from('ref_medicines').insert(medicine); diff --git a/lib/widgets/dropdown_wrapper_widget.dart b/lib/widgets/dropdown_wrapper_widget.dart index 77973eb..d97c063 100644 --- a/lib/widgets/dropdown_wrapper_widget.dart +++ b/lib/widgets/dropdown_wrapper_widget.dart @@ -26,10 +26,7 @@ class DropdownWrapperWidget extends StatelessWidget { spacing: 16, children: [ const CircularProgressIndicator(color: Color.fromRGBO(255, 255, 255, 1)), - TextWidget( - text: 'Fetching $text', - size: 16, - ) + TextWidget(text: 'Fetching $text', size: 16, footer: true) ], ), ], diff --git a/lib/widgets/dropdown_wrappermulti_widget.dart b/lib/widgets/dropdown_wrappermulti_widget.dart index c983445..c7d9e60 100644 --- a/lib/widgets/dropdown_wrappermulti_widget.dart +++ b/lib/widgets/dropdown_wrappermulti_widget.dart @@ -26,10 +26,7 @@ class DropdownWrapperMultiWidget extends StatelessWidget { spacing: 16, children: [ const CircularProgressIndicator(color: Color.fromRGBO(255, 255, 255, 1)), - TextWidget( - text: 'Fetching $text', - size: 16, - ) + TextWidget(text: 'Fetching $text', size: 16, footer: true) ], ), ], diff --git a/lib/widgets/input_widget.dart b/lib/widgets/input_widget.dart index e66fc5c..e1c7a48 100644 --- a/lib/widgets/input_widget.dart +++ b/lib/widgets/input_widget.dart @@ -26,6 +26,7 @@ class InputWidget extends StatelessWidget { )), const Gap(8), TextField( + textInputAction: TextInputAction.go, controller: controller, decoration: InputDecoration( filled: true, diff --git a/pubspec.lock b/pubspec.lock index 717dead..99147d6 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -129,6 +129,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.0.1" + convert: + dependency: transitive + description: + name: convert + sha256: b30acd5944035672bc15c6b7a8b47d773e41e2f17de064350988c5d02adb1c68 + url: "https://pub.dev" + source: hosted + version: "3.1.2" cross_file: dependency: transitive description: @@ -145,6 +153,14 @@ packages: url: "https://pub.dev" source: hosted version: "3.0.6" + cryptography: + dependency: transitive + description: + name: cryptography + sha256: d146b76d33d94548cf035233fbc2f4338c1242fa119013bead807d033fc4ae05 + url: "https://pub.dev" + source: hosted + version: "2.7.0" dbus: dependency: transitive description: @@ -472,6 +488,14 @@ packages: url: "https://pub.dev" source: hosted version: "0.20.2" + js: + dependency: transitive + description: + name: js + sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 + url: "https://pub.dev" + source: hosted + version: "0.6.7" json_annotation: dependency: transitive description: @@ -488,6 +512,14 @@ packages: url: "https://pub.dev" source: hosted version: "0.3.1" + lazyxchacha: + dependency: "direct main" + description: + name: lazyxchacha + sha256: b2a0eaa199ed25e87d3e1accc5c0c3c3c139be07430229877c316c10a15d9919 + url: "https://pub.dev" + source: hosted + version: "1.0.1" leak_tracker: dependency: transitive description: @@ -624,6 +656,54 @@ packages: url: "https://pub.dev" source: hosted version: "2.3.0" + permission_handler: + dependency: transitive + description: + name: permission_handler + sha256: "59adad729136f01ea9e35a48f5d1395e25cba6cea552249ddbe9cf950f5d7849" + url: "https://pub.dev" + source: hosted + version: "11.4.0" + permission_handler_android: + dependency: transitive + description: + name: permission_handler_android + sha256: d3971dcdd76182a0c198c096b5db2f0884b0d4196723d21a866fc4cdea057ebc + url: "https://pub.dev" + source: hosted + version: "12.1.0" + permission_handler_apple: + dependency: transitive + description: + name: permission_handler_apple + sha256: f84a188e79a35c687c132a0a0556c254747a08561e99ab933f12f6ca71ef3c98 + url: "https://pub.dev" + source: hosted + version: "9.4.6" + permission_handler_html: + dependency: transitive + description: + name: permission_handler_html + sha256: "38f000e83355abb3392140f6bc3030660cfaef189e1f87824facb76300b4ff24" + url: "https://pub.dev" + source: hosted + version: "0.1.3+5" + permission_handler_platform_interface: + dependency: transitive + description: + name: permission_handler_platform_interface + sha256: eb99b295153abce5d683cac8c02e22faab63e50679b937fa1bf67d58bb282878 + url: "https://pub.dev" + source: hosted + version: "4.3.0" + permission_handler_windows: + dependency: transitive + description: + name: permission_handler_windows + sha256: "1a790728016f79a41216d88672dbc5df30e686e811ad4e698bfc51f76ad91f1e" + url: "https://pub.dev" + source: hosted + version: "0.2.1" petitparser: dependency: transitive description: @@ -744,6 +824,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.4.1" + simple_barcode_scanner: + dependency: "direct main" + description: + name: simple_barcode_scanner + sha256: "2b6ec05e10fbf4f07687f3687c5cf46d3dcf873492e0a5758211bd957c854113" + url: "https://pub.dev" + source: hosted + version: "0.3.0" sky_engine: dependency: transitive description: flutter @@ -949,6 +1037,14 @@ packages: url: "https://pub.dev" source: hosted version: "3.0.1" + webview_windows: + dependency: transitive + description: + name: webview_windows + sha256: "47fcad5875a45db29dbb5c9e6709bf5c88dcc429049872701343f91ed7255730" + url: "https://pub.dev" + source: hosted + version: "0.4.0" xdg_directories: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index b643751..562e185 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -22,6 +22,8 @@ dependencies: image_picker: ^1.1.2 animated_notch_bottom_bar: ^1.0.3 flutter_image_compress: ^2.4.0 + simple_barcode_scanner: ^0.3.0 + lazyxchacha: ^1.0.1 dev_dependencies: flutter_test: diff --git a/windows/flutter/generated_plugin_registrant.cc b/windows/flutter/generated_plugin_registrant.cc index ab04550..d10720b 100644 --- a/windows/flutter/generated_plugin_registrant.cc +++ b/windows/flutter/generated_plugin_registrant.cc @@ -9,7 +9,9 @@ #include #include #include +#include #include +#include void RegisterPlugins(flutter::PluginRegistry* registry) { AppLinksPluginCApiRegisterWithRegistrar( @@ -18,6 +20,10 @@ void RegisterPlugins(flutter::PluginRegistry* registry) { registry->GetRegistrarForPlugin("ConnectivityPlusWindowsPlugin")); FileSelectorWindowsRegisterWithRegistrar( registry->GetRegistrarForPlugin("FileSelectorWindows")); + PermissionHandlerWindowsPluginRegisterWithRegistrar( + registry->GetRegistrarForPlugin("PermissionHandlerWindowsPlugin")); UrlLauncherWindowsRegisterWithRegistrar( registry->GetRegistrarForPlugin("UrlLauncherWindows")); + WebviewWindowsPluginRegisterWithRegistrar( + registry->GetRegistrarForPlugin("WebviewWindowsPlugin")); } diff --git a/windows/flutter/generated_plugins.cmake b/windows/flutter/generated_plugins.cmake index d1bae2b..be5bb6d 100644 --- a/windows/flutter/generated_plugins.cmake +++ b/windows/flutter/generated_plugins.cmake @@ -6,7 +6,9 @@ list(APPEND FLUTTER_PLUGIN_LIST app_links connectivity_plus file_selector_windows + permission_handler_windows url_launcher_windows + webview_windows ) list(APPEND FLUTTER_FFI_PLUGIN_LIST