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 058aa0a..bb26302 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 b785511..c133c0d 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 24010ea..600f4c8 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 bc71260..d3eb45c 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/lib/functions/checkexisting_function.dart b/lib/functions/checkexisting_function.dart
new file mode 100644
index 0000000..8ca0d86
--- /dev/null
+++ b/lib/functions/checkexisting_function.dart
@@ -0,0 +1,10 @@
+import 'package:flutter/widgets.dart';
+
+Future<bool> checkExisting(dynamic table, TextEditingController controller) async {
+  try {
+    final uuid = await table.getUUID(controller.text);
+    return uuid.isNotEmpty;
+  } catch (e) {
+    return false;
+  }
+}
diff --git a/lib/pages/add_generics_page.dart b/lib/pages/add_generics_page.dart
index 417f334..1926c86 100644
--- a/lib/pages/add_generics_page.dart
+++ b/lib/pages/add_generics_page.dart
@@ -1,5 +1,3 @@
-import 'dart:developer';
-
 import 'package:gap/gap.dart';
 import 'package:flutter/material.dart';
 import 'package:internet_connection_checker/internet_connection_checker.dart';
@@ -7,7 +5,6 @@ import 'package:pharmacy_mobile/tables/ref_categories.dart';
 import 'package:pharmacy_mobile/tables/ref_generic_names.dart';
 import 'package:pharmacy_mobile/widgets/button_widget.dart';
 import 'package:pharmacy_mobile/widgets/dropdown_widget.dart';
-import 'package:pharmacy_mobile/widgets/form_border_widget.dart';
 import 'package:pharmacy_mobile/widgets/form_border_widget2.dart';
 import 'package:pharmacy_mobile/widgets/input_widget.dart';
 import 'package:pharmacy_mobile/widgets/page_background_widget.dart';
@@ -91,8 +88,6 @@ class _AddGenericsPageState extends State<AddGenericsPage> {
         }
 
         _categoryUUID = await _refCategories.getUUID(_selectedCategory);
-        log('_selectedCategory: $_selectedCategory');
-        log('_categoryUUID: $_categoryUUID');
 
         final post = await _refGenericNames.postGeneric(_nameController.text, _categoryUUID);
 
diff --git a/lib/pages/add_manufactorer.dart b/lib/pages/add_manufactorer.dart
index 0f66b26..f4742c7 100644
--- a/lib/pages/add_manufactorer.dart
+++ b/lib/pages/add_manufactorer.dart
@@ -1,10 +1,14 @@
 import 'package:flutter/material.dart';
 import 'package:gap/gap.dart';
+import 'package:go_router/go_router.dart';
 import 'package:internet_connection_checker/internet_connection_checker.dart';
+import 'package:pharmacy_mobile/functions/checkexisting_function.dart';
+import 'package:pharmacy_mobile/tables/ref_manufactorers.dart';
 import 'package:pharmacy_mobile/widgets/button_widget.dart';
 import 'package:pharmacy_mobile/widgets/form_border_widget2.dart';
 import 'package:pharmacy_mobile/widgets/input_widget.dart';
 import 'package:pharmacy_mobile/widgets/page_background_widget.dart';
+import 'package:pharmacy_mobile/widgets/snackbar_widget.dart';
 import 'package:pharmacy_mobile/widgets/text_widget.dart';
 import 'package:pharmacy_mobile/widgets/title_widget.dart';
 
@@ -19,17 +23,45 @@ class _AddManufactorerPageState extends State<AddManufactorerPage> {
   final _formKey = GlobalKey<FormState>();
   final _nameController = TextEditingController();
   final _addressController = TextEditingController();
+  final _refManufactorers = RefManufactorers();
 
   late bool _isLoading = false;
 
-  void saveManufactorer() async {
+  void _saveManufactorer() async {
     setState(() => _isLoading = true);
 
-    if (await InternetConnectionChecker.instance.hasConnection) {
-      // final existing = await _checkExisting();
-    }
+    try {
+      if (await InternetConnectionChecker.instance.hasConnection) {
+        final existing = await checkExisting(_refManufactorers, _nameController);
 
-    setState(() => _isLoading = false);
+        if (existing && mounted) {
+          showNotification(context, 'Manufactorer already listed', false);
+          return;
+        }
+
+        final post = await _refManufactorers.postManufactorer(_nameController.text, _addressController.text);
+
+        if (post && mounted) {
+          showNotification(context, 'Manufactorer added to list', true);
+
+          WidgetsBinding.instance.addPostFrameCallback((_) {
+            if (mounted) {
+              context.push('/main');
+            }
+          });
+        }
+      } else {
+        if (mounted) {
+          showNotification(context, 'Error: No Internet Connection', false);
+        }
+      }
+    } catch (e) {
+      if (mounted) {
+        showNotification(context, 'Error: $e', false);
+      }
+    } finally {
+      setState(() => _isLoading = false);
+    }
   }
 
   @override
@@ -71,7 +103,7 @@ class _AddManufactorerPageState extends State<AddManufactorerPage> {
                         if (_isLoading)
                           const Center(child: CircularProgressIndicator(color: Colors.white))
                         else
-                          ButtonWidget(text: 'Add', onPressed: saveManufactorer)
+                          ButtonWidget(text: 'Save Manufactorer', onPressed: _saveManufactorer)
                       ],
                     )))
           ],
diff --git a/lib/pages/add_medicine_page.dart b/lib/pages/add_medicine_page.dart
index 13d2893..745e250 100644
--- a/lib/pages/add_medicine_page.dart
+++ b/lib/pages/add_medicine_page.dart
@@ -1,8 +1,4 @@
-import 'dart:convert';
-import 'dart:developer';
-import 'dart:io';
 import 'dart:typed_data';
-
 import 'package:flutter/material.dart';
 import 'package:gap/gap.dart';
 import 'package:image_picker/image_picker.dart';
@@ -60,33 +56,6 @@ class _AddMedicinePageState extends State<AddMedicinePage> {
   late bool imageUploaded = false;
   late String imageUrl = '';
 
-  // void _checkResult(List list, String name) {
-  //   if (list.isEmpty) {
-  //     if (mounted) {
-  //       showNotification(context, 'Error: No $name Found', false);
-
-  //       WidgetsBinding.instance.addPostFrameCallback((_) {
-  //         if (mounted) {
-  //           context.push('/main');
-  //         }
-  //       });
-  //     }
-  //   } else {
-  //     setState(() => {});
-  //   }
-  // }
-
-  // Future<Uint8List> compressFile(XFile file) async {
-  //   var result = await FlutterImageCompress.compressWithFile(
-  //     file.path,
-  //     minWidth: 1020,
-  //     minHeight: 765,
-  //     quality: 90,
-  //     format: CompressFormat.webp,
-  //   );
-  //   return result;
-  // }
-
   Future<void> _getGenerics() async {
     _genericNameList = await _refGenericNames.getList();
     setState(() {
@@ -199,15 +168,16 @@ class _AddMedicinePageState extends State<AddMedicinePage> {
 
     final imageBytes = await image!.readAsBytes();
     final webpImage = await _webpConvert(imageBytes);
+    late bool uploaded = false;
 
     uuid = imageName;
 
     if (mounted) {
-      imageUrl = await _storage.uploadImage(context, storageName, webpImage, '$imageName.webp');
+      uploaded = await _storage.uploadImage(context, storageName, webpImage, '$imageName.webp');
     }
 
     setState(() {
-      if (imageUrl.isEmpty) {
+      if (!uploaded) {
         if (mounted) {
           showNotification(context, 'Image Upload failed, try again.', false);
         }
@@ -218,8 +188,6 @@ class _AddMedicinePageState extends State<AddMedicinePage> {
   Future<Uint8List> _webpConvert(Uint8List file) async {
     final result = await FlutterImageCompress.compressWithList(
       file,
-      // minHeight: 1080,
-      // minWidth: 1080,
       quality: 70,
       rotate: 0,
       keepExif: false,
diff --git a/lib/pages/add_stock_page.dart b/lib/pages/add_stock_page.dart
index a7b88cc..c4b53c3 100644
--- a/lib/pages/add_stock_page.dart
+++ b/lib/pages/add_stock_page.dart
@@ -1,12 +1,8 @@
-import 'dart:developer';
-
 import 'package:flutter/material.dart';
-import 'package:font_awesome_flutter/font_awesome_flutter.dart';
 import 'package:gap/gap.dart';
 import 'package:internet_connection_checker/internet_connection_checker.dart';
 import 'package:pharmacy_mobile/functions/barcode_scan_function.dart';
 import 'package:pharmacy_mobile/functions/checkresult_function.dart';
-import 'package:pharmacy_mobile/security/encryption.dart';
 import 'package:pharmacy_mobile/tables/ref_medicines.dart';
 import 'package:pharmacy_mobile/tables/stocks.dart';
 import 'package:pharmacy_mobile/widgets/button_widget.dart';
@@ -20,7 +16,6 @@ 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';
 
 class AddStockPage extends StatefulWidget {
   const AddStockPage({super.key});
@@ -34,18 +29,16 @@ class _AddStockPageState extends State<AddStockPage> with WidgetsBindingObserver
   final _refMedicines = RefMedicines();
   final _quantityController = TextEditingController();
   final _dateController = TextEditingController();
-  final _medicineController = TextEditingController();
   final _stocks = Stocks();
 
-  final bool _isLoading = false;
-
+  late bool _isLoading = false;
   late List _medicineList = [];
   late String _selectedMedicine = '';
   late DateTime selectedDate = DateTime.now();
   late String barcode = '';
 
   void _getMedicines() async {
-    _medicineList = await _refMedicines.getList2();
+    _medicineList = await _refMedicines.getList();
 
     setState(() {
       checkResult(context, _medicineList, 'Medicines');
@@ -71,11 +64,27 @@ class _AddStockPageState extends State<AddStockPage> with WidgetsBindingObserver
   }
 
   void _saveStock() async {
-    final stockNameUUID = await _refMedicines.getUUID(_selectedMedicine);
-    final stockQuantity = _quantityController.text;
-    final stockExpiration = _dateController.text;
+    setState(() => _isLoading = true);
 
-    await _stocks.postStock(stockNameUUID, stockExpiration, stockQuantity);
+    try {
+      if (await InternetConnectionChecker.instance.hasConnection) {
+        final stockNameUUID = await _refMedicines.getUUID(_selectedMedicine);
+        final stockQuantity = _quantityController.text;
+        final stockExpiration = _dateController.text;
+
+        await _stocks.postStock(stockNameUUID, stockExpiration, stockQuantity);
+      } else {
+        if (mounted) {
+          showNotification(context, 'Error: No Internet Connection', false);
+        }
+      }
+    } catch (e) {
+      if (mounted) {
+        showNotification(context, 'Error: $e', false);
+      }
+    } finally {
+      setState(() => _isLoading = false);
+    }
   }
 
   Future<void> _scanBarcode() async {
@@ -188,12 +197,10 @@ class _AddStockPageState extends State<AddStockPage> with WidgetsBindingObserver
                           value: selectedDate,
                         ),
                         const Gap(32),
-                        ButtonWidget(text: 'Add Stock', onPressed: _saveStock),
-                        const Gap(16),
-                        TextWidget(
-                          text: barcode,
-                          size: 14,
-                        )
+                        if (_isLoading)
+                          const Center(child: CircularProgressIndicator(color: Colors.white))
+                        else
+                          ButtonWidget(text: 'Add Stock', onPressed: _saveStock),
                       ],
                     ),
                   ),
diff --git a/lib/pages/add_type_page.dart b/lib/pages/add_type_page.dart
index 94895a7..b1de282 100644
--- a/lib/pages/add_type_page.dart
+++ b/lib/pages/add_type_page.dart
@@ -3,10 +3,8 @@ import 'package:flutter/material.dart';
 import 'package:internet_connection_checker/internet_connection_checker.dart';
 import 'package:pharmacy_mobile/tables/ref_types.dart';
 import 'package:pharmacy_mobile/widgets/button_widget.dart';
-import 'package:pharmacy_mobile/widgets/form_border_widget.dart';
 import 'package:pharmacy_mobile/widgets/form_border_widget2.dart';
 import 'package:pharmacy_mobile/widgets/input_widget.dart';
-import 'package:pharmacy_mobile/widgets/logo_widget.dart';
 import 'package:pharmacy_mobile/widgets/page_background_widget.dart';
 import 'package:pharmacy_mobile/widgets/snackbar_widget.dart';
 import 'package:pharmacy_mobile/widgets/text_widget.dart';
diff --git a/lib/pages/customer_pages/customer_itemview_page.dart b/lib/pages/customer_pages/customer_itemview_page.dart
index 1fa330b..aa0cc7c 100644
--- a/lib/pages/customer_pages/customer_itemview_page.dart
+++ b/lib/pages/customer_pages/customer_itemview_page.dart
@@ -1,5 +1,4 @@
 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 {
@@ -7,13 +6,13 @@ class CustomerItemviewPage extends StatelessWidget {
 
   @override
   Widget build(BuildContext context) {
-    final storage = Storage();
+    // final storage = Storage();
 
-    void getURL() async {
-      final image = await storage.getPublicURL('ref_medicines_images', 'cb6eafdb-d86f-460a-9571-44446570d4cb.webp');
-      // setState(() {
-      //   imageUrl = image;
-    }
+    // void getURL() async {
+    //   final image = await storage.getPublicURL('ref_medicines_images', 'cb6eafdb-d86f-460a-9571-44446570d4cb.webp');
+    //   // setState(() {
+    //   //   imageUrl = image;
+    // }
 
     return Scaffold(
       body: PageBackgroundWidget(
diff --git a/lib/pages/customer_pages/customer_main_page.dart b/lib/pages/customer_pages/customer_main_page.dart
index e912735..e64b6e7 100644
--- a/lib/pages/customer_pages/customer_main_page.dart
+++ b/lib/pages/customer_pages/customer_main_page.dart
@@ -1,15 +1,9 @@
 import 'package:flutter/material.dart';
 import 'package:gap/gap.dart';
-import 'package:pharmacy_mobile/auth/auth_service.dart';
-import 'package:pharmacy_mobile/widgets/button_widget.dart';
 import 'package:pharmacy_mobile/widgets/consultation_widget.dart';
 import 'package:pharmacy_mobile/widgets/logo_widget.dart';
-import 'package:pharmacy_mobile/widgets/menu_widget.dart';
 import 'package:pharmacy_mobile/widgets/page_background_widget.dart';
-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';
 
 class CustomerMainPage extends StatefulWidget {
   // final NotchBottomBarController? controller;
diff --git a/lib/pages/customer_pages/customer_search_page.dart b/lib/pages/customer_pages/customer_search_page.dart
index 1b70f84..344d8b7 100644
--- a/lib/pages/customer_pages/customer_search_page.dart
+++ b/lib/pages/customer_pages/customer_search_page.dart
@@ -1,17 +1,11 @@
-import 'dart:developer';
-
 import 'package:flutter/material.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/button_widget.dart';
 import 'package:pharmacy_mobile/widgets/input_widget.dart';
 import 'package:pharmacy_mobile/widgets/item_card_widget.dart';
 import 'package:pharmacy_mobile/widgets/logo_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';
 
 class CustomerSearchPage extends StatefulWidget {
   // final NotchBottomBarController? controller;
diff --git a/lib/pages/list_stocks_page.dart b/lib/pages/list_stocks_page.dart
index 3882b56..9ead477 100644
--- a/lib/pages/list_stocks_page.dart
+++ b/lib/pages/list_stocks_page.dart
@@ -1,6 +1,5 @@
 import 'package:flutter/material.dart';
 import 'package:gap/gap.dart';
-import 'package:google_fonts/google_fonts.dart';
 import 'package:intl/intl.dart';
 import 'package:pharmacy_mobile/tables/stocks.dart';
 import 'package:pharmacy_mobile/tables/storage.dart';
@@ -18,7 +17,6 @@ class ListStocksPage extends StatefulWidget {
 
 class _ListStocksPageState extends State<ListStocksPage> {
   final _stocks = Stocks();
-  final _storage = Storage();
 
   late List _stockList = [];
   bool _isLoading = false;
diff --git a/lib/pages/main_page.dart b/lib/pages/main_page.dart
index a03b4ff..460cfb2 100644
--- a/lib/pages/main_page.dart
+++ b/lib/pages/main_page.dart
@@ -53,7 +53,7 @@ class _MainPageState extends State<MainPage> {
                     MenuWidget(
                       icon: FontAwesomeIcons.circlePlus,
                       text: 'Add Manufactorer',
-                      description: 'Add Manufactorer to the record',
+                      description: 'Register manufactorer to the list',
                       onPressed: () => {context.push('/addmanufactorer')},
                       color: 'blue',
                     ),
@@ -61,7 +61,7 @@ class _MainPageState extends State<MainPage> {
                     MenuWidget(
                       icon: FontAwesomeIcons.circlePlus,
                       text: 'Add Type',
-                      description: 'Create a new medical type',
+                      description: 'Register new medical type',
                       onPressed: () => {context.push('/addtype')},
                       color: 'blue',
                     ),
@@ -69,7 +69,7 @@ class _MainPageState extends State<MainPage> {
                     MenuWidget(
                       icon: FontAwesomeIcons.circlePlus,
                       text: 'Add Category',
-                      description: 'Create a new medicine category',
+                      description: 'Register new medicine category',
                       onPressed: () => {context.push('/addcategory')},
                       color: 'blue',
                     ),
@@ -77,35 +77,35 @@ class _MainPageState extends State<MainPage> {
                     MenuWidget(
                         icon: FontAwesomeIcons.circlePlus,
                         text: 'Add Generics',
-                        description: 'Add generic name on the list',
+                        description: 'Register generic name',
                         onPressed: () => {context.push('/addgenerics')},
                         color: 'blue'),
                     const Gap(32),
                     MenuWidget(
                         icon: FontAwesomeIcons.circlePlus,
                         text: 'Add Medicine',
-                        description: 'Add generic name on the list',
+                        description: 'Register medicine to the global list',
                         onPressed: () => {context.push('/addmedicines')},
                         color: 'green'),
                     const Gap(16),
                     MenuWidget(
                         icon: FontAwesomeIcons.circlePlus,
                         text: 'Add Stock',
-                        description: 'Add generic name on the list',
+                        description: 'Add a new stock',
                         onPressed: () => {context.push('/addstock')},
                         color: 'green'),
                     const Gap(32),
                     MenuWidget(
                         icon: Icons.delete,
                         text: 'Remove Stock',
-                        description: 'Add generic name on the list',
+                        description: 'Reduce stock based on purchase',
                         onPressed: () => {context.push('/deletestock')},
                         color: 'red'),
                     const Gap(32),
                     MenuWidget(
                         icon: FontAwesomeIcons.listCheck,
                         text: 'List of Stocks',
-                        description: 'Add generic name on the list',
+                        description: 'View the list of available stocks',
                         onPressed: () => {context.push('/liststocks')},
                         color: 'yellow'),
                     const Gap(40),
diff --git a/lib/pages/register_page.dart b/lib/pages/register_page.dart
index c43ac1e..62be2aa 100644
--- a/lib/pages/register_page.dart
+++ b/lib/pages/register_page.dart
@@ -1,12 +1,9 @@
-import 'dart:developer';
-
 import 'package:flutter/material.dart';
 import 'package:gap/gap.dart';
 import 'package:internet_connection_checker/internet_connection_checker.dart';
 import 'package:pharmacy_mobile/auth/auth_service.dart';
 import 'package:pharmacy_mobile/widgets/button_widget.dart';
 import 'package:pharmacy_mobile/widgets/input_widget.dart';
-import 'package:pharmacy_mobile/widgets/logo_widget.dart';
 import 'package:pharmacy_mobile/widgets/page_background_widget.dart';
 import 'package:pharmacy_mobile/widgets/snackbar_widget.dart';
 import 'package:pharmacy_mobile/widgets/text_widget.dart';
@@ -35,7 +32,6 @@ class _RegisterPageState extends State<RegisterPage> {
     final confirmPassword = _confirmPasswordController.text;
 
     if (email.isEmpty) {
-      log('message');
       if (mounted) {
         showNotification(context, 'Error: Please enter a valid email', false);
       }
diff --git a/lib/tables/ref_generic_names.dart b/lib/tables/ref_generic_names.dart
index 02abfc6..d718081 100644
--- a/lib/tables/ref_generic_names.dart
+++ b/lib/tables/ref_generic_names.dart
@@ -44,13 +44,4 @@ class RefGenericNames {
       return false;
     }
   }
-
-  Future<List> getSample() async {
-    try {
-      final data = await _supabase.from('ref_generic_names').select('''generic_name, ref_categories(category_name)''');
-      return data.toList();
-    } catch (e) {
-      return [];
-    }
-  }
 }
diff --git a/lib/tables/ref_manufactorers.dart b/lib/tables/ref_manufactorers.dart
index 76ebd00..b789739 100644
--- a/lib/tables/ref_manufactorers.dart
+++ b/lib/tables/ref_manufactorers.dart
@@ -1,21 +1,41 @@
 import 'package:supabase_flutter/supabase_flutter.dart';
+import 'package:uuid/uuid.dart';
 
 class RefManufactorers {
   final SupabaseClient _supabase = Supabase.instance.client;
 
   Future<List> getList() async {
-    final data = await _supabase
-        .from('ref_manufactorers')
-        .select('manufactorer_name')
-        .order('manufactorer_name', ascending: true);
-    return data.toList();
+    try {
+      final data = await _supabase
+          .from('ref_manufactorers')
+          .select('manufactorer_name')
+          .order('manufactorer_name', ascending: true);
+      return data.toList();
+    } catch (e) {
+      return [];
+    }
   }
 
   Future<String> getUUID(String name) async {
-    final data =
-        await _supabase.from('ref_manufactorers').select('ref_manufactorers_uuid').eq('manufactorer_name', name);
-    return data.first['ref_manufactorers_uuid'].toString();
+    try {
+      final data =
+          await _supabase.from('ref_manufactorers').select('ref_manufactorers_uuid').eq('manufactorer_name', name);
+      return data.first['ref_manufactorers_uuid'].toString();
+    } catch (e) {
+      return '';
+    }
   }
 
+  Future<bool> postManufactorer(String name, String address) async {
+    try {
+      final genericUUID = Uuid().v4();
 
+      await _supabase
+          .from('ref_manufactorers')
+          .insert({'ref_manufactorers_uuid': genericUUID, 'manufactorer_name': name, 'manufactorer_address': address});
+      return true;
+    } catch (e) {
+      return false;
+    }
+  }
 }
diff --git a/lib/tables/ref_medicines.dart b/lib/tables/ref_medicines.dart
index dd1fdc9..cb5c86e 100644
--- a/lib/tables/ref_medicines.dart
+++ b/lib/tables/ref_medicines.dart
@@ -4,37 +4,48 @@ class RefMedicines {
   final SupabaseClient _supabase = Supabase.instance.client;
 
   Future<List> getList() async {
-    final data = await _supabase.from('ref_medicines').select('medicine_name').order('medicine_name', ascending: true);
-    return data.toList();
-  }
-
-  Future<List> getList2() async {
-    final data = await _supabase
-        .from('ref_medicines')
-        .select('medicine_name, ref_manufactorers(manufactorer_name)')
-        .order('medicine_name', ascending: true);
-    return data.toList();
+    try {
+      final data = await _supabase
+          .from('ref_medicines')
+          .select('medicine_name, ref_manufactorers(manufactorer_name)')
+          .order('medicine_name', ascending: true);
+      return data.toList();
+    } catch (e) {
+      return [];
+    }
   }
 
   Future<List> getListWithUUID() async {
-    final data = await _supabase
-        .from('ref_medicines')
-        .select('ref_medicines_uuid, medicine_name')
-        .order('medicine_name', ascending: true);
-    return data.toList();
+    try {
+      final data = await _supabase
+          .from('ref_medicines')
+          .select('ref_medicines_uuid, medicine_name')
+          .order('medicine_name', ascending: true);
+      return data.toList();
+    } catch (e) {
+      return [];
+    }
   }
 
   Future<String> getUUID(String name) async {
-    final data = await _supabase.from('ref_medicines').select('ref_medicines_uuid').eq('medicine_name', name);
-    return data.first['ref_medicines_uuid'];
+    try {
+      final data = await _supabase.from('ref_medicines').select('ref_medicines_uuid').eq('medicine_name', name);
+      return data.first['ref_medicines_uuid'];
+    } catch (e) {
+      return '';
+    }
   }
 
   Future<String> getBarcode(String name) async {
-    final data = await _supabase.from('ref_medicines').select('barcode').eq('medicine_name', name);
-    return data.first['barcode'];
+    try {
+      final data = await _supabase.from('ref_medicines').select('barcode').eq('medicine_name', name);
+      return data.first['barcode'];
+    } catch (e) {
+      return '';
+    }
   }
 
-  Future<void> postMedicine(String uuid, String name, String muuid, String guuid, String tuuid, String barcode) async {
+  Future<bool> postMedicine(String uuid, String name, String muuid, String guuid, String tuuid, String barcode) async {
     final medicine = {
       'ref_medicines_uuid': uuid,
       'medicine_name': name,
@@ -44,6 +55,11 @@ class RefMedicines {
       'barcode': barcode
     };
 
-    await _supabase.from('ref_medicines').insert(medicine);
+    try {
+      await _supabase.from('ref_medicines').insert(medicine);
+      return true;
+    } catch (e) {
+      return false;
+    }
   }
 }
diff --git a/lib/tables/ref_types.dart b/lib/tables/ref_types.dart
index 67debd1..e2dfaee 100644
--- a/lib/tables/ref_types.dart
+++ b/lib/tables/ref_types.dart
@@ -5,18 +5,31 @@ class RefTypes {
   final SupabaseClient _supabase = Supabase.instance.client;
 
   Future<List> getList() async {
-    final data = await _supabase.from('ref_types').select('type_name').order('type_name', ascending: true);
-    return data.toList();
+    try {
+      final data = await _supabase.from('ref_types').select('type_name').order('type_name', ascending: true);
+      return data.toList();
+    } catch (e) {
+      return [];
+    }
   }
 
   Future<String> getUUID(String name) async {
-    final data = await _supabase.from('ref_types').select('ref_types_uuid').eq('type_name', name);
-    return data.first['ref_types_uuid'].toString();
+    try {
+      final data = await _supabase.from('ref_types').select('ref_types_uuid').eq('type_name', name);
+      return data.first['ref_types_uuid'].toString();
+    } catch (e) {
+      return '';
+    }
   }
 
-  Future<void> postType(String name) async {
+  Future<bool> postType(String name) async {
     final typeUUID = Uuid().v4();
 
-    await _supabase.from('ref_types').insert({'ref_types_uuid': typeUUID, 'type_name': name});
+    try {
+      await _supabase.from('ref_types').insert({'ref_types_uuid': typeUUID, 'type_name': name});
+      return true;
+    } catch (e) {
+      return false;
+    }
   }
 }
diff --git a/lib/tables/stocks.dart b/lib/tables/stocks.dart
index ff4439e..1f5013c 100644
--- a/lib/tables/stocks.dart
+++ b/lib/tables/stocks.dart
@@ -9,31 +9,39 @@ class Stocks {
   Future<List> getList() async {
     List<Map<String, dynamic>> stockData = [];
 
-    final data =
-        await _supabase.from('stocks').select('ref_medicines(medicine_name), expiration_date, quantity, price');
+    try {
+      final data =
+          await _supabase.from('stocks').select('ref_medicines(medicine_name), expiration_date, quantity, price');
 
-    for (var item in data) {
-      stockData.add({
-        'medicine_name': item['ref_medicines']['medicine_name'],
-        'quantity': item['quantity'].toString(),
-        'expiration_date': item['expiration_date'],
-        'price': item['price'],
-      });
+      for (var item in data) {
+        stockData.add({
+          'medicine_name': item['ref_medicines']['medicine_name'],
+          'quantity': item['quantity'].toString(),
+          'expiration_date': item['expiration_date'],
+          'price': item['price'],
+        });
+      }
+
+      return stockData;
+    } catch (e) {
+      return [];
     }
-
-    return stockData;
   }
 
   Future<String> getUUID(String name) async {
-    final medUUID = await _supabase.from('ref_medicines').select('ref_medicines_uuid').eq('medicine_name', name);
-    final data = await _supabase
-        .from('stocks')
-        .select('stocks_uuid')
-        .eq('ref_medicines_uuid', medUUID.first['ref_medicines_uuid']);
-    return data.first['stocks_uuid'].toString();
+    try {
+      final medUUID = await _supabase.from('ref_medicines').select('ref_medicines_uuid').eq('medicine_name', name);
+      final data = await _supabase
+          .from('stocks')
+          .select('stocks_uuid')
+          .eq('ref_medicines_uuid', medUUID.first['ref_medicines_uuid']);
+      return data.first['stocks_uuid'].toString();
+    } catch (e) {
+      return '';
+    }
   }
 
-  Future<void> postStock(String muuid, String name, String quantity) async {
+  Future<bool> postStock(String muuid, String name, String quantity) async {
     final uuid = Uuid().v4();
 
     final stock = {
@@ -43,15 +51,29 @@ class Stocks {
       'quantity': quantity,
     };
 
-    await _supabase.from('stocks').insert(stock);
+    try {
+      await _supabase.from('stocks').insert(stock);
+      return true;
+    } catch (e) {
+      return false;
+    }
   }
 
   Future<String> getQuantity(String uuid) async {
-    final data = await _supabase.from('stocks').select('quantity').eq('stocks_uuid', uuid);
-    return data.first['quantity'].toString();
+    try {
+      final data = await _supabase.from('stocks').select('quantity').eq('stocks_uuid', uuid);
+      return data.first['quantity'].toString();
+    } catch (e) {
+      return '';
+    }
   }
 
-  Future<void> updateStock(String uuid, String column, String value) async {
-    await _supabase.from('stocks').update({column: value}).eq('stocks_uuid', uuid).select();
+  Future<bool> updateStock(String uuid, String column, String value) async {
+    try {
+      await _supabase.from('stocks').update({column: value}).eq('stocks_uuid', uuid).select();
+      return true;
+    } catch (e) {
+      return false;
+    }
   }
 }
diff --git a/lib/tables/storage.dart b/lib/tables/storage.dart
index 4161f46..0d6eb0b 100644
--- a/lib/tables/storage.dart
+++ b/lib/tables/storage.dart
@@ -1,69 +1,47 @@
-import 'dart:convert';
-import 'dart:developer';
-import 'dart:io';
 import 'dart:typed_data';
 import 'package:flutter/material.dart';
-import 'package:image_picker/image_picker.dart';
-import 'package:pharmacy_mobile/widgets/snackbar_widget.dart';
 import 'package:supabase_flutter/supabase_flutter.dart';
 
 class Storage {
   final SupabaseClient _supabase = Supabase.instance.client;
 
-  Future<String> createBucket(String name) async {
+  Future<bool> createBucket(String name) async {
     try {
       final response = await _supabase.storage.createBucket(name);
-      return response;
-    } catch (e, stackTrace) {
-      log('Error creating bucket: $e', stackTrace: stackTrace);
-      rethrow;
-    }
-  }
-
-  Future<List> getList() async {
-    try {
-      final response = await _supabase.storage.listBuckets();
-      return response;
-    } catch (e, stackTrace) {
-      log('Error getting list: $e', stackTrace: stackTrace);
-      rethrow;
-    }
-  }
-
-  Future<void> uploadFile(XFile image, String name) async {
-    try {
-      final imageString = await image.readAsString(encoding: utf8);
-      final imageFile = File(imageString);
-      await _supabase.storage.from('images').upload(name, imageFile);
-      log('upload Complete');
+      return response.isNotEmpty;
     } catch (e) {
-      log('Error getting list: $e');
-      rethrow;
+      return false;
     }
   }
 
-  Future<String> uploadImage(BuildContext context, String storage, Uint8List image, String name) async {
+  Future<bool> uploadImage(BuildContext context, String storage, Uint8List image, String name) async {
     try {
       final imageBytes = image;
       final imagePath = name;
 
       await _supabase.storage.from(storage).uploadBinary(imagePath, imageBytes);
       final imageUrl = _supabase.storage.from(storage).getPublicUrl(imagePath);
-      return imageUrl;
+      return imageUrl.isNotEmpty;
     } catch (e) {
-      // ignore: use_build_context_synchronously
-      showNotification(context, 'Error uploading image: $e', false);
-      rethrow;
+      return false;
     }
   }
 
   Future<Uint8List> downloadImage(String storage, String name) async {
-    final Uint8List file = await _supabase.storage.from(storage).download(name);
-    return file;
+    try {
+      final Uint8List file = await _supabase.storage.from(storage).download(name);
+      return file;
+    } catch (e) {
+      return Uint8List(0);
+    }
   }
 
   Future<String> getPublicURL(String storage, String name) async {
-    final String file = _supabase.storage.from(storage).getPublicUrl(name);
-    return file;
+    try {
+      final String file = _supabase.storage.from(storage).getPublicUrl(name);
+      return file;
+    } catch (e) {
+      return '';
+    }
   }
 }
diff --git a/lib/widgets/datepicker_widget.dart b/lib/widgets/datepicker_widget.dart
index 62cb27a..1f6726f 100644
--- a/lib/widgets/datepicker_widget.dart
+++ b/lib/widgets/datepicker_widget.dart
@@ -3,10 +3,11 @@ import 'package:google_fonts/google_fonts.dart';
 import 'package:gap/gap.dart';
 import 'package:intl/intl.dart';
 
+// ignore: must_be_immutable
 class DatePickerWidget extends StatefulWidget {
   final String label;
   final TextEditingController controller;
-  DateTime value;
+  late DateTime value;
 
   DatePickerWidget({super.key, required this.label, required this.controller, required this.value});
 
diff --git a/lib/widgets/menu_widget.dart b/lib/widgets/menu_widget.dart
index 3fdb86d..8d8377d 100644
--- a/lib/widgets/menu_widget.dart
+++ b/lib/widgets/menu_widget.dart
@@ -35,7 +35,8 @@ class MenuWidget extends StatelessWidget {
     const Color.fromRGBO(104, 156, 59, 0.8),
   ];
 
-  MenuWidget({super.key, required this.text, required this.description, this.icon, this.onPressed, this.color, this.width});
+  MenuWidget(
+      {super.key, required this.text, required this.description, this.icon, this.onPressed, this.color, this.width});
 
   @override
   Widget build(BuildContext context) {
