update
This commit is contained in:
parent
ecccd4a9bf
commit
2d3f5bd96e
11 changed files with 184 additions and 143 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,3 +1,5 @@
|
|||
import 'dart:developer';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:internet_connection_checker/internet_connection_checker.dart';
|
||||
|
|
@ -14,6 +16,7 @@ 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/textbox_widget.dart';
|
||||
import 'package:pharmacy_mobile/widgets/title_widget.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
|
||||
|
|
@ -29,6 +32,7 @@ class _AddStockPageState extends State<AddStockPage> with WidgetsBindingObserver
|
|||
final _refMedicines = RefMedicines();
|
||||
final _quantityController = TextEditingController();
|
||||
final _dateController = TextEditingController();
|
||||
// final _barcodeController = TextEditingController();
|
||||
final _stocks = Stocks();
|
||||
|
||||
late bool _isLoading = false;
|
||||
|
|
@ -37,6 +41,8 @@ class _AddStockPageState extends State<AddStockPage> with WidgetsBindingObserver
|
|||
late DateTime selectedDate = DateTime.now();
|
||||
late String barcode = '';
|
||||
|
||||
final sampleBarcode = '8992185411017';
|
||||
|
||||
void _getMedicines() async {
|
||||
_medicineList = await _refMedicines.getList();
|
||||
|
||||
|
|
@ -89,21 +95,21 @@ class _AddStockPageState extends State<AddStockPage> with WidgetsBindingObserver
|
|||
|
||||
Future<void> _scanBarcode() async {
|
||||
final scannedBarcode = await barcodeScan(context);
|
||||
final meds = await _getMedicineUsingBarcode(scannedBarcode);
|
||||
|
||||
setState(() {
|
||||
_updateMedicine(scannedBarcode);
|
||||
barcode = meds;
|
||||
});
|
||||
}
|
||||
|
||||
// Future<String> _getMedicineUsingBarcode(String barcode) async {
|
||||
// final encryptedBarcode = await _refMedicines.getBarcode(barcode);
|
||||
// final barcode = decrypt(encryptedBarcode);
|
||||
// return barcode;
|
||||
// }
|
||||
Future<String> _getMedicineUsingBarcode(String barcode) async {
|
||||
final medicine = await _refMedicines.getNameUsingBarcode(barcode);
|
||||
return medicine;
|
||||
}
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
_getMedicines();
|
||||
autoRun();
|
||||
super.initState();
|
||||
}
|
||||
|
||||
|
|
@ -139,18 +145,19 @@ class _AddStockPageState extends State<AddStockPage> with WidgetsBindingObserver
|
|||
color: 'green',
|
||||
child: Form(
|
||||
key: _formKey,
|
||||
child: Center(
|
||||
child: DropdownWrapperMultiWidget(
|
||||
list: _medicineList,
|
||||
text: 'Data',
|
||||
children: [
|
||||
if (barcode.isEmpty)
|
||||
DropDownWidget(
|
||||
label: 'Medicine Name',
|
||||
list: _medicineList,
|
||||
listTitle: 'medicine_name',
|
||||
onChanged: _updateMedicine,
|
||||
// value: _selectedMedicine,
|
||||
),
|
||||
)
|
||||
else
|
||||
TextboxWidget(text: barcode),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
|
|
@ -204,7 +211,6 @@ class _AddStockPageState extends State<AddStockPage> with WidgetsBindingObserver
|
|||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
|
|
|
|||
|
|
@ -134,7 +134,6 @@ class _DeleteStockPageState extends State<DeleteStockPage> {
|
|||
color: 'red',
|
||||
child: Form(
|
||||
key: _formKey,
|
||||
child: Center(
|
||||
child: Column(
|
||||
children: [
|
||||
DropdownWrapperMultiWidget(list: _stockList, text: 'Stocks', children: [
|
||||
|
|
@ -162,7 +161,6 @@ class _DeleteStockPageState extends State<DeleteStockPage> {
|
|||
ButtonWidget(text: 'Remove Stock', onPressed: _saveDeletion)
|
||||
])
|
||||
],
|
||||
),
|
||||
)))
|
||||
]))));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ import 'package:flutter/services.dart';
|
|||
import 'package:go_router/go_router.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/buttonwithprogress_widget.dart';
|
||||
import 'package:pharmacy_mobile/widgets/input_widget.dart';
|
||||
import 'package:pharmacy_mobile/widgets/page_background_widget.dart';
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ 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/buttonwithprogress_widget.dart';
|
||||
import 'package:pharmacy_mobile/widgets/input_widget.dart';
|
||||
import 'package:pharmacy_mobile/widgets/page_background_widget.dart';
|
||||
|
|
|
|||
|
|
@ -45,6 +45,15 @@ class RefMedicines {
|
|||
}
|
||||
}
|
||||
|
||||
Future<String> getNameUsingBarcode(String barcode) async {
|
||||
try {
|
||||
final data = await _supabase.from('ref_medicines').select('medicine_name').eq('barcode', barcode);
|
||||
return data.first['medicine_name'];
|
||||
} catch (e) {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
Future<bool> postMedicine(String uuid, String name, String muuid, String guuid, String tuuid, String barcode) async {
|
||||
final medicine = {
|
||||
'ref_medicines_uuid': uuid,
|
||||
|
|
|
|||
|
|
@ -48,6 +48,12 @@ class DropDownWidget extends StatelessWidget {
|
|||
GoogleFonts.inter(fontSize: 16, fontWeight: FontWeight.w500)))),
|
||||
],
|
||||
onSelected: onChanged,
|
||||
trailingIcon: Icon(
|
||||
Icons.arrow_drop_down_sharp,
|
||||
size: 24,
|
||||
color: Colors.white,
|
||||
),
|
||||
selectedTrailingIcon: Icon(Icons.arrow_drop_up_sharp, size: 24, color: Colors.white),
|
||||
width: MediaQuery.of(context).size.width * 0.9,
|
||||
menuHeight: MediaQuery.of(context).size.height * 0.8,
|
||||
textStyle: GoogleFonts.inter(
|
||||
|
|
|
|||
24
lib/widgets/textbox_widget.dart
Normal file
24
lib/widgets/textbox_widget.dart
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:pharmacy_mobile/widgets/text_widget.dart';
|
||||
|
||||
class TextboxWidget extends StatelessWidget {
|
||||
final String text;
|
||||
|
||||
const TextboxWidget({super.key, required this.text});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
width: MediaQuery.of(context).size.width,
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(color: const Color.fromRGBO(255, 255, 255, 1)),
|
||||
borderRadius: BorderRadius.circular(4),
|
||||
),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 16), // Optional: Adds padding inside the container
|
||||
child: TextWidget(
|
||||
text: text,
|
||||
size: 16,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue