From 478b8e70f1e2db597a01501574269f089005227c Mon Sep 17 00:00:00 2001 From: Patrick Alvin Alcala Date: Mon, 10 Mar 2025 14:28:24 +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 +-- .../customer_pages/customer_search_page.dart | 188 +++++++++++++++--- lib/tables/ref_medicines.dart | 36 +++- lib/tables/stocks.dart | 2 +- lib/widgets/indicator_widget.dart | 31 +++ lib/widgets/item_card_widget.dart | 64 +++--- pubspec.lock | 8 + pubspec.yaml | 1 + 15 files changed, 374 insertions(+), 148 deletions(-) create mode 100644 lib/widgets/indicator_widget.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 8a104e2..20f618d 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 cb3e68c..393eae6 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 5a75711..7af09f6 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 a462a68..39a4d86 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 af41aaa..b65d189 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 b5c9a5b..9ccb45d 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 3a862fe..3b6a0ab 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 e6be4cf..1075b33 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/lib/pages/customer_pages/customer_search_page.dart b/lib/pages/customer_pages/customer_search_page.dart index 69d3ed5..ee33e07 100644 --- a/lib/pages/customer_pages/customer_search_page.dart +++ b/lib/pages/customer_pages/customer_search_page.dart @@ -1,13 +1,18 @@ import 'dart:developer'; import 'package:flutter/material.dart'; +import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:gap/gap.dart'; +import 'package:pharmacy_mobile/tables/ref_medicines.dart'; import 'package:pharmacy_mobile/tables/stocks.dart'; import 'package:pharmacy_mobile/tables/storage.dart'; import 'package:pharmacy_mobile/widgets/customer_pagebackground_widget.dart'; import 'package:pharmacy_mobile/widgets/customer_title_widget.dart'; +import 'package:pharmacy_mobile/widgets/indicator_widget.dart'; import 'package:pharmacy_mobile/widgets/input_widget.dart'; import 'package:pharmacy_mobile/widgets/item_card_widget.dart'; +import 'package:pharmacy_mobile/widgets/text_widget.dart'; +import 'package:toggle_switch/toggle_switch.dart'; class CustomerSearchPage extends StatefulWidget { const CustomerSearchPage({super.key}); @@ -19,10 +24,12 @@ class CustomerSearchPage extends StatefulWidget { class _CustomerSearchPageState extends State { final _searchController = TextEditingController(); final _storage = Storage(); + final _refMedicines = RefMedicines(); final _stocks = Stocks(); // final _refMedicines = RefMedicines(); late String imageUrl = ''; late List _stockList = []; + late List _medicinesList = []; Future _getURL() async { final image = await _storage.getPublicURL('ref_medicines_images', 'a3e430fe-86c1-4d46-9c6a-aed2dae57fef.webp'); @@ -33,7 +40,10 @@ class _CustomerSearchPageState extends State { Future _getAllStocks() async { _stockList = await _stocks.getList(); - log(_stockList.toString()); + } + + Future _getAllMedicines() async { + _medicinesList = await _refMedicines.getList(); } // void getURLs() async { @@ -58,6 +68,7 @@ class _CustomerSearchPageState extends State { void autoRun() async { await _getAllStocks(); + await _getAllMedicines(); await _getURL(); } @@ -81,7 +92,7 @@ class _CustomerSearchPageState extends State { return Scaffold( body: CustomerPagebackgroundWidget( - height: MediaQuery.of(context).size.height + 350, + height: MediaQuery.of(context).size.height + 600, child: Column( children: [ Column( @@ -102,37 +113,164 @@ class _CustomerSearchPageState extends State { ), ), const Gap(32), - SizedBox( - height: MediaQuery.of(context).size.height + 110, - child: SingleChildScrollView( - child: Column( - children: List.generate(_stockList.length, (index) { - return Padding( - padding: const EdgeInsets.fromLTRB(0, 8, 0, 8), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, + // Row( + // mainAxisAlignment: MainAxisAlignment.end, + // children: [ + // ToggleSwitch( + // fontSize: 12, + // minWidth: 64, + // minHeight: 32, + // initialLabelIndex: 1, + // cornerRadius: 20, + // activeFgColor: Colors.white, + // inactiveBgColor: const Color.fromRGBO(81, 81, 81, 1), + // inactiveFgColor: const Color.fromRGBO(177, 175, 175, 1), + // totalSwitches: 2, + // labels: ['All', 'Stocks'], + // activeBgColors: [ + // [const Color.fromRGBO(40, 112, 143, 1)], + // [const Color.fromRGBO(40, 112, 143, 1)], + // ], + // // onToggle: (index) { + // // print('switched to: $index'); + // // }, + // ), + // const Gap(8) + // ], + // ), + const IndicatorWidget(text: 'All Stocks'), + const Gap(8), + SingleChildScrollView( + scrollDirection: Axis.horizontal, + child: Row( + children: [ + if (imageUrl.isEmpty) + Row( children: [ ItemCardWidget( imageUrl: imageUrl, - text: 'sample', - price: 500, - quantity: 15, - isLoading: imageUrl.isEmpty, + text: 'item[medicine_name]', + price: 123, + quantity: 123, + isLoading: true, ), ItemCardWidget( imageUrl: imageUrl, - text: 'sample', - price: 20, - quantity: 85, - isLoading: imageUrl.isEmpty, + text: 'item[medicine_name]', + price: 123, + quantity: 123, + isLoading: true, ), + ItemCardWidget( + imageUrl: imageUrl, + text: 'item[medicine_name]', + price: 123, + quantity: 123, + isLoading: true, + ) ], - ), - ); - }), - ), - ), - ) + ) + else + for (var item in _stockList) + ItemCardWidget( + imageUrl: imageUrl, + text: item['medicine_name'].toString(), + price: item['price'].toDouble(), + quantity: item['quantity'].toDouble(), + isLoading: false, + ), + ], + )), + const Gap(16), + const IndicatorWidget(text: 'For Fever'), + const Gap(8), + SingleChildScrollView( + scrollDirection: Axis.horizontal, + child: Row( + children: [ + ItemCardWidget( + imageUrl: imageUrl, + text: 'sample', + price: 500, + quantity: 15, + isLoading: imageUrl.isEmpty, + ), + ItemCardWidget( + imageUrl: imageUrl, + text: 'sample', + price: 500, + quantity: 15, + isLoading: imageUrl.isEmpty, + ), + ItemCardWidget( + imageUrl: imageUrl, + text: 'sample', + price: 500, + quantity: 15, + isLoading: imageUrl.isEmpty, + ), + ], + )), + const Gap(16), + const IndicatorWidget(text: 'For Headaches'), + const Gap(8), + SingleChildScrollView( + scrollDirection: Axis.horizontal, + child: Row( + children: [ + ItemCardWidget( + imageUrl: imageUrl, + text: 'sample', + price: 500, + quantity: 15, + isLoading: imageUrl.isEmpty, + ), + ItemCardWidget( + imageUrl: imageUrl, + text: 'sample', + price: 500, + quantity: 15, + isLoading: imageUrl.isEmpty, + ), + ItemCardWidget( + imageUrl: imageUrl, + text: 'sample', + price: 500, + quantity: 15, + isLoading: imageUrl.isEmpty, + ), + ], + )), + const Gap(16), + const IndicatorWidget(text: 'For Colds and Coughes'), + const Gap(8), + SingleChildScrollView( + scrollDirection: Axis.horizontal, + child: Row( + children: [ + ItemCardWidget( + imageUrl: imageUrl, + text: 'sample', + price: 500, + quantity: 15, + isLoading: imageUrl.isEmpty, + ), + ItemCardWidget( + imageUrl: imageUrl, + text: 'sample', + price: 500, + quantity: 15, + isLoading: imageUrl.isEmpty, + ), + ItemCardWidget( + imageUrl: imageUrl, + text: 'sample', + price: 500, + quantity: 15, + isLoading: imageUrl.isEmpty, + ), + ], + )), ], ) ], diff --git a/lib/tables/ref_medicines.dart b/lib/tables/ref_medicines.dart index f35e119..ce0a67f 100644 --- a/lib/tables/ref_medicines.dart +++ b/lib/tables/ref_medicines.dart @@ -4,17 +4,49 @@ class RefMedicines { final SupabaseClient _supabase = Supabase.instance.client; Future getList() async { + List> medicineData = []; + try { final data = await _supabase .from('ref_medicines') - .select('medicine_name, ref_manufactorers(manufactorer_name)') + .select('medicine_name, ref_manufacturers(manufacturer_name)') .order('medicine_name', ascending: true); - return data.toList(); + + for (var item in data) { + medicineData.add({ + 'medicine_name': item['medicine_name'], + 'manufacturer_name': item['ref_manufacturers']['manufacturer_name'], + }); + } + + return medicineData; } catch (e) { return []; } } + // Future getListAsStocks() async { + // List> medicineData = []; + + // try { + // final data = await _supabase + // .from('ref_medicines') + // .select('medicine_name, stocks(manufactorer_name)') + // .order('medicine_name', ascending: true); + + // for (var item in data) { + // medicineData.add({ + // 'medicine_name': item['medicine_name'], + // 'manufacturer_name': item['ref_manufactorers']['manufactorer_name'], + // }); + // } + + // return medicineData; + // } catch (e) { + // return []; + // } + // } + Future getListWithUUID() async { try { final data = await _supabase diff --git a/lib/tables/stocks.dart b/lib/tables/stocks.dart index 97f6b0b..359cec3 100644 --- a/lib/tables/stocks.dart +++ b/lib/tables/stocks.dart @@ -14,7 +14,7 @@ class Stocks { for (var item in data) { stockData.add({ 'medicine_name': item['ref_medicines']['medicine_name'], - 'quantity': item['quantity'].toString(), + 'quantity': item['quantity'], 'expiration_date': item['expiration_date'], 'price': item['price'], }); diff --git a/lib/widgets/indicator_widget.dart b/lib/widgets/indicator_widget.dart new file mode 100644 index 0000000..0c489b4 --- /dev/null +++ b/lib/widgets/indicator_widget.dart @@ -0,0 +1,31 @@ +import 'package:flutter/material.dart'; +import 'package:pharmacy_mobile/widgets/text_widget.dart'; + +class IndicatorWidget extends StatelessWidget { + final String text; + final Color? color; + const IndicatorWidget({super.key, required this.text, this.color}); + + @override + Widget build(BuildContext context) { + return Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Container( + height: 24, + padding: EdgeInsets.symmetric(horizontal: 16), + decoration: BoxDecoration( + border: Border.all(color: color ?? const Color.fromRGBO(249, 249, 249, 1), width: 1), + borderRadius: BorderRadius.circular(20), + color: color ?? const Color.fromRGBO(249, 249, 249, 1)), + alignment: Alignment.center, // Center the text within the container + child: TextWidget( + text: text, + size: 12, + color: const Color.fromRGBO(0, 0, 0, 1), + ), + ), + ], + ); + } +} diff --git a/lib/widgets/item_card_widget.dart b/lib/widgets/item_card_widget.dart index 9d47638..83bdd65 100644 --- a/lib/widgets/item_card_widget.dart +++ b/lib/widgets/item_card_widget.dart @@ -38,30 +38,46 @@ class ItemCardWidget extends StatelessWidget { const Gap(8), Padding( padding: const EdgeInsets.all(8.0), - child: Row(children: [ - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - TextWidget( - text: text, - size: 10, - color: const Color.fromRGBO(0, 0, 0, 1), - bold: true, - ), - TextWidget( - text: text, - size: 16, - color: Colors.black, - ) - ], - ), - const Gap(92), - TextWidget( - text: quantity.toStringAsFixed(0), - size: 12, - color: const Color.fromRGBO(39, 39, 39, 1), - ) - ]), + child: SizedBox( + width: imageSize * 0.9, + child: Row( + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + TextWidget( + text: text, + size: 8, + color: const Color.fromRGBO(0, 0, 0, 1), + bold: true, + ), + TextWidget( + text: text, + size: 12, + color: Colors.black, + ) + ], + ), + Container( + padding: EdgeInsets.all(8), + decoration: BoxDecoration( + color: quantity > 20 + ? const Color.fromRGBO(254, 160, 44, 1) + : const Color.fromRGBO(136, 136, 136, 1), + borderRadius: BorderRadius.circular(20), + border: Border.all(color: const Color.fromRGBO(217, 217, 217, 1)), + ), + child: TextWidget( + text: quantity.toStringAsFixed(0), + size: 12, + color: + quantity > 20 ? const Color.fromRGBO(0, 0, 0, 1) : const Color.fromRGBO(255, 255, 255, 1), + ), + ) + ]), + ), ), const Gap(8), Padding( diff --git a/pubspec.lock b/pubspec.lock index 5653249..d2558e2 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -957,6 +957,14 @@ packages: url: "https://pub.dev" source: hosted version: "0.7.4" + toggle_switch: + dependency: "direct main" + description: + name: toggle_switch + sha256: dca04512d7c23ed320d6c5ede1211a404f177d54d353bf785b07d15546a86ce5 + url: "https://pub.dev" + source: hosted + version: "2.3.0" typed_data: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index a84a176..842ebee 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -26,6 +26,7 @@ dependencies: lazyxchacha: ^1.0.1 pull_to_refresh: ^2.0.0 redacted: ^1.0.13 + toggle_switch: ^2.3.0 dev_dependencies: flutter_test: