update
This commit is contained in:
parent
e3dc94a768
commit
08de65a681
8 changed files with 251 additions and 68 deletions
|
|
@ -2,27 +2,27 @@ C/C++ Structured Logz
|
||||||
x
|
x
|
||||||
v/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/arm64-v8a/additional_project_files.txtC
|
v/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/arm64-v8a/additional_project_files.txtC
|
||||||
A
|
A
|
||||||
?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint Ç×¿ÄØ2 ž•‚ŽÑ2w
|
?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint ™è’Ù2 ž•‚ŽÑ2w
|
||||||
u
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
à ô•‚ŽÑ2p
|
||||||
n
|
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
|
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
|
z
|
||||||
x/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/armeabi-v7a/additional_project_files.txtC
|
x/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/armeabi-v7a/additional_project_files.txtC
|
||||||
A
|
A
|
||||||
?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint œØ¿ÄØ2 ÅÑ2y
|
?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint æ™è’Ù2 ÅÑ2y
|
||||||
w
|
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
|
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
|
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
|
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
|
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
|
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
|
Í ÈÑ2r
|
||||||
p
|
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
|
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
|
r
|
||||||
p/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/x86/additional_project_files.txtC
|
p/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/x86/additional_project_files.txtC
|
||||||
A
|
A
|
||||||
?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint ËØ¿ÄØ2 –ð‚ŽÑ2q
|
?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint ê™è’Ù2 –ð‚ŽÑ2q
|
||||||
o
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
¥ ›ð‚ŽÑ2j
|
||||||
h
|
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
|
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
|
u
|
||||||
s/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/x86_64/additional_project_files.txtC
|
s/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/Debug/k6q1g3c4/x86_64/additional_project_files.txtC
|
||||||
A
|
A
|
||||||
?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint ÒØ¿ÄØ2 ßñ‚ŽÑ2t
|
?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint ï™è’Ù2 ßñ‚ŽÑ2t
|
||||||
r
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
´ âñ‚ŽÑ2m
|
||||||
k
|
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
|
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,15 +1,136 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||||
import 'package:gap/gap.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/auth/auth_service.dart';
|
||||||
|
import 'package:pharmacy_mobile/blocs/guest/functions/bloc_getgueststatus.dart';
|
||||||
|
import 'package:pharmacy_mobile/blocs/guest/functions/bloc_setguestoff.dart';
|
||||||
|
import 'package:pharmacy_mobile/widgets/buttonwithprogress_widget.dart';
|
||||||
import 'package:pharmacy_mobile/widgets/customer_pagebackground_widget.dart';
|
import 'package:pharmacy_mobile/widgets/customer_pagebackground_widget.dart';
|
||||||
import 'package:pharmacy_mobile/widgets/customer_title_widget.dart';
|
import 'package:pharmacy_mobile/widgets/customer_title_widget.dart';
|
||||||
|
import 'package:pharmacy_mobile/widgets/glossy_container_widget.dart';
|
||||||
|
import 'package:pharmacy_mobile/widgets/input_form_widget.dart';
|
||||||
|
import 'package:pharmacy_mobile/widgets/snackbar_widget.dart';
|
||||||
import 'package:pharmacy_mobile/widgets/text_widget.dart';
|
import 'package:pharmacy_mobile/widgets/text_widget.dart';
|
||||||
import 'package:animated_notch_bottom_bar/animated_notch_bottom_bar/animated_notch_bottom_bar.dart';
|
import 'package:animated_notch_bottom_bar/animated_notch_bottom_bar/animated_notch_bottom_bar.dart';
|
||||||
|
import 'package:supabase_flutter/supabase_flutter.dart';
|
||||||
|
|
||||||
class CustomerCartPage extends StatelessWidget {
|
class CustomerCartPage extends StatefulWidget {
|
||||||
final NotchBottomBarController? controller;
|
final NotchBottomBarController? controller;
|
||||||
const CustomerCartPage({super.key, this.controller});
|
const CustomerCartPage({super.key, this.controller});
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<CustomerCartPage> createState() => _CustomerCartPageState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _CustomerCartPageState extends State<CustomerCartPage> {
|
||||||
|
final _emailController = TextEditingController();
|
||||||
|
final _passwordController = TextEditingController();
|
||||||
|
final _authService = AuthService();
|
||||||
|
final _focusNode = FocusNode();
|
||||||
|
bool _isLoading = false;
|
||||||
|
double containerHeight = 0.35;
|
||||||
|
late bool _isGuest = false;
|
||||||
|
|
||||||
|
void checkGuest() async {
|
||||||
|
final isGuest = await blocGetGuestStatus(context);
|
||||||
|
|
||||||
|
setState(() {
|
||||||
|
_isGuest = isGuest;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void _signIn() async {
|
||||||
|
final email = _emailController.text;
|
||||||
|
final password = _passwordController.text;
|
||||||
|
|
||||||
|
if (email.isEmpty) {
|
||||||
|
if (mounted) {
|
||||||
|
showNotification(context, 'Error: Please enter a valid email', false);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (password.isEmpty) {
|
||||||
|
if (mounted) {
|
||||||
|
showNotification(context, 'Error: Please enter a password', false);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
setState(() {
|
||||||
|
_isLoading = true;
|
||||||
|
containerHeight = 0.365;
|
||||||
|
});
|
||||||
|
|
||||||
|
try {
|
||||||
|
if (await InternetConnectionChecker.instance.hasConnection) {
|
||||||
|
await _authService.signIn(email, password);
|
||||||
|
|
||||||
|
final user = _authService.getCurrentUser();
|
||||||
|
|
||||||
|
if (user != null) {
|
||||||
|
// ignore: use_build_context_synchronously
|
||||||
|
final disableGuest = await blocSetGuestOff(context);
|
||||||
|
|
||||||
|
if (disableGuest) {
|
||||||
|
// ignore: use_build_context_synchronously
|
||||||
|
showNotification(context, 'Login Successful', true);
|
||||||
|
|
||||||
|
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||||
|
if (user.contains('admin')) {
|
||||||
|
if (mounted) context.push('/main');
|
||||||
|
} else {
|
||||||
|
if (mounted) context.push('/customer');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
// ignore: use_build_context_synchronously
|
||||||
|
showNotification(context, 'Error: Login failed', false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (mounted) {
|
||||||
|
showNotification(context, 'Error: No Internet Connection', false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
if (e is AuthException) {
|
||||||
|
final errorMessage = e.message;
|
||||||
|
|
||||||
|
if (mounted) {
|
||||||
|
if (errorMessage == 'Invalid login credentials') {
|
||||||
|
showNotification(context, 'Error: Invalid Email or Password', false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} finally {
|
||||||
|
setState(() {
|
||||||
|
_isLoading = false;
|
||||||
|
containerHeight = 0.35;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void autoRun() async {
|
||||||
|
checkGuest();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
autoRun();
|
||||||
|
super.initState();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void dispose() {
|
||||||
|
_emailController.dispose();
|
||||||
|
_passwordController.dispose();
|
||||||
|
_focusNode.dispose();
|
||||||
|
super.dispose();
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
|
|
@ -19,18 +140,76 @@ class CustomerCartPage extends StatelessWidget {
|
||||||
const Gap(68),
|
const Gap(68),
|
||||||
const CustomerTitleWidget(),
|
const CustomerTitleWidget(),
|
||||||
const Gap(32),
|
const Gap(32),
|
||||||
|
if (_isGuest)
|
||||||
|
SizedBox(
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
FaIcon(
|
||||||
|
FontAwesomeIcons.cartShopping,
|
||||||
|
size: 56,
|
||||||
|
color: const Color.fromRGBO(255, 255, 255, 1),
|
||||||
|
),
|
||||||
|
const Gap(16),
|
||||||
|
const TextWidget(
|
||||||
|
text: 'Cart is disabled for guests',
|
||||||
|
size: 16,
|
||||||
|
),
|
||||||
|
const Gap(8),
|
||||||
|
const TextWidget(
|
||||||
|
text: 'Please login',
|
||||||
|
size: 32,
|
||||||
|
),
|
||||||
|
const Gap(8),
|
||||||
|
const TextWidget(
|
||||||
|
text: 'to use your cart',
|
||||||
|
size: 24,
|
||||||
|
),
|
||||||
|
const Gap(32),
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(left: 32, right: 32),
|
||||||
|
child: GlossyContainerWidget(
|
||||||
|
child: Form(
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
InputFormWidget(label: 'Email', controller: _emailController),
|
||||||
|
const Gap(16),
|
||||||
|
InputFormWidget(
|
||||||
|
label: 'Password',
|
||||||
|
controller: _passwordController,
|
||||||
|
password: true,
|
||||||
|
onSubmitted: (String password) {
|
||||||
|
_signIn();
|
||||||
|
},
|
||||||
|
),
|
||||||
|
const Gap(40),
|
||||||
|
ButtonWithProgressWidget(
|
||||||
|
trigger: _isLoading, progressText: 'Logging In', buttonText: 'Login', onPressed: _signIn),
|
||||||
|
],
|
||||||
|
)),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)
|
||||||
|
else
|
||||||
|
SizedBox(
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
FaIcon(
|
||||||
|
FontAwesomeIcons.cartShopping,
|
||||||
|
size: 56,
|
||||||
|
color: const Color.fromRGBO(255, 255, 255, 1),
|
||||||
|
),
|
||||||
|
const Gap(16),
|
||||||
|
const TextWidget(
|
||||||
|
text: 'No items in cart',
|
||||||
|
size: 24,
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)
|
||||||
// const TextWidget(text: 'My Cart'),
|
// const TextWidget(text: 'My Cart'),
|
||||||
// const Gap(16),
|
// const Gap(16),
|
||||||
FaIcon(
|
|
||||||
FontAwesomeIcons.cartShopping,
|
|
||||||
size: 56,
|
|
||||||
color: const Color.fromRGBO(255, 255, 255, 1),
|
|
||||||
),
|
|
||||||
const Gap(16),
|
|
||||||
const TextWidget(
|
|
||||||
text: 'No items in cart',
|
|
||||||
size: 24,
|
|
||||||
)
|
|
||||||
],
|
],
|
||||||
)));
|
)));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,7 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
|
||||||
import 'package:go_router/go_router.dart';
|
import 'package:go_router/go_router.dart';
|
||||||
import 'package:gap/gap.dart';
|
import 'package:gap/gap.dart';
|
||||||
import 'package:pharmacy_mobile/blocs/guest/functions/bloc_setgueston.dart';
|
import 'package:pharmacy_mobile/blocs/guest/functions/bloc_setgueston.dart';
|
||||||
import 'package:pharmacy_mobile/blocs/guest/guest_bloc.dart';
|
|
||||||
import 'package:pharmacy_mobile/blocs/guest/guest_event.dart';
|
|
||||||
import 'package:pharmacy_mobile/widgets/button_widget.dart';
|
import 'package:pharmacy_mobile/widgets/button_widget.dart';
|
||||||
import 'package:pharmacy_mobile/widgets/image_widget.dart';
|
import 'package:pharmacy_mobile/widgets/image_widget.dart';
|
||||||
import 'package:pharmacy_mobile/widgets/page_background_widget.dart';
|
import 'package:pharmacy_mobile/widgets/page_background_widget.dart';
|
||||||
|
|
@ -53,12 +50,12 @@ class IndexPage extends StatelessWidget {
|
||||||
ButtonWidget(text: 'Login', onPressed: gotoLogin),
|
ButtonWidget(text: 'Login', onPressed: gotoLogin),
|
||||||
const Gap(8),
|
const Gap(8),
|
||||||
ButtonWidget(text: 'Register', onPressed: gotoRegister, outline: true),
|
ButtonWidget(text: 'Register', onPressed: gotoRegister, outline: true),
|
||||||
const Gap(16),
|
const Gap(32),
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: loginAsGuest,
|
onTap: loginAsGuest,
|
||||||
child: const TextWidget(
|
child: const TextWidget(
|
||||||
text: "Login as Guest",
|
text: "Login as Guest",
|
||||||
size: 12,
|
size: 16,
|
||||||
underlined: true,
|
underlined: true,
|
||||||
color: Color.fromRGBO(198, 133, 232, 1),
|
color: Color.fromRGBO(198, 133, 232, 1),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@ import 'package:flutter/material.dart';
|
||||||
import 'package:go_router/go_router.dart';
|
import 'package:go_router/go_router.dart';
|
||||||
import 'package:gap/gap.dart';
|
import 'package:gap/gap.dart';
|
||||||
import 'package:pharmacy_mobile/auth/auth_service.dart';
|
import 'package:pharmacy_mobile/auth/auth_service.dart';
|
||||||
import 'package:pharmacy_mobile/blocs/guest/functions/bloc_getgueststatus.dart';
|
|
||||||
import 'package:pharmacy_mobile/blocs/guest/functions/bloc_setguestoff.dart';
|
import 'package:pharmacy_mobile/blocs/guest/functions/bloc_setguestoff.dart';
|
||||||
import 'package:pharmacy_mobile/widgets/buttonwithprogress_widget.dart';
|
import 'package:pharmacy_mobile/widgets/buttonwithprogress_widget.dart';
|
||||||
import 'package:pharmacy_mobile/widgets/glossy_container_widget.dart';
|
import 'package:pharmacy_mobile/widgets/glossy_container_widget.dart';
|
||||||
|
|
@ -69,9 +68,9 @@ class _LoginPageState extends State<LoginPage> {
|
||||||
|
|
||||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||||
if (user.contains('admin')) {
|
if (user.contains('admin')) {
|
||||||
if (mounted) context.push('/main');
|
if (mounted) context.go('/main');
|
||||||
} else {
|
} else {
|
||||||
if (mounted) context.push('/customer');
|
if (mounted) context.go('/customer');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,15 @@ class GlossyContainerWidget extends StatelessWidget {
|
||||||
width: MediaQuery.of(context).size.width,
|
width: MediaQuery.of(context).size.width,
|
||||||
borderRadius: const BorderRadius.all(Radius.circular(16)),
|
borderRadius: const BorderRadius.all(Radius.circular(16)),
|
||||||
color: const Color.fromRGBO(20, 13, 22, 1),
|
color: const Color.fromRGBO(20, 13, 22, 1),
|
||||||
border: Border.all(width: 0, color: const Color.fromRGBO(169, 132, 172, 1)),
|
border: Border.all(width: 0, color: const Color.fromRGBO(216, 176, 219, 1)),
|
||||||
|
boxShadow: [
|
||||||
|
BoxShadow(
|
||||||
|
color: const Color.fromRGBO(78, 45, 79, 0.4),
|
||||||
|
spreadRadius: 1,
|
||||||
|
blurRadius: 4,
|
||||||
|
offset: const Offset(0, 3), // changes position of shadow
|
||||||
|
),
|
||||||
|
],
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.fromLTRB(32, 32, 32, 40),
|
padding: const EdgeInsets.fromLTRB(32, 32, 32, 40),
|
||||||
child: child,
|
child: child,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue