update
This commit is contained in:
parent
6a6b5f45fa
commit
5f0d2e60d2
8 changed files with 70 additions and 57 deletions
|
|
@ -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
¤ ˆÈ¼<C388>Ñ2
|
||||
^/home/patrick/fvm/versions/3.29.0/packages/flutter_tools/gradle/src/main/groovy/CMakeLists.txt ÄÑöÝÔ2
¤ ˆÈ¼<C388>Ñ2
|
||||
|
|
@ -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
¤ ˆÈ¼<C388>Ñ2
|
||||
^/home/patrick/fvm/versions/3.29.0/packages/flutter_tools/gradle/src/main/groovy/CMakeLists.txt íÑöÝÔ2
¤ ˆÈ¼<C388>Ñ2
|
||||
|
|
@ -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
¤ ˆÈ¼<C388>Ñ2
|
||||
^/home/patrick/fvm/versions/3.29.0/packages/flutter_tools/gradle/src/main/groovy/CMakeLists.txt µÒöÝÔ2
¤ ˆÈ¼<C388>Ñ2
|
||||
|
|
@ -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
¤ ˆÈ¼<C388>Ñ2
|
||||
^/home/patrick/fvm/versions/3.29.0/packages/flutter_tools/gradle/src/main/groovy/CMakeLists.txt ÄÒöÝÔ2
¤ ˆÈ¼<C388>Ñ2
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:internet_connection_checker/internet_connection_checker.dart';
|
||||
import 'package:pharmacy_mobile/functions/checkexisting_function.dart';
|
||||
import 'package:pharmacy_mobile/tables/ref_categories.dart';
|
||||
import 'package:pharmacy_mobile/widgets/button_widget.dart';
|
||||
import 'package:pharmacy_mobile/widgets/form_border_widget2.dart';
|
||||
|
|
@ -29,6 +30,13 @@ class _AddCategoryPageState extends State<AddCategoryPage> {
|
|||
|
||||
try {
|
||||
if (await InternetConnectionChecker.instance.hasConnection) {
|
||||
final existing = await checkExisting(_refCategories, _categoryController);
|
||||
|
||||
if (existing && mounted) {
|
||||
showNotification(context, 'Category already listed', false);
|
||||
return;
|
||||
}
|
||||
|
||||
final post = await _refCategories.postCategory(_categoryController.text.toUpperCase());
|
||||
|
||||
if (post && mounted) {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import 'package:gap/gap.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:internet_connection_checker/internet_connection_checker.dart';
|
||||
import 'package:pharmacy_mobile/functions/checkexisting_function.dart';
|
||||
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';
|
||||
|
|
@ -50,11 +51,6 @@ class _AddGenericsPageState extends State<AddGenericsPage> {
|
|||
}
|
||||
}
|
||||
|
||||
Future<bool> _checkExisting() async {
|
||||
final uuid = await _refGenericNames.getUUID(_nameController.text);
|
||||
return uuid.isNotEmpty;
|
||||
}
|
||||
|
||||
void autoRun() async {
|
||||
if (await InternetConnectionChecker.instance.hasConnection) {
|
||||
_getList();
|
||||
|
|
@ -80,7 +76,7 @@ class _AddGenericsPageState extends State<AddGenericsPage> {
|
|||
|
||||
try {
|
||||
if (await InternetConnectionChecker.instance.hasConnection) {
|
||||
final existing = await _checkExisting();
|
||||
final existing = await checkExisting(_refGenericNames, _nameController);
|
||||
|
||||
if (existing && mounted) {
|
||||
showNotification(context, 'Generic Name already existing', false);
|
||||
|
|
|
|||
|
|
@ -73,6 +73,7 @@ class _AddStockPageState extends State<AddStockPage> with WidgetsBindingObserver
|
|||
final stockExpiration = _dateController.text;
|
||||
|
||||
await _stocks.postStock(stockNameUUID, stockExpiration, stockQuantity);
|
||||
|
||||
} else {
|
||||
if (mounted) {
|
||||
showNotification(context, 'Error: No Internet Connection', false);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import 'package:gap/gap.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:internet_connection_checker/internet_connection_checker.dart';
|
||||
import 'package:pharmacy_mobile/functions/checkexisting_function.dart';
|
||||
import 'package:pharmacy_mobile/tables/ref_types.dart';
|
||||
import 'package:pharmacy_mobile/widgets/button_widget.dart';
|
||||
import 'package:pharmacy_mobile/widgets/form_border_widget2.dart';
|
||||
|
|
@ -29,10 +30,17 @@ class _AddTypePageState extends State<AddTypePage> {
|
|||
setState(() => _isLoading = true);
|
||||
try {
|
||||
if (await InternetConnectionChecker.instance.hasConnection) {
|
||||
await _refTypes.postType(_typeController.text);
|
||||
final existing = await checkExisting(_refTypes, _typeController);
|
||||
|
||||
if (mounted) {
|
||||
showNotification(context, 'Medicine Type Saved', true);
|
||||
if (existing && mounted) {
|
||||
showNotification(context, 'Medicine type already listed', false);
|
||||
return;
|
||||
}
|
||||
|
||||
final post = await _refTypes.postType(_typeController.text);
|
||||
|
||||
if (post && mounted) {
|
||||
showNotification(context, 'Medicine type saved', true);
|
||||
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
if (mounted) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue