This commit is contained in:
Patrick Alvin Alcala 2025-03-06 12:17:14 +08:00
parent 7749f1100d
commit 1b0241037d
7 changed files with 74 additions and 56 deletions

View file

@ -2,27 +2,27 @@ C/C++ Structured Log
<EFBFBD> <EFBFBD>
/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/arm64-v8a/additional_project_files.txtC /home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/arm64-v8a/additional_project_files.txtC
A A
?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  Òž¬þÕ2  ¢í‡<C3AD>Ñ2€ ?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  â‘äÌÖ2  ¢í‡<C3AD>Ñ2€
~ ~
|/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/arm64-v8a/android_gradle_build.json  Òž¬þÕ2ß £í‡<C3AD>Ñ2‡ |/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/arm64-v8a/android_gradle_build.json  â‘äÌÖ2ß £í‡<C3AD>Ñ2‡
 
<EFBFBD>/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/arm64-v8a/android_gradle_build_mini.json  Òž¬þÕ2ø £í‡<C3AD>Ñ2r <EFBFBD>/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/arm64-v8a/android_gradle_build_mini.json  â‘äÌÖ2ø £í‡<C3AD>Ñ2r
p p
n/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/arm64-v8a/build.ninja  Òž¬þÕ2ߺ —í‡<C3AD>Ñ2v n/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/arm64-v8a/build.ninja  â‘äÌÖ2ߺ —í‡<C3AD>Ñ2v
t t
r/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/arm64-v8a/build.ninja.txt  Òž¬þÕ2{ r/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/arm64-v8a/build.ninja.txt  â‘äÌÖ2{
y y
w/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/arm64-v8a/build_file_index.txt  Óž¬þÕ2 ^ ¥í‡<C3AD>Ñ2| w/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/arm64-v8a/build_file_index.txt  â‘äÌÖ2 ^ ¥í‡<C3AD>Ñ2|
z z
x/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/arm64-v8a/compile_commands.json  Óž¬þÕ2 x/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/arm64-v8a/compile_commands.json  ã‘äÌÖ2
~ ~
|/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/arm64-v8a/compile_commands.json.bin  Óž¬þÕ2 ˆ |/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/arm64-v8a/compile_commands.json.bin  ã‘äÌÖ2 ˆ
 
/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/arm64-v8a/metadata_generation_command.txt  Óž¬þÕ2 /home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/arm64-v8a/metadata_generation_command.txt  ã‘äÌÖ2
ç ¥í‡<C3AD>Ñ2y ç ¥í‡<C3AD>Ñ2y
w w
u/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/arm64-v8a/prefab_config.json  Óž¬þÕ2  ( ¥í‡<C3AD>Ñ2~ u/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/arm64-v8a/prefab_config.json  ã‘äÌÖ2  ( ¥í‡<C3AD>Ñ2~
| |
z/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/arm64-v8a/symbol_folder_index.txt  Óž¬þÕ2  q ¥í‡<C3AD>Ñ2b z/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/arm64-v8a/symbol_folder_index.txt  ã‘äÌÖ2  q ¥í‡<C3AD>Ñ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

View file

@ -2,27 +2,27 @@ C/C++ Structured Log
 
<EFBFBD>/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/armeabi-v7a/additional_project_files.txtC <EFBFBD>/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/armeabi-v7a/additional_project_files.txtC
A A
?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  䞬þÕ2  ·ó‡<C3B3>Ñ2ƒ ?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  Á’äÌÖ2  ·ó‡<C3B3>Ñ2ƒ
 
~/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/armeabi-v7a/android_gradle_build.json  䞬þÕ2ã ¸ó‡<C3B3>Ñ2‰ ~/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/armeabi-v7a/android_gradle_build.json  Á’äÌÖ2ã ¸ó‡<C3B3>Ñ2‰
 
ƒ/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/armeabi-v7a/android_gradle_build_mini.json  䞬þÕ2ü ¸ó‡<C3B3>Ñ2t ƒ/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/armeabi-v7a/android_gradle_build_mini.json  Á’äÌÖ2ü ¸ó‡<C3B3>Ñ2t
r r
p/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/armeabi-v7a/build.ninja  䞬þÕ2éº …ó‡<C3B3>Ñ2x p/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/armeabi-v7a/build.ninja  Á’äÌÖ2éº …ó‡<C3B3>Ñ2x
v v
t/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/armeabi-v7a/build.ninja.txt  䞬þÕ2} t/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/armeabi-v7a/build.ninja.txt  Á’äÌÖ2}
{ {
y/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/armeabi-v7a/build_file_index.txt  䞬þÕ2 ^ ºó‡<C3B3>Ñ2~ y/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/armeabi-v7a/build_file_index.txt  Á’äÌÖ2 ^ ºó‡<C3B3>Ñ2~
| |
z/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/armeabi-v7a/compile_commands.json  䞬þÕ2ƒ z/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/armeabi-v7a/compile_commands.json  Á’äÌÖ2ƒ
 
~/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/armeabi-v7a/compile_commands.json.bin  䞬þÕ2 Š ~/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/armeabi-v7a/compile_commands.json.bin  Á’äÌÖ2 Š
 
/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/armeabi-v7a/metadata_generation_command.txt  䞬þÕ2 /home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/armeabi-v7a/metadata_generation_command.txt  Á’äÌÖ2
ñ ºó‡<C3B3>Ñ2{ ñ ºó‡<C3B3>Ñ2{
y y
w/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/armeabi-v7a/prefab_config.json  䞬þÕ2  ( ºó‡<C3B3>Ñ2€ w/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/armeabi-v7a/prefab_config.json  Á’äÌÖ2  ( ºó‡<C3B3>Ñ2€
~ ~
|/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/armeabi-v7a/symbol_folder_index.txt  䞬þÕ2  s ºó‡<C3B3>Ñ2b |/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/armeabi-v7a/symbol_folder_index.txt  Á’äÌÖ2  s ºó‡<C3B3>Ñ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

View file

@ -2,27 +2,27 @@ C/C++ Structured Log}
{ {
y/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86/additional_project_files.txtC y/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86/additional_project_files.txtC
A A
?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  ýž¬þÕ2  ø‡<C3B8>Ñ2z ?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  á’äÌÖ2  ø‡<C3B8>Ñ2z
x x
v/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86/android_gradle_build.json  ýž¬þÕ2Ó Œø‡<C3B8>Ñ2 v/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86/android_gradle_build.json  á’äÌÖ2Ó Œø‡<C3B8>Ñ2
} }
{/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86/android_gradle_build_mini.json  ýž¬þÕ2ì <20>ø‡<C3B8>Ñ2l {/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86/android_gradle_build_mini.json  á’äÌÖ2ì <20>ø‡<C3B8>Ñ2l
j j
h/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86/build.ninja  ýž¬þÕ2Áº æ÷‡<C3B7>Ñ2p h/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86/build.ninja  á’äÌÖ2Áº æ÷‡<C3B7>Ñ2p
n n
l/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86/build.ninja.txt  ýž¬þÕ2u l/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86/build.ninja.txt  á’äÌÖ2u
s s
q/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86/build_file_index.txt  ýž¬þÕ2 ^ Žø‡<C3B8>Ñ2v q/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86/build_file_index.txt  á’äÌÖ2 ^ Žø‡<C3B8>Ñ2v
t t
r/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86/compile_commands.json  ýž¬þÕ2z r/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86/compile_commands.json  á’äÌÖ2z
x x
v/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86/compile_commands.json.bin  ýž¬þÕ2 v/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86/compile_commands.json.bin  á’äÌÖ2
~ ~
|/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86/metadata_generation_command.txt  ýž¬þÕ2 |/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86/metadata_generation_command.txt  á’äÌÖ2
É Žø‡<C3B8>Ñ2s É Žø‡<C3B8>Ñ2s
q q
o/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86/prefab_config.json  ýž¬þÕ2  ( Žø‡<C3B8>Ñ2x o/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86/prefab_config.json  á’äÌÖ2  ( Žø‡<C3B8>Ñ2x
v v
t/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86/symbol_folder_index.txt  ýž¬þÕ2  k Žø‡<C3B8>Ñ2b t/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86/symbol_folder_index.txt  á’äÌÖ2  k Žø‡<C3B8>Ñ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

View file

@ -2,27 +2,27 @@ C/C++ Structured Log
~ ~
|/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86_64/additional_project_files.txtC |/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86_64/additional_project_files.txtC
A A
?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  ­Ÿ¬þÕ2  ¡ý‡<C3BD>Ñ2} ?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  …“äÌÖ2  ¡ý‡<C3BD>Ñ2}
{ {
y/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86_64/android_gradle_build.json  ­Ÿ¬þÕ2Ù ¡ý‡<C3BD>Ñ2ƒ y/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86_64/android_gradle_build.json  …“äÌÖ2Ù ¡ý‡<C3BD>Ñ2ƒ
 
~/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86_64/android_gradle_build_mini.json  ­Ÿ¬þÕ2ò ¢ý‡<C3BD>Ñ2o ~/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86_64/android_gradle_build_mini.json  …“äÌÖ2ò ¢ý‡<C3BD>Ñ2o
m m
k/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86_64/build.ninja  ­Ÿ¬þÕ2к ý‡<C3BD>Ñ2s k/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86_64/build.ninja  …“äÌÖ2к ý‡<C3BD>Ñ2s
q q
o/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86_64/build.ninja.txt  ­Ÿ¬þÕ2x o/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86_64/build.ninja.txt  …“äÌÖ2x
v v
t/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86_64/build_file_index.txt  ­Ÿ¬þÕ2 ^ ¢ý‡<C3BD>Ñ2y t/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86_64/build_file_index.txt  …“äÌÖ2 ^ ¢ý‡<C3BD>Ñ2y
w w
u/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86_64/compile_commands.json  ­Ÿ¬þÕ2} u/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86_64/compile_commands.json  …“äÌÖ2}
{ {
y/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86_64/compile_commands.json.bin  ­Ÿ¬þÕ2 y/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86_64/compile_commands.json.bin  …“äÌÖ2
<EFBFBD> <EFBFBD>
/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86_64/metadata_generation_command.txt  ­Ÿ¬þÕ2 /home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86_64/metadata_generation_command.txt  …“äÌÖ2
Ø ¢ý‡<C3BD>Ñ2v Ø ¢ý‡<C3BD>Ñ2v
t t
r/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86_64/prefab_config.json  ­Ÿ¬þÕ2  ( ¢ý‡<C3BD>Ñ2{ r/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86_64/prefab_config.json  …“äÌÖ2  ( ¢ý‡<C3BD>Ñ2{
y y
w/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86_64/symbol_folder_index.txt  ­Ÿ¬þÕ2  n ¢ý‡<C3BD>Ñ2b w/home/patrick/Documents/WebApps/pharmacy_mobile/android/app/.cxx/RelWithDebInfo/14495r4k/x86_64/symbol_folder_index.txt  …“äÌÖ2  n ¢ý‡<C3BD>Ñ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

View file

@ -35,7 +35,7 @@ class IndexPage extends StatelessWidget {
const Gap(32), const Gap(32),
Padding( Padding(
padding: const EdgeInsets.fromLTRB(0, 0, 38, 0), padding: const EdgeInsets.fromLTRB(0, 0, 38, 0),
child: const ImageWidget(imagePath: 'assets/ph_logo.webp', size: 192, measureByHeight: false), child: const ImageWidget(imagePath: 'assets/ph_logo.webp', size: 184, measureByHeight: false),
), ),
const Gap(64), const Gap(64),
ButtonWidget(text: 'Login', onPressed: gotoLogin), ButtonWidget(text: 'Login', onPressed: gotoLogin),

View file

@ -126,7 +126,6 @@ class _LoginPageState extends State<LoginPage> {
Padding( Padding(
padding: const EdgeInsets.only(left: 32, right: 32), padding: const EdgeInsets.only(left: 32, right: 32),
child: GlossyContainerWidget( child: GlossyContainerWidget(
// height: containerHeight,
child: Form( child: Form(
child: Column( child: Column(
children: [ children: [

View file

@ -4,11 +4,13 @@ import 'package:gap/gap.dart';
import 'package:go_router/go_router.dart'; import 'package:go_router/go_router.dart';
import 'package:pharmacy_mobile/auth/auth_service.dart'; import 'package:pharmacy_mobile/auth/auth_service.dart';
import 'package:pharmacy_mobile/widgets/button_widget.dart'; import 'package:pharmacy_mobile/widgets/button_widget.dart';
import 'package:pharmacy_mobile/widgets/buttonwithprogress_widget.dart';
import 'package:pharmacy_mobile/widgets/menu_widget.dart'; import 'package:pharmacy_mobile/widgets/menu_widget.dart';
import 'package:pharmacy_mobile/widgets/page_background_widget.dart'; import 'package:pharmacy_mobile/widgets/page_background_widget.dart';
import 'package:pharmacy_mobile/widgets/snackbar_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:pharmacy_mobile/widgets/title_widget.dart'; import 'package:pharmacy_mobile/widgets/title_widget.dart';
import 'package:supabase_flutter/supabase_flutter.dart';
class MainPage extends StatefulWidget { class MainPage extends StatefulWidget {
const MainPage({super.key}); const MainPage({super.key});
@ -20,9 +22,28 @@ class MainPage extends StatefulWidget {
class _MainPageState extends State<MainPage> { class _MainPageState extends State<MainPage> {
final _authService = AuthService(); final _authService = AuthService();
late bool _isLoading = false;
void signOut() async { void signOut() async {
// ignore: use_build_context_synchronously try {
await _authService.signOut().then((_) => {context.go('/'), showNotification(context, 'Logged Out', true)}); setState(() {
_isLoading = true;
});
// ignore: use_build_context_synchronously
await _authService.signOut().then((_) => {context.go('/'), showNotification(context, 'Logged Out', true)});
} catch (e) {
if (e is AuthException) {
final errorMessage = e.message;
if (mounted) {
showNotification(context, 'Error: $errorMessage', false);
}
}
} finally {
setState(() {
_isLoading = false;
});
}
} }
@override @override
@ -109,10 +130,8 @@ class _MainPageState extends State<MainPage> {
onPressed: () => {context.push('/liststocks')}, onPressed: () => {context.push('/liststocks')},
color: 'yellow'), color: 'yellow'),
const Gap(40), const Gap(40),
ButtonWidget( ButtonWithProgressWidget(
text: 'Logout', trigger: _isLoading, progressText: 'Logging Out', buttonText: 'Logout', onPressed: signOut)
onPressed: signOut,
)
], ],
), ),
), ),