diff --git a/android/app/.cxx/Debug/4y161to1/arm64-v8a/configure_fingerprint.bin b/android/app/.cxx/Debug/4y161to1/arm64-v8a/configure_fingerprint.bin
index a96daedc..a3dd0491 100644
--- a/android/app/.cxx/Debug/4y161to1/arm64-v8a/configure_fingerprint.bin
+++ b/android/app/.cxx/Debug/4y161to1/arm64-v8a/configure_fingerprint.bin
@@ -2,27 +2,27 @@ C/C++ Structured Log}
{
y/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/arm64-v8a/additional_project_files.txtC
A
-?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint 3 2z
+?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint Հ3 2z
x
-v/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/arm64-v8a/android_gradle_build.json 3 2
+v/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/arm64-v8a/android_gradle_build.json Հ3 2
}
-{/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/arm64-v8a/android_gradle_build_mini.json 3 2l
+{/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/arm64-v8a/android_gradle_build_mini.json Հ3 2l
j
-h/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/arm64-v8a/build.ninja 3 2p
+h/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/arm64-v8a/build.ninja Հ3 2p
n
-l/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/arm64-v8a/build.ninja.txt 3u
+l/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/arm64-v8a/build.ninja.txt Հ3u
s
-q/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/arm64-v8a/build_file_index.txt 3
_ 2v
+q/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/arm64-v8a/build_file_index.txt Հ3
_ 2v
t
-r/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/arm64-v8a/compile_commands.json 3z
+r/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/arm64-v8a/compile_commands.json Հ3z
x
-v/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/arm64-v8a/compile_commands.json.bin 3
+v/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/arm64-v8a/compile_commands.json.bin Հ3
~
-|/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/arm64-v8a/metadata_generation_command.txt 3
+|/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/arm64-v8a/metadata_generation_command.txt Հ3
2s
q
-o/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/arm64-v8a/prefab_config.json 3
( 2x
+o/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/arm64-v8a/prefab_config.json Հ3
( 2x
v
-t/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/arm64-v8a/symbol_folder_index.txt 3
k 2c
+t/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/arm64-v8a/symbol_folder_index.txt Հ3
k 2c
a
-_/Users/venbateam/Documents/flutter/packages/flutter_tools/gradle/src/main/groovy/CMakeLists.txt 3
ހ2
\ No newline at end of file
+_/Users/venbateam/Documents/flutter/packages/flutter_tools/gradle/src/main/groovy/CMakeLists.txt Հ3
ހ2
\ No newline at end of file
diff --git a/android/app/.cxx/Debug/4y161to1/armeabi-v7a/configure_fingerprint.bin b/android/app/.cxx/Debug/4y161to1/armeabi-v7a/configure_fingerprint.bin
index 7a4ff335..c181438a 100644
--- a/android/app/.cxx/Debug/4y161to1/armeabi-v7a/configure_fingerprint.bin
+++ b/android/app/.cxx/Debug/4y161to1/armeabi-v7a/configure_fingerprint.bin
@@ -2,27 +2,27 @@ C/C++ Structured Log
}
{/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/armeabi-v7a/additional_project_files.txtC
A
-?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint 3 2|
+?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint Հ3 2|
z
-x/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/armeabi-v7a/android_gradle_build.json 3 2
+x/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/armeabi-v7a/android_gradle_build.json Հ3 2
-}/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/armeabi-v7a/android_gradle_build_mini.json 3 2n
+}/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/armeabi-v7a/android_gradle_build_mini.json Հ3 2n
l
-j/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/armeabi-v7a/build.ninja 3 2r
+j/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/armeabi-v7a/build.ninja Հ3 2r
p
-n/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/armeabi-v7a/build.ninja.txt 3w
+n/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/armeabi-v7a/build.ninja.txt Հ3w
u
-s/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/armeabi-v7a/build_file_index.txt 3
_ 2x
+s/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/armeabi-v7a/build_file_index.txt Հ3
_ 2x
v
-t/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/armeabi-v7a/compile_commands.json 3|
+t/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/armeabi-v7a/compile_commands.json Հ3|
z
-x/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/armeabi-v7a/compile_commands.json.bin 3
+x/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/armeabi-v7a/compile_commands.json.bin Հ3
-~/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/armeabi-v7a/metadata_generation_command.txt 3
+~/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/armeabi-v7a/metadata_generation_command.txt Հ3
2u
s
-q/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/armeabi-v7a/prefab_config.json 3
( 2z
+q/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/armeabi-v7a/prefab_config.json Հ3
( 2z
x
-v/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/armeabi-v7a/symbol_folder_index.txt 3
m 2c
+v/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/armeabi-v7a/symbol_folder_index.txt Հ3
m 2c
a
-_/Users/venbateam/Documents/flutter/packages/flutter_tools/gradle/src/main/groovy/CMakeLists.txt 3
ހ2
\ No newline at end of file
+_/Users/venbateam/Documents/flutter/packages/flutter_tools/gradle/src/main/groovy/CMakeLists.txt Հ3
ހ2
\ No newline at end of file
diff --git a/android/app/.cxx/Debug/4y161to1/x86/configure_fingerprint.bin b/android/app/.cxx/Debug/4y161to1/x86/configure_fingerprint.bin
index 0dd5d4eb..c4cb9a5f 100644
--- a/android/app/.cxx/Debug/4y161to1/x86/configure_fingerprint.bin
+++ b/android/app/.cxx/Debug/4y161to1/x86/configure_fingerprint.bin
@@ -2,27 +2,27 @@ C/C++ Structured Logw
u
s/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/x86/additional_project_files.txtC
A
-?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint 3 2t
+?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint Հ3 2t
r
-p/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/x86/android_gradle_build.json 3 2y
+p/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/x86/android_gradle_build.json Հ3 2y
w
-u/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/x86/android_gradle_build_mini.json 3 2f
+u/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/x86/android_gradle_build_mini.json Հ3 2f
d
-b/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/x86/build.ninja 3 2j
+b/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/x86/build.ninja Հ3 2j
h
-f/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/x86/build.ninja.txt 3o
+f/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/x86/build.ninja.txt Հ3o
m
-k/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/x86/build_file_index.txt 3
_ 2p
+k/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/x86/build_file_index.txt Հ3
_ 2p
n
-l/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/x86/compile_commands.json 3t
+l/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/x86/compile_commands.json Հ3t
r
-p/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/x86/compile_commands.json.bin 3 z
+p/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/x86/compile_commands.json.bin Հ3 z
x
-v/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/x86/metadata_generation_command.txt 3
+v/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/x86/metadata_generation_command.txt Հ3
2m
k
-i/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/x86/prefab_config.json 3
( 2r
+i/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/x86/prefab_config.json Հ3
( 2r
p
-n/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/x86/symbol_folder_index.txt 3
e 2c
+n/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/x86/symbol_folder_index.txt Հ3
e 2c
a
-_/Users/venbateam/Documents/flutter/packages/flutter_tools/gradle/src/main/groovy/CMakeLists.txt 3
ހ2
\ No newline at end of file
+_/Users/venbateam/Documents/flutter/packages/flutter_tools/gradle/src/main/groovy/CMakeLists.txt Հ3
ހ2
\ No newline at end of file
diff --git a/android/app/.cxx/Debug/4y161to1/x86_64/configure_fingerprint.bin b/android/app/.cxx/Debug/4y161to1/x86_64/configure_fingerprint.bin
index cdab0d69..3cd77a1e 100644
--- a/android/app/.cxx/Debug/4y161to1/x86_64/configure_fingerprint.bin
+++ b/android/app/.cxx/Debug/4y161to1/x86_64/configure_fingerprint.bin
@@ -2,27 +2,27 @@ C/C++ Structured Logz
x
v/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/x86_64/additional_project_files.txtC
A
-?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint 3 2w
+?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint Հ3 2w
u
-s/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/x86_64/android_gradle_build.json 3 2|
+s/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/x86_64/android_gradle_build.json Հ3 2|
z
-x/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/x86_64/android_gradle_build_mini.json 3 2i
+x/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/x86_64/android_gradle_build_mini.json Հ3 2i
g
-e/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/x86_64/build.ninja 3 2m
+e/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/x86_64/build.ninja Հ3 2m
k
-i/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/x86_64/build.ninja.txt 3r
+i/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/x86_64/build.ninja.txt Հ3r
p
-n/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/x86_64/build_file_index.txt 3
_ 2s
+n/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/x86_64/build_file_index.txt Հ3
_ 2s
q
-o/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/x86_64/compile_commands.json 3w
+o/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/x86_64/compile_commands.json Հ3w
u
-s/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/x86_64/compile_commands.json.bin 3 }
+s/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/x86_64/compile_commands.json.bin Հ3 }
{
-y/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/x86_64/metadata_generation_command.txt 3
+y/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/x86_64/metadata_generation_command.txt Հ3
2p
n
-l/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/x86_64/prefab_config.json 3
( 2u
+l/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/x86_64/prefab_config.json Հ3
( 2u
s
-q/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/x86_64/symbol_folder_index.txt 3
h 2c
+q/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/Debug/4y161to1/x86_64/symbol_folder_index.txt Հ3
h 2c
a
-_/Users/venbateam/Documents/flutter/packages/flutter_tools/gradle/src/main/groovy/CMakeLists.txt 3
ހ2
\ No newline at end of file
+_/Users/venbateam/Documents/flutter/packages/flutter_tools/gradle/src/main/groovy/CMakeLists.txt Հ3
ހ2
\ No newline at end of file
diff --git a/android/app/.cxx/RelWithDebInfo/574gs2w4/arm64-v8a/configure_fingerprint.bin b/android/app/.cxx/RelWithDebInfo/574gs2w4/arm64-v8a/configure_fingerprint.bin
index fb068f44..b8974ca3 100644
--- a/android/app/.cxx/RelWithDebInfo/574gs2w4/arm64-v8a/configure_fingerprint.bin
+++ b/android/app/.cxx/RelWithDebInfo/574gs2w4/arm64-v8a/configure_fingerprint.bin
@@ -2,27 +2,27 @@ C/C++ Structured Log
/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/arm64-v8a/additional_project_files.txtC
A
-?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint 2 ǟ2
+?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint ׆3 ǟ2
-/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/arm64-v8a/android_gradle_build.json 2 ǟ2
+/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/arm64-v8a/android_gradle_build.json ׆3 ǟ2
-/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/arm64-v8a/android_gradle_build_mini.json 2 ǟ2u
+/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/arm64-v8a/android_gradle_build_mini.json ׆3 ǟ2u
s
-q/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/arm64-v8a/build.ninja 2 ǟ2y
+q/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/arm64-v8a/build.ninja ׆3 ǟ2y
w
-u/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/arm64-v8a/build.ninja.txt 2~
+u/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/arm64-v8a/build.ninja.txt ׆3~
|
-z/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/arm64-v8a/build_file_index.txt 2
_ ǟ2
+z/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/arm64-v8a/build_file_index.txt ׆3
_ ǟ2
}
-{/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/arm64-v8a/compile_commands.json 2
+{/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/arm64-v8a/compile_commands.json ׆3
-/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/arm64-v8a/compile_commands.json.bin 2
+/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/arm64-v8a/compile_commands.json.bin ׆3
-/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/arm64-v8a/metadata_generation_command.txt 2
+/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/arm64-v8a/metadata_generation_command.txt ׆3
ǟ2|
z
-x/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/arm64-v8a/prefab_config.json 2
( ǟ2
+x/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/arm64-v8a/prefab_config.json ׆3
( ǟ2
-}/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/arm64-v8a/symbol_folder_index.txt 2
t ǟ2c
+}/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/arm64-v8a/symbol_folder_index.txt ׆3
t ǟ2c
a
-_/Users/venbateam/Documents/flutter/packages/flutter_tools/gradle/src/main/groovy/CMakeLists.txt 2
ހ2
\ No newline at end of file
+_/Users/venbateam/Documents/flutter/packages/flutter_tools/gradle/src/main/groovy/CMakeLists.txt ׆3
ހ2
\ No newline at end of file
diff --git a/android/app/.cxx/RelWithDebInfo/574gs2w4/armeabi-v7a/configure_fingerprint.bin b/android/app/.cxx/RelWithDebInfo/574gs2w4/armeabi-v7a/configure_fingerprint.bin
index b921d132..d74ef4b3 100644
--- a/android/app/.cxx/RelWithDebInfo/574gs2w4/armeabi-v7a/configure_fingerprint.bin
+++ b/android/app/.cxx/RelWithDebInfo/574gs2w4/armeabi-v7a/configure_fingerprint.bin
@@ -2,27 +2,27 @@ C/C++ Structured Log
/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/armeabi-v7a/additional_project_files.txtC
A
-?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint 2 ǟ2
+?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint ׆3 ǟ2
-/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/armeabi-v7a/android_gradle_build.json 2 ǟ2
+/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/armeabi-v7a/android_gradle_build.json ׆3 ǟ2
-/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/armeabi-v7a/android_gradle_build_mini.json 2 ǟ2w
+/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/armeabi-v7a/android_gradle_build_mini.json ׆3 ǟ2w
u
-s/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/armeabi-v7a/build.ninja 2 ǟ2{
+s/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/armeabi-v7a/build.ninja ׆3 ǟ2{
y
-w/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/armeabi-v7a/build.ninja.txt 2
+w/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/armeabi-v7a/build.ninja.txt ׆3
~
-|/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/armeabi-v7a/build_file_index.txt 2
_ ǟ2
+|/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/armeabi-v7a/build_file_index.txt ׆3
_ ǟ2
-}/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/armeabi-v7a/compile_commands.json 2
+}/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/armeabi-v7a/compile_commands.json ׆3
-/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/armeabi-v7a/compile_commands.json.bin 2
+/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/armeabi-v7a/compile_commands.json.bin ׆3
-/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/armeabi-v7a/metadata_generation_command.txt 2
+/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/armeabi-v7a/metadata_generation_command.txt ׆3
ǟ2~
|
-z/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/armeabi-v7a/prefab_config.json 2
( ǟ2
+z/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/armeabi-v7a/prefab_config.json ׆3
( ǟ2
-/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/armeabi-v7a/symbol_folder_index.txt 2
v ǟ2c
+/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/armeabi-v7a/symbol_folder_index.txt ׆3
v ǟ2c
a
-_/Users/venbateam/Documents/flutter/packages/flutter_tools/gradle/src/main/groovy/CMakeLists.txt 2
ހ2
\ No newline at end of file
+_/Users/venbateam/Documents/flutter/packages/flutter_tools/gradle/src/main/groovy/CMakeLists.txt ׆3
ހ2
\ No newline at end of file
diff --git a/android/app/.cxx/RelWithDebInfo/574gs2w4/x86/configure_fingerprint.bin b/android/app/.cxx/RelWithDebInfo/574gs2w4/x86/configure_fingerprint.bin
index f0625e4b..047df3b4 100644
--- a/android/app/.cxx/RelWithDebInfo/574gs2w4/x86/configure_fingerprint.bin
+++ b/android/app/.cxx/RelWithDebInfo/574gs2w4/x86/configure_fingerprint.bin
@@ -2,27 +2,27 @@ C/C++ Structured Log
~
|/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86/additional_project_files.txtC
A
-?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint å2 ǟ2}
+?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint ׆3 ǟ2}
{
-y/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86/android_gradle_build.json å2 ǟ2
+y/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86/android_gradle_build.json ׆3 ǟ2
-~/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86/android_gradle_build_mini.json å2 ǟ2o
+~/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86/android_gradle_build_mini.json ׆3 ǟ2o
m
-k/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86/build.ninja å2 ǟ2s
+k/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86/build.ninja ׆3 ǟ2s
q
-o/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86/build.ninja.txt å2x
+o/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86/build.ninja.txt ׆3x
v
-t/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86/build_file_index.txt å2
_ ǟ2y
+t/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86/build_file_index.txt ׆3
_ ǟ2y
w
-u/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86/compile_commands.json å2}
+u/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86/compile_commands.json ׆3}
{
-y/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86/compile_commands.json.bin å2
+y/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86/compile_commands.json.bin ׆3
-/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86/metadata_generation_command.txt å2
+/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86/metadata_generation_command.txt ׆3
ǟ2v
t
-r/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86/prefab_config.json å2
( ǟ2{
+r/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86/prefab_config.json ׆3
( ǟ2{
y
-w/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86/symbol_folder_index.txt å2
n ǟ2c
+w/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86/symbol_folder_index.txt ׆3
n ǟ2c
a
-_/Users/venbateam/Documents/flutter/packages/flutter_tools/gradle/src/main/groovy/CMakeLists.txt å2
ހ2
\ No newline at end of file
+_/Users/venbateam/Documents/flutter/packages/flutter_tools/gradle/src/main/groovy/CMakeLists.txt ׆3
ހ2
\ No newline at end of file
diff --git a/android/app/.cxx/RelWithDebInfo/574gs2w4/x86_64/configure_fingerprint.bin b/android/app/.cxx/RelWithDebInfo/574gs2w4/x86_64/configure_fingerprint.bin
index 4d90eeae..4c753fc2 100644
--- a/android/app/.cxx/RelWithDebInfo/574gs2w4/x86_64/configure_fingerprint.bin
+++ b/android/app/.cxx/RelWithDebInfo/574gs2w4/x86_64/configure_fingerprint.bin
@@ -2,27 +2,27 @@ C/C++ Structured Log
/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86_64/additional_project_files.txtC
A
-?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint ʥ2 ǟ2
+?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint ׆3 ǟ2
~
-|/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86_64/android_gradle_build.json ʥ2 ǟ2
+|/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86_64/android_gradle_build.json ׆3 ǟ2
-/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86_64/android_gradle_build_mini.json ʥ2 ǟ2r
+/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86_64/android_gradle_build_mini.json ׆3 ǟ2r
p
-n/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86_64/build.ninja ʥ2 ǟ2v
+n/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86_64/build.ninja ׆3 ǟ2v
t
-r/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86_64/build.ninja.txt ʥ2{
+r/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86_64/build.ninja.txt ׆3{
y
-w/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86_64/build_file_index.txt ʥ2
_ ǟ2|
+w/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86_64/build_file_index.txt ׆3
_ ǟ2|
z
-x/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86_64/compile_commands.json ʥ2
+x/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86_64/compile_commands.json ׆3
~
-|/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86_64/compile_commands.json.bin ʥ2
+|/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86_64/compile_commands.json.bin ׆3
-/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86_64/metadata_generation_command.txt ʥ2
+/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86_64/metadata_generation_command.txt ׆3
ǟ2y
w
-u/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86_64/prefab_config.json ʥ2
( ǟ2~
+u/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86_64/prefab_config.json ׆3
( ǟ2~
|
-z/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86_64/symbol_folder_index.txt ʥ2
q ǟ2c
+z/Users/venbateam/Documents/UAE_Stats/FCSC/frontend/android/app/.cxx/RelWithDebInfo/574gs2w4/x86_64/symbol_folder_index.txt ׆3
q ǟ2c
a
-_/Users/venbateam/Documents/flutter/packages/flutter_tools/gradle/src/main/groovy/CMakeLists.txt ʥ2
ހ2
\ No newline at end of file
+_/Users/venbateam/Documents/flutter/packages/flutter_tools/gradle/src/main/groovy/CMakeLists.txt ׆3
ހ2
\ No newline at end of file
diff --git a/ios/Podfile.lock b/ios/Podfile.lock
index 601f0ada..dd052587 100644
--- a/ios/Podfile.lock
+++ b/ios/Podfile.lock
@@ -3,6 +3,16 @@ PODS:
- Flutter
- app_settings (5.1.1):
- Flutter
+ - AppAuth (2.0.0):
+ - AppAuth/Core (= 2.0.0)
+ - AppAuth/ExternalUserAgent (= 2.0.0)
+ - AppAuth/Core (2.0.0)
+ - AppAuth/ExternalUserAgent (2.0.0):
+ - AppAuth/Core
+ - AppCheckCore (11.2.0):
+ - GoogleUtilities/Environment (~> 8.0)
+ - GoogleUtilities/UserDefaults (~> 8.0)
+ - PromisesObjC (~> 2.4)
- appsflyer_sdk (6.16.2):
- AppsFlyerFramework (= 6.16.2)
- Flutter
@@ -53,9 +63,19 @@ PODS:
- FlutterMacOS
- fluttertoast (0.0.2):
- Flutter
+ - google_sign_in_ios (0.0.1):
+ - Flutter
+ - FlutterMacOS
+ - GoogleSignIn (~> 9.0)
+ - GTMSessionFetcher (>= 3.4.0)
- GoogleDataTransport (10.1.0):
- nanopb (~> 3.30910.0)
- PromisesObjC (~> 2.4)
+ - GoogleSignIn (9.0.0):
+ - AppAuth (~> 2.0)
+ - AppCheckCore (~> 11.0)
+ - GTMAppAuth (~> 5.0)
+ - GTMSessionFetcher/Core (~> 3.3)
- GoogleUtilities/AppDelegateSwizzler (8.0.2):
- GoogleUtilities/Environment
- GoogleUtilities/Logger
@@ -80,6 +100,14 @@ PODS:
- GoogleUtilities/UserDefaults (8.0.2):
- GoogleUtilities/Logger
- GoogleUtilities/Privacy
+ - GTMAppAuth (5.0.0):
+ - AppAuth/Core (~> 2.0)
+ - GTMSessionFetcher/Core (< 4.0, >= 3.3)
+ - GTMSessionFetcher (3.5.0):
+ - GTMSessionFetcher/Full (= 3.5.0)
+ - GTMSessionFetcher/Core (3.5.0)
+ - GTMSessionFetcher/Full (3.5.0):
+ - GTMSessionFetcher/Core
- image_picker_ios (0.0.1):
- Flutter
- nanopb (3.30910.0):
@@ -119,6 +147,7 @@ DEPENDENCIES:
- flutter_native_splash (from `.symlinks/plugins/flutter_native_splash/ios`)
- flutter_secure_storage_darwin (from `.symlinks/plugins/flutter_secure_storage_darwin/darwin`)
- fluttertoast (from `.symlinks/plugins/fluttertoast/ios`)
+ - google_sign_in_ios (from `.symlinks/plugins/google_sign_in_ios/darwin`)
- image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`)
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
@@ -130,6 +159,8 @@ DEPENDENCIES:
SPEC REPOS:
trunk:
+ - AppAuth
+ - AppCheckCore
- AppsFlyerFramework
- Firebase
- FirebaseCore
@@ -137,7 +168,10 @@ SPEC REPOS:
- FirebaseInstallations
- FirebaseMessaging
- GoogleDataTransport
+ - GoogleSignIn
- GoogleUtilities
+ - GTMAppAuth
+ - GTMSessionFetcher
- nanopb
- PromisesObjC
@@ -164,6 +198,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/flutter_secure_storage_darwin/darwin"
fluttertoast:
:path: ".symlinks/plugins/fluttertoast/ios"
+ google_sign_in_ios:
+ :path: ".symlinks/plugins/google_sign_in_ios/darwin"
image_picker_ios:
:path: ".symlinks/plugins/image_picker_ios/ios"
package_info_plus:
@@ -184,6 +220,8 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
app_links: 76b66b60cc809390ca1ad69bfd66b998d2387ac7
app_settings: 5127ae0678de1dcc19f2293271c51d37c89428b2
+ AppAuth: 1c1a8afa7e12f2ec3a294d9882dfa5ab7d3cb063
+ AppCheckCore: cc8fd0a3a230ddd401f326489c99990b013f0c4f
appsflyer_sdk: ebe94dc3f00b07bdd001251dbc87879bda3c494a
AppsFlyerFramework: fe5303bffcdfd941d5f570c2d21eaaea982e7bdc
connectivity_plus: cb623214f4e1f6ef8fe7403d580fdad517d2f7dd
@@ -199,8 +237,12 @@ SPEC CHECKSUMS:
flutter_native_splash: 6cad9122ea0fad137d23137dd14b937f3e90b145
flutter_secure_storage_darwin: ce237a8775b39723566dc72571190a3769d70468
fluttertoast: 2c67e14dce98bbdb200df9e1acf610d7a6264ea1
+ google_sign_in_ios: 205742c688aea0e64db9da03c33121694a365109
GoogleDataTransport: aae35b7ea0c09004c3797d53c8c41f66f219d6a7
+ GoogleSignIn: c7f09cfbc85a1abf69187be091997c317cc33b77
GoogleUtilities: 26a3abef001b6533cf678d3eb38fd3f614b7872d
+ GTMAppAuth: 217a876b249c3c585a54fd6f73e6b58c4f5c4238
+ GTMSessionFetcher: 5aea5ba6bd522a239e236100971f10cb71b96ab6
image_picker_ios: 7fe1ff8e34c1790d6fff70a32484959f563a928a
nanopb: fad817b59e0457d11a5dfbde799381cd727c1275
package_info_plus: af8e2ca6888548050f16fa2f1938db7b5a5df499
diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj
index 71b2ac31..bfd71a07 100644
--- a/ios/Runner.xcodeproj/project.pbxproj
+++ b/ios/Runner.xcodeproj/project.pbxproj
@@ -322,14 +322,10 @@
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
- inputPaths = (
- );
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
- outputPaths = (
- );
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
@@ -358,14 +354,10 @@
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist",
);
- inputPaths = (
- );
name = "[CP] Copy Pods Resources";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist",
);
- outputPaths = (
- );
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
diff --git a/ios/Runner/Runner.entitlements b/ios/Runner/Runner.entitlements
index 903def2a..80b5221d 100644
--- a/ios/Runner/Runner.entitlements
+++ b/ios/Runner/Runner.entitlements
@@ -4,5 +4,9 @@
aps-environment
development
+ com.apple.developer.applesignin
+
+ Default
+
diff --git a/lib/config/theme/service.dart b/lib/config/theme/service.dart
index c115ad31..72cd7c80 100644
--- a/lib/config/theme/service.dart
+++ b/lib/config/theme/service.dart
@@ -1,14 +1,13 @@
import 'dart:convert';
import 'package:http/http.dart' as http;
import 'package:pocketbase/pocketbase.dart';
+import 'package:shared_preferences/shared_preferences.dart';
import 'package:uae_stat/config/api_config.dart';
class ThemeBaseService {
final pb = PocketBase(apiUrl);
dynamic themeData;
-
-
// Future getUserTheme(String userId) async {
// final prefs = await SharedPreferences.getInstance();
// final userId = prefs.getString('userId') ?? '';
@@ -40,14 +39,15 @@ class ThemeBaseService {
// }
Future getUserTheme(String userId) async {
+ print('getUserTheme');
final url = "${pb.baseUrl}/api/collections/users/records/$userId";
- final adminAuth = await pb.admins.authWithPassword(
- 'pb@venbainfotech.com',
- 'pb@venbainfotech.com',
- );
- final String adminToken = adminAuth.token;
- print('adminToken: $adminToken');
+ final adminAuth = await pb.admins.authWithPassword(
+ 'pb@venbainfotech.com',
+ 'pb@venbainfotech.com',
+ );
+ final String adminToken = adminAuth.token;
+ print('adminToken: $adminToken');
final response = await http.get(
Uri.parse(url),
headers: {
@@ -57,13 +57,22 @@ class ThemeBaseService {
);
if (response.statusCode == 200) {
+ print("THEME : ${jsonDecode(response.body)['theme']} ");
+
+ final prefs = await SharedPreferences.getInstance();
+
+ // Store enum as string
+ await prefs.setString('ThemeType', jsonDecode(response.body)['theme']);
+
return jsonDecode(response.body)['theme'] ?? 'system';
} else {
+ print('THEME : system');
return 'system';
}
}
Future updateUserTheme(String userId, String theme) async {
+ print('updateUserTheme');
// Authenticate admin d
final url = "${pb.baseUrl}/api/collections/users/records/$userId";
final adminAuth = await pb.admins.authWithPassword(
@@ -85,7 +94,7 @@ class ThemeBaseService {
);
if (response.statusCode == 200) {
- print("Theme updated successfully");
+ print("Theme updated successfully - ${response.body}");
} else {
print("Failed to update theme: ${response.body}");
throw Exception('Failed to update theme');
diff --git a/lib/config/theme/themeDialog.dart b/lib/config/theme/themeDialog.dart
index dcfbbc4b..f267a3fb 100644
--- a/lib/config/theme/themeDialog.dart
+++ b/lib/config/theme/themeDialog.dart
@@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
+import 'package:shared_preferences/shared_preferences.dart';
import 'package:uae_stat/config/theme/app_theme.dart';
class ThemeSelectorDialog extends StatefulWidget {
@@ -11,12 +12,28 @@ class ThemeSelectorDialog extends StatefulWidget {
}
class _ThemeSelectorDialogState extends State {
- late AppTheme _selectedTheme;
+ AppTheme? _selectedTheme;
@override
void initState() {
super.initState();
- _selectedTheme = widget.initialTheme;
+
+ print("InitailTheme - ${widget.initialTheme}");
+ _loadTheme();
+
+ // _selectedTheme = widget.initialTheme;
+ }
+
+ Future _loadTheme() async {
+ final prefs = await SharedPreferences.getInstance();
+ final storedTheme = prefs.getString('ThemeType') ?? widget.initialTheme;
+ print("storedTheme - $storedTheme");
+ setState(() {
+ _selectedTheme =
+ storedTheme == 'system' ? AppTheme.system : widget.initialTheme;
+ });
+
+ print("_selectedTheme - $_selectedTheme");
}
@override
@@ -26,12 +43,21 @@ class _ThemeSelectorDialogState extends State {
content: Column(
mainAxisSize: MainAxisSize.min,
children: AppTheme.values.map((theme) {
+ print("THEME_DIAL1- $theme");
return RadioListTile(
- title: Text(theme.name[0].toUpperCase() + theme.name.substring(1)),
- value: theme,
- groupValue: _selectedTheme,
- onChanged: (value) => setState(() => _selectedTheme = value!),
- );
+ title:
+ Text(theme.name[0].toUpperCase() + theme.name.substring(1)),
+ value: theme,
+ groupValue: _selectedTheme,
+ onChanged: (value) async {
+ final prefs = await SharedPreferences.getInstance();
+ print("THEME_DIALval- $value");
+ // Store enum as string
+ await prefs.setString(
+ 'ThemeType', value.toString().split('.').last);
+
+ setState(() => _selectedTheme = value!);
+ });
}).toList(),
),
actions: [
diff --git a/lib/domain/entities/session_entity.dart b/lib/domain/entities/session_entity.dart
index 7e4610be..75b33126 100644
--- a/lib/domain/entities/session_entity.dart
+++ b/lib/domain/entities/session_entity.dart
@@ -31,7 +31,7 @@ class SessionEntity {
SessionFreshness get freshness {
final now = DateTime.now();
if (now.isAfter(expiresOn)) return SessionFreshness.expired;
- if (expiresOn.difference(now) < const Duration(days: 7)) {
+ if (expiresOn.difference(now) < const Duration(days: 30)) {
return SessionFreshness.stale;
}
return SessionFreshness.fresh;
diff --git a/lib/domain/repos/t_auth_repo.dart b/lib/domain/repos/t_auth_repo.dart
index 19339604..92b58496 100644
--- a/lib/domain/repos/t_auth_repo.dart
+++ b/lib/domain/repos/t_auth_repo.dart
@@ -37,6 +37,11 @@ class TAuthRepo {
() => _state!,
);
+ Future googleAndAppleAuthencation(token) => Future.delayed(
+ kThemeAnimationDuration,
+ () => _sample,
+ );
+
Future logout() => Future.delayed(
kThemeAnimationDuration,
() => _state = null,
diff --git a/lib/domain/use_cases/auth_use_case.dart b/lib/domain/use_cases/auth_use_case.dart
index 72fc6c01..c1a9db59 100644
--- a/lib/domain/use_cases/auth_use_case.dart
+++ b/lib/domain/use_cases/auth_use_case.dart
@@ -69,6 +69,21 @@ class AuthUseCase extends _$AuthUseCase {
return session; // Return the session with user details.
}
+ Future googleAndAppleAuthencation(token) async {
+ // print("loginTEST2");
+ final session = await _repo.googleAndAppleAuthencation(token);
+ // print("loginTEST4");
+ final localPrefs = await getIt.call().get();
+ if (localPrefs != null) {
+ await getIt.call().syncPreferences(
+ localPrefs,
+ id: session.id,
+ );
+ }
+ state = AsyncData(session);
+ return session; // Return the session with user details.
+ }
+
Future logout() async {
await _repo.logout();
state = const AsyncData(null);
diff --git a/lib/infrastructure/data/p_auth_repo.dart b/lib/infrastructure/data/p_auth_repo.dart
index 5258479e..8ee8f054 100644
--- a/lib/infrastructure/data/p_auth_repo.dart
+++ b/lib/infrastructure/data/p_auth_repo.dart
@@ -53,6 +53,7 @@ class PAuthRepo implements TAuthRepo {
email,
pw,
);
+ print('googleAuth $user');
} on ClientException catch (err) {
final message = err.response['message'];
final isWrongEmailPw = message == 'Failed to authenticate.';
@@ -66,6 +67,30 @@ class PAuthRepo implements TAuthRepo {
return se;
}
+ Future googleAndAppleAuthencation(token) async {
+ print("GloginTEST3");
+ late final RecordAuth user;
+ try {
+ // user = await PocketBaseService.users.authWithPassword(
+ // email,
+ // pw,
+ // );
+
+ user = token;
+ } on ClientException catch (err) {
+ final message = err.response['message'];
+ final isWrongEmailPw = message == 'Failed to authenticate.';
+ if (isWrongEmailPw) throw LoginError.invalidEmailPw;
+ rethrow;
+ }
+ final isVerified = user.record!.getBoolValue('verified');
+ if (!isVerified) throw LoginError.emailAddressNotVerified;
+ final se = _sessionEntityFromPocketbaseRecord(user);
+ await _LocalAuthRepo.storeLocally(se);
+ return se;
+ }
+
+
@override
Future logout() {
PocketBaseService.authStore.clear();
diff --git a/lib/presentation/Screens/auth_verification/create_new_pw.dart b/lib/presentation/Screens/auth_verification/create_new_pw.dart
index 65633182..c69290ea 100644
--- a/lib/presentation/Screens/auth_verification/create_new_pw.dart
+++ b/lib/presentation/Screens/auth_verification/create_new_pw.dart
@@ -17,7 +17,7 @@ import 'package:uae_stat/presentation/components/indicators/locale_provider.dart
import 'package:uae_stat/presentation/components/my_toggle.dart';
import 'package:uae_stat/presentation/components/space.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
-
+// import 'package:uae_stat/l10n/app_localizations.dart';
import 'package:uae_stat/config/my_theme.dart';
class CreateNewPw extends ConsumerStatefulWidget {
@@ -27,9 +27,9 @@ class CreateNewPw extends ConsumerStatefulWidget {
const CreateNewPw(
{Key? key,
- required this.userId,
- required this.email,
- required this.keyParam});
+ required this.userId,
+ required this.email,
+ required this.keyParam});
@override
ConsumerState createState() => _CreateNewPwState();
@@ -126,7 +126,7 @@ class _CreateNewPwState extends ConsumerState {
try {
// Attempt to authenticate the user with email and password
final authResponse =
- await _pb.collection('users').authWithPassword(email, password);
+ await _pb.collection('users').authWithPassword(email, password);
if (authResponse != null) {
print('Password match successful for email: $email');
@@ -156,20 +156,20 @@ class _CreateNewPwState extends ConsumerState {
};
bool isPasswordValid =
- await verifyUserPassword(widget.email, oldPassword);
+ await verifyUserPassword(widget.email, oldPassword);
print(isPasswordValid);
if (isPasswordValid) {
// Update password
await _pb.collection('users').update(
- userId,
- body: {
- 'password': newPassword,
- 'passwordConfirm': newPassword,
- },
- headers: headers,
- );
+ userId,
+ body: {
+ 'password': newPassword,
+ 'passwordConfirm': newPassword,
+ },
+ headers: headers,
+ );
setState(() {
isLoading = false;
@@ -179,13 +179,13 @@ class _CreateNewPwState extends ConsumerState {
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text(
- AppLocalizations.of(context)!.password_update_successfully,
+ AppLocalizations.of(context)!.password_update_successfully,
style: TextStyle(
fontFamily: context.translate(
'Roboto',
'NotoKufi',
- )
- ),),
+ )),
+ ),
),
);
@@ -203,14 +203,14 @@ class _CreateNewPwState extends ConsumerState {
});
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
- content:
- Text(AppLocalizations.of(context)!.your_old_password_incorrect,
- style: TextStyle(
- fontFamily: context.translate(
- 'Roboto',
- 'NotoKufi',
- )
- ),),
+ content: Text(
+ AppLocalizations.of(context)!.your_old_password_incorrect,
+ style: TextStyle(
+ fontFamily: context.translate(
+ 'Roboto',
+ 'NotoKufi',
+ )),
+ ),
backgroundColor: Colors.red,
),
);
@@ -222,13 +222,14 @@ class _CreateNewPwState extends ConsumerState {
});
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
- content: Text(context.translate('Failed to update password: $e','فشل في تحديث كلمة المرور'),
+ content: Text(
+ context.translate(
+ 'Failed to update password: $e', 'فشل في تحديث كلمة المرور'),
style: TextStyle(
fontFamily: context.translate(
'Roboto',
'NotoKufi',
- )
- ),
+ )),
),
backgroundColor: Colors.red,
),
@@ -256,53 +257,51 @@ class _CreateNewPwState extends ConsumerState {
});
// final themeMode = ref.read(themeProvider);
- final themeMode = ThemeMode.dark;
- final isDarkTheme = themeMode == ThemeMode.dark ||
- (themeMode == ThemeMode.system &&
+ // final themeMode = ThemeMode.dark;
+ final isDarkTheme = ref.read(themeProvider) == ThemeMode.dark ||
+ (ref.read(themeProvider) == ThemeMode.system &&
MediaQuery.of(context).platformBrightness == Brightness.dark);
return PopScope(
- canPop: false, // Allow back navigation only if not login screen
- onPopInvokedWithResult: (didPop, result) {
- if (didPop) return;
- logout(context);// Show exit confirmation dialog
- },
- child: Scaffold(
- backgroundColor: isDarkTheme ? Color(0xFF111111) : Colors.white,
- body: Stack(children: [
- SingleChildScrollView(
- child: SafeArea(
- child: _isPasswordUpdated
- ? _buildSuccessContent(screenHeight, screenWidth)
- : _buildPasswordForm(ref, screenHeight, screenWidth),
- ),
- ),
- if (isLoading)
- Container(
- color: Color(0x98FFFCE5), // Semi-transparent background
- child: Column(
- mainAxisAlignment: MainAxisAlignment.center,
- children: [
- Container(
- margin: EdgeInsets.symmetric(
- horizontal: 40), // Left & Right space
- child: LinearProgressIndicator(
- minHeight: 5, // Adjust thickness
- backgroundColor:
- Colors.grey[100], // Optional: Background color
- valueColor: AlwaysStoppedAnimation(
- Color(0xFFAA8E83)), // Loader color
- ),
- ),
- ],
+ canPop: false, // Allow back navigation only if not login screen
+ onPopInvokedWithResult: (didPop, result) {
+ if (didPop) return;
+ logout(context); // Show exit confirmation dialog
+ },
+ child: Scaffold(
+ backgroundColor: isDarkTheme ? Color(0xFF111111) : Colors.white,
+ body: Stack(children: [
+ SingleChildScrollView(
+ child: SafeArea(
+ child: _isPasswordUpdated
+ ? _buildSuccessContent(
+ screenHeight, screenWidth, isDarkTheme)
+ : _buildPasswordForm(ref, screenHeight, screenWidth),
),
- )
- ]))
- );
+ ),
+ if (isLoading)
+ Container(
+ color: Color(0x98FFFCE5), // Semi-transparent background
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Container(
+ margin: EdgeInsets.symmetric(
+ horizontal: 40), // Left & Right space
+ child: LinearProgressIndicator(
+ minHeight: 5, // Adjust thickness
+ backgroundColor:
+ Colors.grey[100], // Optional: Background color
+ valueColor: AlwaysStoppedAnimation(
+ Color(0xFFAA8E83)), // Loader color
+ ),
+ ),
+ ],
+ ),
+ )
+ ])));
}
-
-
Widget _buildPasswordForm(
WidgetRef ref, double screenHeight, double screenWidth) {
final passwordLocale = ref.watch(localeProvider);
@@ -310,6 +309,7 @@ class _CreateNewPwState extends ConsumerState {
final isDarkTheme = themeMode == ThemeMode.dark ||
(themeMode == ThemeMode.system &&
MediaQuery.of(context).platformBrightness == Brightness.dark);
+
return Form(
key: _formKey,
child: Padding(
@@ -334,7 +334,9 @@ class _CreateNewPwState extends ConsumerState {
// Icons.close,
Icons.arrow_back_ios,
size: 24, // Icon size
- color: isDarkTheme ? Colors.white : Colors.black, // Icon color
+ color: isDarkTheme
+ ? Colors.white
+ : Colors.black, // Icon color
),
),
), // Left icon
@@ -375,7 +377,7 @@ class _CreateNewPwState extends ConsumerState {
),
fontSize: passwordLocale?.languageCode == 'ar' ? 24 : 26,
fontWeight: FontWeight.w300,
- color: isDarkTheme ? Colors.white : null,
+ color: isDarkTheme ? Colors.white : Colors.black,
),
),
SizedBox(height: 10),
@@ -394,7 +396,7 @@ class _CreateNewPwState extends ConsumerState {
'NotoKufi',
),
fontSize:
- passwordLocale?.languageCode == 'ar' ? 14 : 15,
+ passwordLocale?.languageCode == 'ar' ? 14 : 15,
fontWeight: FontWeight.w700,
color: Color(0xFF898C81)),
),
@@ -407,7 +409,7 @@ class _CreateNewPwState extends ConsumerState {
'NotoKufi',
),
fontSize:
- passwordLocale?.languageCode == 'ar' ? 14 : 15,
+ passwordLocale?.languageCode == 'ar' ? 14 : 15,
color: Color(0xFF898C81),
fontWeight: FontWeight.w700),
),
@@ -423,12 +425,13 @@ class _CreateNewPwState extends ConsumerState {
hintText: AppLocalizations.of(context)!.old_password,
// prefixIcon: Icon(Icons.lock, color: Colors.blue),
hintStyle: TextStyle(
- color: isDarkTheme ? Colors.white : Color(0xFFC3C6CB),
- fontWeight: FontWeight.w400,
+ color: isDarkTheme ? Colors.white : Color(0xFFC3C6CB),
+ fontWeight: FontWeight.w400,
fontFamily: context.translate(
'Roboto',
'NotoKufi',
- ),),
+ ),
+ ),
prefixIconConstraints: const BoxConstraints(
maxWidth: 25 + 16 + 10,
maxHeight: 25 + (8 * 2),
@@ -439,11 +442,16 @@ class _CreateNewPwState extends ConsumerState {
end: 10,
),
child: Image.asset(
- isDarkTheme ? MiscIconAssetPath.lockDark : MiscIconAssetPath.lockLight,
+ isDarkTheme
+ ? MiscIconAssetPath.lockDark
+ : MiscIconAssetPath.lockLight,
fit: BoxFit.fitHeight,
height: 25,
width: 25,
- color: isDarkTheme ? Colors.white : MyTheme.topicColor(IndicatorTopic.economy).shade300,
+ color: Color(0xFFB68A34),
+ // color: isDarkTheme
+ // ? Colors.white
+ // : MyTheme.topicColor(IndicatorTopic.economy).shade300,
),
),
suffixIcon: IconButton(
@@ -460,7 +468,7 @@ class _CreateNewPwState extends ConsumerState {
: MiscIconAssetPath.visibleOn,
color: Color(
- 0xFF9EA2A9,
+ 0xFFB68A34,
), // Apply color if needed, but keep in mind `Image.asset` might not support color directly.
width: 24,
height: 24,
@@ -475,8 +483,9 @@ class _CreateNewPwState extends ConsumerState {
enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(10),
borderSide: BorderSide(
- color:
- MyTheme.topicColor(IndicatorTopic.economy).shade400,
+ color: Color(0xFFB68A34),
+ // color:
+ // MyTheme.topicColor(IndicatorTopic.economy).shade400,
width: 1),
),
focusedBorder: OutlineInputBorder(
@@ -507,12 +516,13 @@ class _CreateNewPwState extends ConsumerState {
hintText: AppLocalizations.of(context)!.enter_new_password,
// prefixIcon: Icon(Icons.lock, color: Colors.blue),
hintStyle: TextStyle(
- color: Color(0xFFC3C6CB),
- fontWeight: FontWeight.w400,
+ color: Color(0xFFC3C6CB),
+ fontWeight: FontWeight.w400,
fontFamily: context.translate(
'Roboto',
'NotoKufi',
- ),),
+ ),
+ ),
prefixIconConstraints: const BoxConstraints(
maxWidth: 25 + 16 + 10,
maxHeight: 25 + (8 * 2),
@@ -527,7 +537,8 @@ class _CreateNewPwState extends ConsumerState {
fit: BoxFit.fitHeight,
height: 25,
width: 25,
- color: MyTheme.topicColor(IndicatorTopic.economy).shade300,
+ color: Color(0xFFB68A34),
+ // color: MyTheme.topicColor(IndicatorTopic.economy).shade300,
),
),
@@ -543,9 +554,9 @@ class _CreateNewPwState extends ConsumerState {
_obscureNewPassword
? MiscIconAssetPath.visibilityOff
: MiscIconAssetPath.visibleOn,
-
- color: Color(
- 0xFF9EA2A9), // Apply color if needed, but keep in mind `Image.asset` might not support color directly.
+ color: Color(0xFFB68A34),
+ // color: Color(
+ // 0xFF9EA2A9), // Apply color if needed, but keep in mind `Image.asset` might not support color directly.
width: 24,
height: 24,
),
@@ -559,8 +570,9 @@ class _CreateNewPwState extends ConsumerState {
enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(10),
borderSide: BorderSide(
- color:
- MyTheme.topicColor(IndicatorTopic.economy).shade400,
+ color: Color(0xFFB68A34),
+ // color:
+ // MyTheme.topicColor(IndicatorTopic.economy).shade400,
width: 1),
),
focusedBorder: OutlineInputBorder(
@@ -589,12 +601,13 @@ class _CreateNewPwState extends ConsumerState {
// hintText: 'Confirm new password',
hintText: AppLocalizations.of(context)!.confirm_new_password,
hintStyle: TextStyle(
- color: Color(0xFFC3C6CB),
- fontWeight: FontWeight.w400,
+ color: Color(0xFFC3C6CB),
+ fontWeight: FontWeight.w400,
fontFamily: context.translate(
'Roboto',
'NotoKufi',
- ),),
+ ),
+ ),
prefixIconConstraints: const BoxConstraints(
maxWidth: 25 + 16 + 10,
maxHeight: 25 + (8 * 2),
@@ -609,7 +622,8 @@ class _CreateNewPwState extends ConsumerState {
fit: BoxFit.fitHeight,
height: 25,
width: 25,
- color: MyTheme.topicColor(IndicatorTopic.economy).shade300,
+ color: Color(0xFFB68A34),
+ // color: MyTheme.topicColor(IndicatorTopic.economy).shade300,
),
),
@@ -625,9 +639,9 @@ class _CreateNewPwState extends ConsumerState {
_obscureConfirmPassword
? MiscIconAssetPath.visibilityOff
: MiscIconAssetPath.visibleOn,
-
- color: Color(
- 0xFF9EA2A9), // Apply color if needed, but keep in mind `Image.asset` might not support color directly.
+ color: Color(0xFFB68A34),
+ // color: Color(
+ // 0xFF9EA2A9), // Apply color if needed, but keep in mind `Image.asset` might not support color directly.
width: 24,
height: 24,
),
@@ -641,8 +655,9 @@ class _CreateNewPwState extends ConsumerState {
enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(10),
borderSide: BorderSide(
- color:
- MyTheme.topicColor(IndicatorTopic.economy).shade400,
+ color: Color(0xFFB68A34),
+ // color:
+ // MyTheme.topicColor(IndicatorTopic.economy).shade400,
width: 1),
),
focusedBorder: OutlineInputBorder(
@@ -681,7 +696,8 @@ class _CreateNewPwState extends ConsumerState {
}
},
style: ElevatedButton.styleFrom(
- backgroundColor: Colors.brown[300],
+ backgroundColor: Color(0xFFB68A34),
+ // backgroundColor: Colors.brown[300],
padding: EdgeInsets.symmetric(horizontal: 80, vertical: 16),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10),
@@ -698,7 +714,7 @@ class _CreateNewPwState extends ConsumerState {
'NotoKufi',
),
fontSize:
- passwordLocale?.languageCode == 'ar' ? 14 : 18,
+ passwordLocale?.languageCode == 'ar' ? 14 : 18,
color: Colors.white),
),
SizedBox(width: 2),
@@ -731,7 +747,8 @@ class _CreateNewPwState extends ConsumerState {
);
}
- Widget _buildSuccessContent(double screenHeight, double screenWidth) {
+ Widget _buildSuccessContent(
+ double screenHeight, double screenWidth, bool isDarkTheme) {
print('IN');
return Padding(
padding: EdgeInsets.all(20.0),
@@ -753,7 +770,7 @@ class _CreateNewPwState extends ConsumerState {
),
fontSize: 16,
fontWeight: FontWeight.w500,
- color: Color(0xFF414042),
+ color: isDarkTheme ? Colors.white : Color(0xFF414042),
),
),
SizedBox(height: 20),
@@ -779,7 +796,8 @@ class _CreateNewPwState extends ConsumerState {
),
),
backgroundColor: WidgetStatePropertyAll(
- MyTheme.topicColor(IndicatorTopic.social),
+ Color(0xFFB68A34),
+ // MyTheme.topicColor(IndicatorTopic.social),
),
// surfaceTintColor: MaterialStatePropertyAll(
// MyTheme.economy[800],
@@ -810,7 +828,7 @@ class _CreateNewPwState extends ConsumerState {
],
),
),
- SizedBox(height: screenHeight*0.25),
+ SizedBox(height: screenHeight * 0.25),
// Spacer(),
Center(
// child: Container(
@@ -829,4 +847,4 @@ class _CreateNewPwState extends ConsumerState {
),
);
}
-}
+}
\ No newline at end of file
diff --git a/lib/presentation/Screens/auth_verification/registration.dart b/lib/presentation/Screens/auth_verification/registration.dart
index 2ffb6ab2..8cd9657b 100644
--- a/lib/presentation/Screens/auth_verification/registration.dart
+++ b/lib/presentation/Screens/auth_verification/registration.dart
@@ -14,6 +14,7 @@ import 'package:uae_stat/infrastructure/services/img_asset_paths/banner_asset_pa
import 'package:uae_stat/infrastructure/services/img_asset_paths/icons/misc_icon_asset_path.dart';
import 'package:uae_stat/presentation/Screens/profilepage.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
+// import 'package:uae_stat/l10n/app_localizations.dart';
import 'package:uae_stat/presentation/components/indicators/locale_provider.dart';
import 'package:uae_stat/presentation/components/my_toggle.dart';
@@ -293,8 +294,7 @@ class _RegisterScreenState extends ConsumerState {
fontFamily: context.translate(
'Roboto',
'NotoKufi',
- )
- ),
+ )),
),
content: Text(
context.translate(
@@ -304,8 +304,7 @@ class _RegisterScreenState extends ConsumerState {
fontFamily: context.translate(
'Roboto',
'NotoKufi',
- )
- ),
+ )),
),
actions: [
TextButton(
@@ -313,24 +312,28 @@ class _RegisterScreenState extends ConsumerState {
Navigator.pop(context);
setState(() {
isRegistering =
- false; // Re-enable the button after error
+ false; // Re-enable the button after error
});
},
style: TextButton.styleFrom(
backgroundColor:
- Color(0xFFAA8E83), // Set background color
+ Color(0xFFAA8E83), // Set background color
foregroundColor: Colors.white,
shape: RoundedRectangleBorder(
borderRadius:
- BorderRadius.circular(10.0), // Set text color
+ BorderRadius.circular(10.0), // Set text color
),
),
child: Text(
context.translate('Ok', 'حسنًا'),
- style: TextStyle(color: Colors.white, fontSize: 16, fontFamily: context.translate(
- 'Roboto',
- 'NotoKufi',
- ),),
+ style: TextStyle(
+ color: Colors.white,
+ fontSize: 16,
+ fontFamily: context.translate(
+ 'Roboto',
+ 'NotoKufi',
+ ),
+ ),
),
),
],
@@ -360,8 +363,6 @@ class _RegisterScreenState extends ConsumerState {
}
}
-
-
@override
Widget build(BuildContext context) {
double screenheight = MediaQuery.of(context).size.height;
@@ -415,7 +416,7 @@ class _RegisterScreenState extends ConsumerState {
if (didPop) return;
context.go('/login'); // Show exit confirmation dialog
},
- child:Scaffold(
+ child: Scaffold(
backgroundColor: isDarkTheme ? Color(0xFF111111) : Colors.white,
body: SafeArea(
child: Stack(children: [
@@ -456,13 +457,20 @@ class _RegisterScreenState extends ConsumerState {
Column(children: [
registrationSuccess
? Padding(
- padding: const EdgeInsets.all(20.0),
+ padding: const EdgeInsets.only(
+ top: 20.0,
+ left: 20.0,
+ right: 20.0,
+ bottom: 10.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
SizedBox(height: screenheight / 4),
- buildIconContainer(
- Icons.check_circle_rounded, Color(0xFF7DAFBC)),
+ buildIconContainer(Icons.check_circle_rounded,
+ Color(0xFFB68A34)
+ // Color(0xFF7DAFBC)
+
+ ),
SizedBox(height: 20),
Text(
context.translate(
@@ -476,8 +484,9 @@ class _RegisterScreenState extends ConsumerState {
),
fontSize: 16,
fontWeight: FontWeight.w500,
- color: isDarkTheme ? Color(0xFFFFFFFF) : Color(0xFF414042)
- ),
+ color: isDarkTheme
+ ? Color(0xFFFFFFFF)
+ : Color(0xFF414042)),
),
SizedBox(height: 10),
Text(
@@ -491,14 +500,21 @@ class _RegisterScreenState extends ConsumerState {
'NotoKufi',
),
fontSize: 14,
- color: isDarkTheme ? Color(0xFFFFFFFF) : Color(0xFF898C81),
+ color: isDarkTheme
+ ? Color(0xFFFFFFFF)
+ : Color(0xFF898C81),
),
),
SizedBox(height: 10),
ElevatedButton(
onPressed: () => {context.go('/login')},
style: ElevatedButton.styleFrom(
- backgroundColor: isDarkTheme ? Color(0xFF24B4FB) : Color(0xFFAA8E83), // Background color
+ backgroundColor: Color(0xFFB68A34),
+
+ // isDarkTheme
+ // ? Color(0xFF24B4FB)
+ // : Color(
+ // 0xFFAA8E83), // Background color
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(
12), // Border radius
@@ -520,14 +536,14 @@ class _RegisterScreenState extends ConsumerState {
Center(
child: Container(
height: screenheight / 16,
- width: screenwidth / 2.5,
+ // width: screenwidth / 2.5,
decoration: BoxDecoration(
image: DecorationImage(
- image: AssetImage(
- isDarkTheme
- ? BannerAssetPath.fcscLogoDark
- : BannerAssetPath.fcscLogoLight), // Background image asset
- fit: BoxFit.fill,
+ image: AssetImage(isDarkTheme
+ ? BannerAssetPath.fcscLogoDark
+ : BannerAssetPath
+ .fcscLogoLight), // Background image asset
+ // fit: BoxFit.fill,
),
),
))
@@ -556,7 +572,9 @@ class _RegisterScreenState extends ConsumerState {
),
fontSize: 16,
fontWeight: FontWeight.w500,
- color: isDarkTheme ? Color(0xFFFFFFFF) : Color(0xFF414042)),
+ color: isDarkTheme
+ ? Color(0xFFFFFFFF)
+ : Color(0xFF414042)),
),
SizedBox(height: 10),
Text(
@@ -570,7 +588,9 @@ class _RegisterScreenState extends ConsumerState {
'NotoKufi',
),
fontSize: 14,
- color: isDarkTheme ? Color(0xFFEEEEEE) : Color(0xFF898C81),
+ color: isDarkTheme
+ ? Color(0xFFEEEEEE)
+ : Color(0xFF898C81),
),
),
SizedBox(height: 10),
@@ -590,11 +610,15 @@ class _RegisterScreenState extends ConsumerState {
context.translate(
'Retry', 'أعد المحاولة'),
style: TextStyle(
- fontFamily: context.translate(
- 'Roboto',
- 'NotoKufi',
- ),
- color: isDarkTheme ? Color(0xFF24B4FB) : Color(0xFFAA8E83),
+ fontFamily: context.translate(
+ 'Roboto',
+ 'NotoKufi',
+ ),
+ color: Color(0xFFB68A34),
+
+ // color: isDarkTheme
+ // ? Color(0xFF24B4FB)
+ // : Color(0xFFAA8E83),
),
),
),
@@ -602,14 +626,14 @@ class _RegisterScreenState extends ConsumerState {
Center(
child: Container(
height: screenheight / 16,
- width: screenwidth / 2.5,
+ // width: screenwidth / 2.5,
decoration: BoxDecoration(
image: DecorationImage(
- image: AssetImage(
- isDarkTheme
- ? BannerAssetPath.fcscLogoDark
- : BannerAssetPath.fcscLogoLight), // Background image asset
- fit: BoxFit.fill,
+ image: AssetImage(isDarkTheme
+ ? BannerAssetPath.fcscLogoDark
+ : BannerAssetPath
+ .fcscLogoLight), // Background image asset
+ // fit: BoxFit.fill,
),
),
))
@@ -620,8 +644,8 @@ class _RegisterScreenState extends ConsumerState {
key: _formKey,
child: SingleChildScrollView(
child: Column(
- mainAxisAlignment:
- MainAxisAlignment.center,
+ // mainAxisAlignment:
+ // MainAxisAlignment.center,
children: [
SizedBox(height: screenheight / 60),
Text(
@@ -629,13 +653,15 @@ class _RegisterScreenState extends ConsumerState {
AppLocalizations.of(context)!
.register_title,
style: TextStyle(
- fontFamily: context.translate(
- 'Roboto',
- 'NotoKufi',
- ),
- fontSize: 32,
- fontWeight: FontWeight.w400,
- color: isDarkTheme ? Color(0xFFFFFFFF) : Color(0xFF000000),
+ fontFamily: context.translate(
+ 'Roboto',
+ 'NotoKufi',
+ ),
+ fontSize: 32,
+ fontWeight: FontWeight.w400,
+ color: isDarkTheme
+ ? Color(0xFFFFFFFF)
+ : Color(0xFF000000),
),
),
SizedBox(height: 10),
@@ -649,12 +675,14 @@ class _RegisterScreenState extends ConsumerState {
),
fontSize:
context.translate(18.0, 14.0),
- color: isDarkTheme ? Color(0xFFFFFFFF) : Color(0xFF898C81),
+ color: isDarkTheme
+ ? Color(0xFFFFFFFF)
+ : Color(0xFF898C81),
fontWeight: FontWeight.w600,
),
),
- SizedBox(height: 20),
+ SizedBox(height: 15),
// Display this if registration is pending approval
Padding(
padding: const EdgeInsets.only(
@@ -667,9 +695,13 @@ class _RegisterScreenState extends ConsumerState {
// focusNode: _focusNodes[0],
decoration: InputDecoration(
filled: true,
- fillColor: isDarkTheme ? const Color(0xFF000000) : Colors.white,
+ fillColor: isDarkTheme
+ ? const Color(0xFF000000)
+ : Colors.white,
errorStyle: TextStyle(
- color: isDarkTheme ? Color(0xFFFFA200) : Color(0xFFb22222),
+ color: isDarkTheme
+ ? Color(0xFFFFA200)
+ : Color(0xFFb22222),
fontFamily: context.translate(
'Roboto',
'NotoKufi',
@@ -711,7 +743,8 @@ class _RegisterScreenState extends ConsumerState {
borderRadius:
BorderRadius.circular(10),
borderSide: BorderSide(
- color: Color(0xFFB68A34), // ✅ border
+ color: Color(
+ 0xFFB68A34), // ✅ border
width: 1), // Enabled border
),
focusedBorder: OutlineInputBorder(
@@ -743,7 +776,7 @@ class _RegisterScreenState extends ConsumerState {
'Roboto',
'NotoKufi',
),
- color: const Color(0xFFC3C6CB),
+ color: const Color(0xFFC3C6CB),
fontSize: registerLocale
?.languageCode ==
'ar'
@@ -770,9 +803,13 @@ class _RegisterScreenState extends ConsumerState {
// focusNode: _focusNodes[1],
decoration: InputDecoration(
filled: true,
- fillColor: isDarkTheme ? const Color(0xFF000000) : Colors.white,
+ fillColor: isDarkTheme
+ ? const Color(0xFF000000)
+ : Colors.white,
errorStyle: TextStyle(
- color: isDarkTheme ? Color(0xFFFFA200) : Color(0xFFb22222),
+ color: isDarkTheme
+ ? Color(0xFFFFA200)
+ : Color(0xFFb22222),
fontFamily: context.translate(
'Roboto',
'NotoKufi',
@@ -842,7 +879,7 @@ class _RegisterScreenState extends ConsumerState {
'Roboto',
'NotoKufi',
),
- color: const Color(0xFFC3C6CB),
+ color: const Color(0xFFC3C6CB),
fontSize: registerLocale
?.languageCode ==
'ar'
@@ -873,9 +910,13 @@ class _RegisterScreenState extends ConsumerState {
obscureText: _obscurePassword,
decoration: InputDecoration(
filled: true,
- fillColor: isDarkTheme ? const Color(0xFF000000) : Colors.white,
+ fillColor: isDarkTheme
+ ? const Color(0xFF000000)
+ : Colors.white,
errorStyle: TextStyle(
- color: isDarkTheme ? Color(0xFFFFA200) : Color(0xFFb22222),
+ color: isDarkTheme
+ ? Color(0xFFFFA200)
+ : Color(0xFFb22222),
fontFamily: context.translate(
'Roboto',
'NotoKufi',
@@ -977,7 +1018,7 @@ class _RegisterScreenState extends ConsumerState {
'Roboto',
'NotoKufi',
),
- color: const Color(0xFFC3C6CB),
+ color: const Color(0xFFC3C6CB),
fontSize: registerLocale
?.languageCode ==
'ar'
@@ -991,7 +1032,7 @@ class _RegisterScreenState extends ConsumerState {
MaxLengthEnforcement.enforced,
),
),
- SizedBox(height: 15),
+ SizedBox(height: 10),
Padding(
padding: const EdgeInsets.only(
top: 5.0,
@@ -1006,9 +1047,13 @@ class _RegisterScreenState extends ConsumerState {
_obscureConfirmPassword,
decoration: InputDecoration(
filled: true,
- fillColor: isDarkTheme ? const Color(0xFF000000) : Colors.white,
+ fillColor: isDarkTheme
+ ? const Color(0xFF000000)
+ : Colors.white,
errorStyle: TextStyle(
- color: isDarkTheme ? Color(0xFFFFA200) : Color(0xFFb22222),
+ color: isDarkTheme
+ ? Color(0xFFFFA200)
+ : Color(0xFFb22222),
fontFamily: context.translate(
'Roboto',
'NotoKufi',
@@ -1099,7 +1144,7 @@ class _RegisterScreenState extends ConsumerState {
'Roboto',
'NotoKufi',
),
- color: const Color(0xFFC3C6CB),
+ color: const Color(0xFFC3C6CB),
fontSize: registerLocale
?.languageCode ==
'ar'
@@ -1140,8 +1185,8 @@ class _RegisterScreenState extends ConsumerState {
},
side: BorderSide(
color: showError
- ? Color(0xFFD83731)
- : Color(0xFFB68A34),
+ ? Color(0xFFD83731)
+ : Color(0xFFB68A34),
width: 1,
),
),
@@ -1159,7 +1204,8 @@ class _RegisterScreenState extends ConsumerState {
.agree,
// text: 'I agree to ',
style: TextStyle(
- fontFamily: context.translate(
+ fontFamily:
+ context.translate(
'Roboto',
'NotoKufi',
),
@@ -1170,7 +1216,10 @@ class _RegisterScreenState extends ConsumerState {
'ar'
? 12
: 14,
- color: isDarkTheme ? Color(0xFFFFFFFF) : Color(0xFF898C81), // Change to your desired color
+ color: isDarkTheme
+ ? Color(0xFFFFFFFF)
+ : Color(
+ 0xFF898C81), // Change to your desired color
),
children: [
TextSpan(
@@ -1184,7 +1233,8 @@ class _RegisterScreenState extends ConsumerState {
.terms_conditions,
// text: 'Terms & Conditions',
style: TextStyle(
- fontFamily: context.translate(
+ fontFamily: context
+ .translate(
'Roboto',
'NotoKufi',
),
@@ -1197,7 +1247,11 @@ class _RegisterScreenState extends ConsumerState {
fontWeight:
FontWeight
.bold,
- color:isDarkTheme ? Color(0xFFB68A35) : Color(0xFF985400),
+ color: isDarkTheme
+ ? Color(
+ 0xFFB68A35)
+ : Color(
+ 0xFF985400),
// Makes the text bold
// decoration:
// TextDecoration.underline,
@@ -1212,11 +1266,16 @@ class _RegisterScreenState extends ConsumerState {
.of(context)!
.t_and,
style: TextStyle(
- fontFamily: context.translate(
+ fontFamily: context
+ .translate(
'Roboto',
'NotoKufi',
),
- color: isDarkTheme ? Color(0xFFFFFFFF) : Color(0xFF898C81),
+ color: isDarkTheme
+ ? Color(
+ 0xFFFFFFFF)
+ : Color(
+ 0xFF898C81),
),
),
TextSpan(
@@ -1229,7 +1288,8 @@ class _RegisterScreenState extends ConsumerState {
.of(context)!
.privacy_policy,
style: TextStyle(
- fontFamily: context.translate(
+ fontFamily: context
+ .translate(
'Roboto',
'NotoKufi',
),
@@ -1242,7 +1302,11 @@ class _RegisterScreenState extends ConsumerState {
'ar'
? 12
: 14,
- color: isDarkTheme ? Color(0xFFB68A35) : Color(0xFF985400),
+ color: isDarkTheme
+ ? Color(
+ 0xFFB68A35)
+ : Color(
+ 0xFF985400),
// decoration:
// TextDecoration.underline,
decorationColor:
@@ -1256,7 +1320,8 @@ class _RegisterScreenState extends ConsumerState {
.of(context)!
.conditions,
style: TextStyle(
- fontFamily: context.translate(
+ fontFamily: context
+ .translate(
'Roboto',
'NotoKufi',
),
@@ -1267,7 +1332,11 @@ class _RegisterScreenState extends ConsumerState {
'ar'
? 12
: 14,
- color: isDarkTheme ? Color(0xFFFFFFFF) : Color( 0xFF898C81), // Change to your desired color
+ color: isDarkTheme
+ ? Color(
+ 0xFFFFFFFF)
+ : Color(
+ 0xFF898C81), // Change to your desired color
),
),
],
@@ -1300,7 +1369,8 @@ class _RegisterScreenState extends ConsumerState {
context.translate(
'Required', 'مطلوب'),
style: TextStyle(
- fontFamily: context.translate(
+ fontFamily:
+ context.translate(
'Roboto',
'NotoKufi',
),
@@ -1329,7 +1399,8 @@ class _RegisterScreenState extends ConsumerState {
? null
: _registerUser,
style: ElevatedButton.styleFrom(
- backgroundColor: Color(0xFFB68A34), // Brownish color for Register
+ backgroundColor: Color(
+ 0xFFB68A34), // Brownish color for Register
shape: RoundedRectangleBorder(
borderRadius:
BorderRadius.circular(10),
@@ -1344,76 +1415,8 @@ class _RegisterScreenState extends ConsumerState {
context)!
.register_title,
style: TextStyle(
- fontFamily: context.translate(
- 'Roboto',
- 'NotoKufi',
- ),
- fontSize: registerLocale
- ?.languageCode ==
- 'ar'
- ? 14
- : 16,
- color: Colors.white
- ),
- ),
- SizedBox(width: 8),
- Icon(
- Icons
- .chevron_right_outlined,
- color: Colors.white, // Set your desired color here
- )
- ],
- ),
- ),
- ),
- ),
- SizedBox(height: 15),
- Text(
- AppLocalizations.of(context)!
- .account_confirmation,
- style: TextStyle(
- fontFamily: context.translate(
- 'Roboto',
- 'NotoKufi',
- ),
- fontWeight: FontWeight.w500,
- fontSize:
- registerLocale?.languageCode ==
- 'ar'
- ? 12
- : 14,
- color: isDarkTheme ? Color(0xFFFFFFFF) : Color(0xFF898C81),
- ),
- ),
- SizedBox(height: 15),
- Padding(
- padding: const EdgeInsets.only(
- top: 5.0,
- bottom: 10,
- left: 30,
- right: 30),
- child: SizedBox(
- width: screenwidth / 1,
- child: ElevatedButton(
- onPressed: () {
- context.pop();
- },
- style: ElevatedButton.styleFrom(
- backgroundColor: Color(0xFFB68A34), // Blueish color for Login
- shape: RoundedRectangleBorder(
- borderRadius:
- BorderRadius.circular(10),
- ),
- ),
- child: Row(
- mainAxisSize: MainAxisSize.min,
- children: [
- Text(
- AppLocalizations.of(
- context)!
- .login_title,
- style: TextStyle(
- fontFamily: context.translate(
+ fontFamily:
+ context.translate(
'Roboto',
'NotoKufi',
),
@@ -1428,17 +1431,94 @@ class _RegisterScreenState extends ConsumerState {
Icon(
Icons
.chevron_right_outlined,
- color: Colors.white, // Set your desired color here
+ color: Colors
+ .white, // Set your desired color here
)
],
),
),
),
),
+ SizedBox(height: 5),
+ Text(
+ AppLocalizations.of(context)!
+ .account_confirmation,
+ style: TextStyle(
+ fontFamily: context.translate(
+ 'Roboto',
+ 'NotoKufi',
+ ),
+ fontWeight: FontWeight.w500,
+ fontSize:
+ registerLocale?.languageCode ==
+ 'ar'
+ ? 12
+ : 14,
+ color: isDarkTheme
+ ? Color(0xFFFFFFFF)
+ : Color(0xFF898C81),
+ ),
+ ),
+ SizedBox(height: 5),
+ Padding(
+ padding: const EdgeInsets.only(
+ top: 5.0,
+ bottom: 10,
+ left: 30,
+ right: 30),
+ child: SizedBox(
+ width: screenwidth / 1,
+ child: ElevatedButton(
+ onPressed: () {
+ context.pop();
+ },
+ style: ElevatedButton.styleFrom(
+ backgroundColor: Color(
+ 0xFFB68A34), // Blueish color for Login
+ shape: RoundedRectangleBorder(
+ borderRadius:
+ BorderRadius.circular(10),
+ ),
+ ),
+ child: Row(
+ mainAxisSize: MainAxisSize.min,
+ children: [
+ Text(
+ AppLocalizations.of(
+ context)!
+ .login_title,
+ style: TextStyle(
+ fontFamily:
+ context.translate(
+ 'Roboto',
+ 'NotoKufi',
+ ),
+ fontSize: registerLocale
+ ?.languageCode ==
+ 'ar'
+ ? 14
+ : 16,
+ color: Colors.white),
+ ),
+ SizedBox(width: 8),
+ Icon(
+ Icons
+ .chevron_right_outlined,
+ color: Colors
+ .white, // Set your desired color here
+ )
+ ],
+ ),
+ ),
+ ),
+ ),
+ // Spacer(),
+
SizedBox(
height: 10,
),
- Center(
+ Padding(
+ padding: const EdgeInsets.all(20.0),
// child: Container(
// height: screenheight / 16,
// width: screenwidth / 3,
@@ -1452,9 +1532,9 @@ class _RegisterScreenState extends ConsumerState {
// )
child: fcscBanner,
),
- SizedBox(
- height: 20,
- ),
+ // SizedBox(
+ // height: 5,
+ // ),
],
),
),
@@ -1491,4 +1571,4 @@ class _RegisterScreenState extends ConsumerState {
)),
);
}
-}
+}
\ No newline at end of file
diff --git a/lib/presentation/Screens/profilepage.dart b/lib/presentation/Screens/profilepage.dart
index 97cd1f2b..6b715c4b 100644
--- a/lib/presentation/Screens/profilepage.dart
+++ b/lib/presentation/Screens/profilepage.dart
@@ -5,6 +5,7 @@ import 'package:external_repos/external_repos.dart';
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
+import 'package:flutter_hooks/flutter_hooks.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:go_router/go_router.dart';
import 'package:http/http.dart' as http;
@@ -23,7 +24,7 @@ import 'package:uae_stat/presentation/components/indicators/locale_provider.dart
import 'package:uae_stat/presentation/components/my_toggle.dart';
import 'package:uae_stat/presentation/routes/bottom_bar_routes/tab_routes/home_route.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
-
+// import 'package:uae_stat/l10n/app_localizations.dart';
import '../components/my_bottom_nav_bar.dart';
import 'auth_verification/changepassword.dart';
import 'demo_home.dart';
@@ -71,14 +72,17 @@ class _ProfileScreenState extends ConsumerState {
// Date format for the display
final DateFormat _dateFormat = DateFormat('yyyy-MM-dd');
- final List _countries = [
- 'United Arab Emirates',
- 'United States',
- 'India',
- 'Canada'
- ];
+ // final List _countries = [
+ // 'United Arab Emirates',
+ // 'United States',
+ // 'India',
+ // 'Canada'
+ // ];
final List preferred_language = ['English', 'Arabic'];
- String? _selectedCountry;
+ // String? _selectedCountry;
+ ISOCountry? _selectedCountry;
+ String? preferredLang;
+
String? _selectedLanguage;
bool isChecked = false;
bool showError = false;
@@ -98,6 +102,8 @@ class _ProfileScreenState extends ConsumerState {
super.initState();
// print(widget.userId);
+ _selectedCountry ??= ISOCountry.numeric784;
+
final themeMode = ref.read(themeProvider);
isDarkTheme = themeMode == ThemeMode.dark ||
(themeMode == ThemeMode.system &&
@@ -198,10 +204,10 @@ class _ProfileScreenState extends ConsumerState {
_isLoading = true; // Start loading
});
final XFile? pickedFile =
- await _picker.pickImage(source: ImageSource.gallery);
+ await _picker.pickImage(source: ImageSource.gallery);
if (pickedFile != null) {
final String fileExtension =
- pickedFile.path.split('.').last.toLowerCase();
+ pickedFile.path.split('.').last.toLowerCase();
if (fileExtension == 'jpg' ||
fileExtension == 'jpeg' ||
fileExtension == 'png' ||
@@ -212,13 +218,15 @@ class _ProfileScreenState extends ConsumerState {
});
} else {
ScaffoldMessenger.of(context).showSnackBar(
- SnackBar(content: Text('Please select a JPG, JPEG, or PNG file.',
- style: TextStyle(
- fontFamily: context.translate(
- 'Roboto',
- 'NotoKufi',
- )
- ),)),
+ SnackBar(
+ content: Text(
+ 'Please select a JPG, JPEG, or PNG file.',
+ style: TextStyle(
+ fontFamily: context.translate(
+ 'Roboto',
+ 'NotoKufi',
+ )),
+ )),
);
}
}
@@ -245,7 +253,7 @@ class _ProfileScreenState extends ConsumerState {
return Theme(
data: Theme.of(context).copyWith(
dialogBackgroundColor:
- Colors.white, // Background color of the date picker
+ Colors.white, // Background color of the date picker
textButtonTheme: TextButtonThemeData(
style: ButtonStyle(
shape: WidgetStateProperty.all(RoundedRectangleBorder(
@@ -336,8 +344,13 @@ class _ProfileScreenState extends ConsumerState {
// String username = 'users55538';
// String email = 'surendarsuri30@gmail.com';
String dateOfBirth = _dateController.text; // in DD/MM/YYYY format
- String countryRegion = _selectedCountry ?? '';
- String preferredLang = _selectedLanguage == 'English' ? 'en' : 'ar';
+ // String countryRegion = _selectedCountry ?? '';
+ String countryRegion = context.translate(
+ _selectedCountry?.nameEN ?? '',
+ _selectedCountry?.nameAR ?? '',
+ );
+
+ preferredLang = _selectedLanguage == 'English' ? 'en' : 'ar';
bool termsAccepted = isChecked;
// Parse the date from dd/MM/yyyy format and convert to yyyy-MM-dd
@@ -347,14 +360,14 @@ class _ProfileScreenState extends ConsumerState {
// Create a multipart request
final uri =
- Uri.parse('${_pb.baseUrl}/api/collections/users/records/$userID');
+ Uri.parse('${_pb.baseUrl}/api/collections/users/records/$userID');
final request = http.MultipartRequest('PATCH', uri);
// Add other fields
request.fields['full_name'] = fullName;
request.fields['dob'] = formattedDob;
request.fields['country_region'] = countryRegion;
- request.fields['language'] = preferredLang;
+ request.fields['language'] = preferredLang!;
request.fields['is_profile_completed'] = 'True';
// Add the file, if available
@@ -371,14 +384,15 @@ class _ProfileScreenState extends ConsumerState {
// Send the request
final response = await request.send();
print(response);
- ScaffoldMessenger.of(context).showSnackBar(
- SnackBar(content: Text(AppLocalizations.of(context)!.profile_updated_successfully,
- style: TextStyle(
- fontFamily: context.translate(
- 'Roboto',
- 'NotoKufi',
- )
- ),)));
+ ScaffoldMessenger.of(context).showSnackBar(SnackBar(
+ content: Text(
+ AppLocalizations.of(context)!.profile_updated_successfully,
+ style: TextStyle(
+ fontFamily: context.translate(
+ 'Roboto',
+ 'NotoKufi',
+ )),
+ )));
// **Set Default Locale in Provider**
print('_selectedLanguage $_selectedLanguage');
preferredLang = _selectedLanguage == 'English' ? 'en' : 'ar';
@@ -397,12 +411,17 @@ class _ProfileScreenState extends ConsumerState {
context.go('/welcomePage');
} catch (error) {
ScaffoldMessenger.of(context).showSnackBar(
- SnackBar(content: Text(context.translate("Failed to update profile: $error",'$error فشل في تحديث الملف الشخصي: '),style: TextStyle(
- fontFamily: context.translate(
- 'Roboto',
- 'NotoKufi',
- )
- ),)),);
+ SnackBar(
+ content: Text(
+ context.translate("Failed to update profile: $error",
+ '$error فشل في تحديث الملف الشخصي: '),
+ style: TextStyle(
+ fontFamily: context.translate(
+ 'Roboto',
+ 'NotoKufi',
+ )),
+ )),
+ );
}
}
}
@@ -444,21 +463,27 @@ class _ProfileScreenState extends ConsumerState {
'Logout',
'تسجيل الخروج',
),
- style:
- TextStyle(color: Color(0xFF898C81), fontWeight: FontWeight.w700,fontFamily: context.translate(
- 'Roboto',
- 'NotoKufi',
- ),),
+ style: TextStyle(
+ color: Color(0xFF898C81),
+ fontWeight: FontWeight.w700,
+ fontFamily: context.translate(
+ 'Roboto',
+ 'NotoKufi',
+ ),
+ ),
),
content: Text(
context.translate(
'Are you sure you want to logout?',
'هل أنت متأكد أنك تريد تسجيل الخروج؟',
),
- style: TextStyle(color: Color(0xFF898C81),fontFamily: context.translate(
- 'Roboto',
- 'NotoKufi',
- ),),
+ style: TextStyle(
+ color: Color(0xFF898C81),
+ fontFamily: context.translate(
+ 'Roboto',
+ 'NotoKufi',
+ ),
+ ),
),
actions: [
TextButton(
@@ -477,10 +502,11 @@ class _ProfileScreenState extends ConsumerState {
'إلغاء',
),
style: TextStyle(
- color: Color(0xFFAA8E83),fontFamily: context.translate(
- 'Roboto',
- 'NotoKufi',
- ), // Text color
+ color: Color(0xFFAA8E83),
+ fontFamily: context.translate(
+ 'Roboto',
+ 'NotoKufi',
+ ), // Text color
),
),
),
@@ -499,10 +525,11 @@ class _ProfileScreenState extends ConsumerState {
'تسجيل الخروج',
),
style: TextStyle(
- color: Colors.white, fontFamily: context.translate(
- 'Roboto',
- 'NotoKufi',
- ),// Text color
+ color: Colors.white,
+ fontFamily: context.translate(
+ 'Roboto',
+ 'NotoKufi',
+ ), // Text color
),
),
),
@@ -528,6 +555,15 @@ class _ProfileScreenState extends ConsumerState {
(themeMode == ThemeMode.system &&
MediaQuery.of(context).platformBrightness == Brightness.dark);
+ final searchTerm = '';
+
+ final _countries = ISOCountry.values.where((country) {
+ final query = searchTerm.trim().toLowerCase();
+ if (query.isEmpty) return true; // 🔥 show all if search is empty
+ return country.nameEN.toLowerCase().contains(query) ||
+ country.nameAR.toLowerCase().contains(query);
+ }).toList();
+
return PopScope(
canPop: false, // Allow back navigation only if not login screen
onPopInvokedWithResult: (didPop, result) {
@@ -541,16 +577,23 @@ class _ProfileScreenState extends ConsumerState {
elevation: 0,
leading: IconButton(
icon: Icon(Icons.arrow_back_ios_new, color: Colors.black),
- onPressed: () {
- context.go('/');
+ onPressed: () async {
+ final prefs = await SharedPreferences.getInstance();
+ await _authRepo.logout();
+ prefs.clear();
+ context.go('/login');
+ // context.go('/');
},
),
title: Text(
AppLocalizations.of(context)!.my_profile,
- style: TextStyle(color: Color(0xFF985400),fontFamily: context.translate(
- 'Roboto',
- 'NotoKufi',
- ),),
+ style: TextStyle(
+ color: Color(0xFF985400),
+ fontFamily: context.translate(
+ 'Roboto',
+ 'NotoKufi',
+ ),
+ ),
),
actions: [
Consumer(
@@ -633,7 +676,7 @@ class _ProfileScreenState extends ConsumerState {
backgroundImage: _profileImage != null
? FileImage(_profileImage!)
: AssetImage("assets/edit_profile/profile.png")
- as ImageProvider,
+ as ImageProvider,
child: Align(
alignment: Alignment.bottomRight,
child: GestureDetector(
@@ -657,7 +700,7 @@ class _ProfileScreenState extends ConsumerState {
child: CircularProgressIndicator(
strokeWidth: 2,
valueColor:
- AlwaysStoppedAnimation(Colors.grey),
+ AlwaysStoppedAnimation(Colors.grey),
),
),
],
@@ -745,10 +788,13 @@ class _ProfileScreenState extends ConsumerState {
Text(
AppLocalizations.of(context)!.full_name,
style: TextStyle(
- fontSize: 16, fontWeight: FontWeight.w500,fontFamily: context.translate(
- 'Roboto',
- 'NotoKufi',
- ),),
+ fontSize: 16,
+ fontWeight: FontWeight.w500,
+ fontFamily: context.translate(
+ 'Roboto',
+ 'NotoKufi',
+ ),
+ ),
),
],
),
@@ -776,8 +822,11 @@ class _ProfileScreenState extends ConsumerState {
enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(10),
borderSide: BorderSide(
- color: isDarkTheme ? Colors.white : MyTheme.topicColor(IndicatorTopic.economy)
- .shade400,
+ color: Color(0xFFB68A34),
+ // color: isDarkTheme
+ // ? Colors.white
+ // : MyTheme.topicColor(IndicatorTopic.economy)
+ // .shade400,
width: 1), // Enabled border
),
hintText: _showHints[2] ? 'Enter the name' : null,
@@ -791,7 +840,9 @@ class _ProfileScreenState extends ConsumerState {
),
border: OutlineInputBorder(
borderSide: BorderSide(
- color: isDarkTheme ? Colors.white : Color(0xFF7296BE),
+ color: Color(0xFFB68A34),
+ // color:
+ // isDarkTheme ? Colors.white : Color(0xFF7296BE),
),
borderRadius: BorderRadius.circular(8),
),
@@ -807,12 +858,13 @@ class _ProfileScreenState extends ConsumerState {
Text(
AppLocalizations.of(context)!.dob,
style: TextStyle(
- fontFamily: context.translate(
- 'Roboto',
- 'NotoKufi',
- ),
- fontSize: 16, fontWeight: FontWeight.w500,
- color:isDarkTheme ? Colors.white : null,
+ fontFamily: context.translate(
+ 'Roboto',
+ 'NotoKufi',
+ ),
+ fontSize: 16,
+ fontWeight: FontWeight.w500,
+ color: isDarkTheme ? Colors.white : null,
),
),
],
@@ -828,14 +880,19 @@ class _ProfileScreenState extends ConsumerState {
enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(10),
borderSide: BorderSide(
- color:isDarkTheme ? Colors.white :
- MyTheme.topicColor(IndicatorTopic.economy)
- .shade400,
+ color: Color(0xFFB68A34),
+ // color: isDarkTheme
+ // ? Colors.white
+ // : MyTheme.topicColor(IndicatorTopic.economy)
+ // .shade400,
width: 1), // Enabled border
),
border: OutlineInputBorder(
borderSide: BorderSide(
- color:isDarkTheme ? Colors.white : Color(0xFF7296BE),
+ color: Color(0xFFB68A34),
+ // color: isDarkTheme
+ // ? Colors.white
+ // : Color(0xFF7296BE),
),
borderRadius: BorderRadius.circular(8),
),
@@ -846,7 +903,9 @@ class _ProfileScreenState extends ConsumerState {
'Roboto',
'NotoKufi',
),
- color: isDarkTheme ? Colors.white : Color(0xFFC3C6CB),
+ color:
+ isDarkTheme ? Colors.white : Color(0xFFC3C6CB),
+ // color: Color(0xFFB68A34),
fontSize: 14,
),
@@ -854,11 +913,11 @@ class _ProfileScreenState extends ConsumerState {
width: 45,
padding: EdgeInsets.only(right: 1),
alignment:
- Alignment.center, // Center the icon vertically
+ Alignment.center, // Center the icon vertically
child: Icon(
Icons.keyboard_arrow_down_sharp,
color:
- _isHoveringDate ? Colors.black : Colors.grey,
+ _isHoveringDate ? Colors.black : Colors.grey,
),
),
),
@@ -878,9 +937,9 @@ class _ProfileScreenState extends ConsumerState {
'Roboto',
'NotoKufi',
),
- fontSize: 16, fontWeight: FontWeight.w500,
- color: isDarkTheme ? Colors.white : null
- ),
+ fontSize: 16,
+ fontWeight: FontWeight.w500,
+ color: isDarkTheme ? Colors.white : null),
),
],
),
@@ -890,20 +949,26 @@ class _ProfileScreenState extends ConsumerState {
setState(() => _isHoveringDropdown = true),
onExit: (_) =>
setState(() => _isHoveringDropdown = false),
- child: DropdownButtonFormField(
+
+ child: DropdownButtonFormField(
+ isExpanded: true,
value: _selectedCountry,
decoration: InputDecoration(
enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(10),
borderSide: BorderSide(
- color: isDarkTheme ? Colors.white :
- MyTheme.topicColor(IndicatorTopic.economy)
- .shade400,
+ color: Color(0xFFB68A34),
+ // color: Colors.red,
+ // : MyTheme.topicColor(
+ // IndicatorTopic.economy).shade400,
width: 1), // Enabled border
),
border: OutlineInputBorder(
borderSide: BorderSide(
- color: isDarkTheme ? Colors.white : Color(0xFF7296BE),
+ color: Color(0xFFB68A34),
+ // color: isDarkTheme
+ // ? Colors.white
+ // : Color(0xFF7296BE),
),
borderRadius: BorderRadius.circular(8),
),
@@ -913,25 +978,90 @@ class _ProfileScreenState extends ConsumerState {
? Colors.black
: Colors.grey),
items: _countries
- .map((item) => DropdownMenuItem(
- value: item,
- child: Text(item,
- style: TextStyle(
- fontFamily: context.translate(
- 'Roboto',
- 'NotoKufi',
- ),
- color: isDarkTheme ? Colors.white : null,
- ),),
- ))
+ .map((item) => DropdownMenuItem(
+ value: item,
+ child: SizedBox(
+ width: double.infinity,
+ child: Text(
+ // item.nameEN,
+ context.translate(
+ item.nameEN, item.nameAR),
+ overflow: TextOverflow.ellipsis,
+ maxLines: 1,
+ style: TextStyle(
+ fontFamily: context.translate(
+ 'Roboto',
+ 'NotoKufi',
+ ),
+ // color: Colors.red
+ color:
+ isDarkTheme ? Colors.white : null,
+ ),
+ ),
+ ),
+ ))
.toList(),
- onChanged: (String? newValue) {
+ onChanged: (ISOCountry? newValue) {
setState(() {
_selectedCountry = newValue;
});
},
- validator: _validateDropdown,
+ validator: (value) {
+ if (value == null)
+ return context.translate(
+ 'Please select a country', 'يرجى اختيار دولة');
+ return null;
+ },
),
+
+ //Available Default Four Countries
+ // child: DropdownButtonFormField(
+ // value: _selectedCountry,
+ // decoration: InputDecoration(
+ // enabledBorder: OutlineInputBorder(
+ // borderRadius: BorderRadius.circular(10),
+ // borderSide: BorderSide(
+ // color: Color(0xFFB68A34),
+ // // : MyTheme.topicColor(
+ // // IndicatorTopic.economy).shade400,
+ // width: 1), // Enabled border
+ // ),
+ // border: OutlineInputBorder(
+ // borderSide: BorderSide(
+ // color: Color(0xFFB68A34),
+ // // color: isDarkTheme
+ // // ? Colors.white
+ // // : Color(0xFF7296BE),
+ // ),
+ // borderRadius: BorderRadius.circular(8),
+ // ),
+ // labelText: context.translate('Select', ' اختيار')),
+ // icon: Icon(Icons.keyboard_arrow_down_sharp,
+ // color: _isHoveringDropdown
+ // ? Colors.black
+ // : Colors.grey),
+ // items: _countries
+ // .map((item) => DropdownMenuItem(
+ // value: item,
+ // child: Text(
+ // item,
+ // style: TextStyle(
+ // fontFamily: context.translate(
+ // 'Roboto',
+ // 'NotoKufi',
+ // ),
+ // color: isDarkTheme ? Colors.white : null,
+ // ),
+ // ),
+ // ))
+ // .toList(),
+ // onChanged: (String? newValue) {
+ // setState(() {
+ // _selectedCountry = newValue;
+ // });
+ // },
+ // validator: _validateDropdown,
+ // ),
),
SizedBox(height: 10),
Row(
@@ -940,12 +1070,13 @@ class _ProfileScreenState extends ConsumerState {
Text(
AppLocalizations.of(context)!.preferredLang,
style: TextStyle(
- fontFamily: context.translate(
- 'Roboto',
- 'NotoKufi',
- ),
- fontSize: 16, fontWeight: FontWeight.w500,
- color: isDarkTheme ? Colors.white : null,
+ fontFamily: context.translate(
+ 'Roboto',
+ 'NotoKufi',
+ ),
+ fontSize: 16,
+ fontWeight: FontWeight.w500,
+ color: isDarkTheme ? Colors.white : null,
),
),
],
@@ -962,14 +1093,18 @@ class _ProfileScreenState extends ConsumerState {
enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(10),
borderSide: BorderSide(
- color: isDarkTheme ? Colors.white :
- MyTheme.topicColor(IndicatorTopic.economy)
- .shade400,
+ color: Color(0xFFB68A34),
+ // : MyTheme.topicColor(
+ // IndicatorTopic.economy)
+ // .shade400,
width: 1), // Enabled border
),
border: OutlineInputBorder(
borderSide: BorderSide(
- color: isDarkTheme ? Colors.white : Color(0xFF7296BE),
+ color: Color(0xFFB68A34),
+ // color: isDarkTheme
+ // ? Colors.white
+ // : Color(0xFF7296BE),
),
borderRadius: BorderRadius.circular(8),
),
@@ -980,16 +1115,18 @@ class _ProfileScreenState extends ConsumerState {
: Colors.grey),
items: preferred_language
.map((item) => DropdownMenuItem(
- value: item,
- child: Text(item,
- style: TextStyle(
- fontFamily: context.translate(
- 'Roboto',
- 'NotoKufi',
- ),
- color: isDarkTheme ? Colors.white : null,
- ),),
- ))
+ value: item,
+ child: Text(
+ item,
+ style: TextStyle(
+ fontFamily: context.translate(
+ 'Roboto',
+ 'NotoKufi',
+ ),
+ color: isDarkTheme ? Colors.white : null,
+ ),
+ ),
+ ))
.toList(),
onChanged: (String? newValue) {
setState(() {
@@ -1012,9 +1149,14 @@ class _ProfileScreenState extends ConsumerState {
},
side: BorderSide(
color: showError
- ? isDarkTheme ? Color(0xFFFFA200) : Color(0xFFb22222)
- : isDarkTheme ? Colors.white : Color(0xFF7296BE),
+ ? isDarkTheme
+ ? Color(0xFFB68A34)
+ : Color(0xFFb22222)
+ : Color(0xFFB68A34),
+ // : isDarkTheme
+ // ? Colors.white
+ // : Color(0xFF7296BE),
width: 1,
),
),
@@ -1034,7 +1176,10 @@ class _ProfileScreenState extends ConsumerState {
),
fontWeight: FontWeight.w500,
fontSize: 14,
- color: isDarkTheme ? Colors.white : Color(0xFF898C81), // Change to your desired color
+ color: isDarkTheme
+ ? Colors.white
+ : Color(
+ 0xFF898C81), // Change to your desired color
),
children: [
TextSpan(
@@ -1051,11 +1196,16 @@ class _ProfileScreenState extends ConsumerState {
),
fontSize: 14,
fontWeight: FontWeight.bold,
- color: isDarkTheme ? Color(0xFF9EB3E4) : Color(0xFF985400),
+ color: Color(0xFFB68A34),
+
+ // color: isDarkTheme
+ // ? Color(0xFF9EB3E4)
+ // : Color(0xFF985400),
// Makes the text bold
// decoration:
// TextDecoration.underline,
- decorationColor: Color(0xFF985400),
+ decorationColor: Color(0xFFB68A34),
+ // decorationColor: Color(0xFF985400),
decorationThickness: 1),
),
TextSpan(
@@ -1065,7 +1215,9 @@ class _ProfileScreenState extends ConsumerState {
'Roboto',
'NotoKufi',
),
- color: isDarkTheme ? Colors.white : Color(
+ color: isDarkTheme
+ ? Colors.white
+ : Color(
0xFF898C81), // Change to your desired color
),
),
@@ -1082,10 +1234,14 @@ class _ProfileScreenState extends ConsumerState {
'Roboto',
'NotoKufi',
),
- color: isDarkTheme ? Color(0xFF9EB3E4) : Color(0xFF985400),
+ color: Color(0xFFB68A34),
+
+ // color: isDarkTheme
+ // ? Color(0xFF9EB3E4)
+ // : Color(0xFF985400),
// decoration:
// TextDecoration.underline,
- decorationColor: Color(0xFF648CBA),
+ decorationColor: Color(0xFFB68A34),
decorationThickness: 1),
),
TextSpan(
@@ -1098,7 +1254,9 @@ class _ProfileScreenState extends ConsumerState {
),
fontWeight: FontWeight.w500,
fontSize: 14,
- color: isDarkTheme ? Colors.white : Color(
+ color: isDarkTheme
+ ? Colors.white
+ : Color(
0xFF898C81), // Change to your desired color
),
),
@@ -1147,7 +1305,10 @@ class _ProfileScreenState extends ConsumerState {
AppLocalizations.of(context)!.change_password,
style: TextStyle(
// color: Color(0xFF648CBA),
- color: isDarkTheme ? Color(0xFF9EB3E4) : Color(0xFF985400),
+ color: Color(0xFFB68A34),
+ // color: isDarkTheme
+ // ? Color(0xFF9EB3E4)
+ // : Color(0xFF985400),
fontSize: 14,
fontWeight: FontWeight.w700,
fontFamily: context.translate(
@@ -1173,12 +1334,15 @@ class _ProfileScreenState extends ConsumerState {
} else {
setState(() {
showError =
- !isChecked; // Show error if the checkbox is not checked
+ !isChecked; // Show error if the checkbox is not checked
});
}
},
style: ElevatedButton.styleFrom(
- backgroundColor: isDarkTheme ? Color(0xFF7296BE) :Color(0xFF92722A),
+ backgroundColor: Color(0xFFB68A34),
+
+ // backgroundColor:
+ // isDarkTheme ? Color(0xFF7296BE) : Color(0xFF92722A),
minimumSize: Size(double.infinity, 50),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8),
@@ -1186,14 +1350,17 @@ class _ProfileScreenState extends ConsumerState {
),
child: Row(
mainAxisAlignment:
- MainAxisAlignment.center, // Center the content
+ MainAxisAlignment.center, // Center the content
children: [
Text(
AppLocalizations.of(context)!.save,
- style: TextStyle(color: Colors.white,fontFamily: context.translate(
- 'Roboto',
- 'NotoKufi',
- ),),
+ style: TextStyle(
+ color: Colors.white,
+ fontFamily: context.translate(
+ 'Roboto',
+ 'NotoKufi',
+ ),
+ ),
),
SizedBox(width: 8), // Add space between text and icon
Image.asset(
@@ -1258,35 +1425,36 @@ class ConfirmationDialog extends ConsumerWidget {
children: [
TextSpan(
text: AppLocalizations.of(context)!.name,
- style:
- TextStyle(fontWeight: FontWeight.w700,fontFamily: context.translate(
- 'Roboto',
- 'NotoKufi',
- ),color: isDarkTheme ? Colors.white : null), // Bold for "name"
- ),
- TextSpan(
- text: context.translate(' or ', 'أو'),
- style: TextStyle(
- color: isDarkTheme ? Colors.white : null,
- )
- ),
- TextSpan(
- text: AppLocalizations.of(context)!.dob,
style: TextStyle(
+ fontWeight: FontWeight.w700,
fontFamily: context.translate(
'Roboto',
'NotoKufi',
),
- fontWeight: FontWeight.w700,
- color: isDarkTheme ? Colors.white : null,
+ color:
+ isDarkTheme ? Colors.white : null), // Bold for "name"
+ ),
+ TextSpan(
+ text: context.translate(' or ', 'أو'),
+ style: TextStyle(
+ color: isDarkTheme ? Colors.white : null,
+ )),
+ TextSpan(
+ text: AppLocalizations.of(context)!.dob,
+ style: TextStyle(
+ fontFamily: context.translate(
+ 'Roboto',
+ 'NotoKufi',
+ ),
+ fontWeight: FontWeight.w700,
+ color: isDarkTheme ? Colors.white : null,
), // Bold for "date of birth"
),
TextSpan(
- text: ".",
- style: TextStyle(
- color: isDarkTheme ? Colors.white : null,
- )
- ),
+ text: ".",
+ style: TextStyle(
+ color: isDarkTheme ? Colors.white : null,
+ )),
],
),
textAlign: TextAlign.center,
@@ -1309,23 +1477,36 @@ class ConfirmationDialog extends ConsumerWidget {
Navigator.of(context).pop(false);
},
style: OutlinedButton.styleFrom(
- side: BorderSide(color: isDarkTheme ? Color(0xFF7296BE) : Color(0xFF92722A)),
+ side: BorderSide(color: Color(0xFFB68A34)
+ // color:
+ // isDarkTheme ? Color(0xFF7296BE) : Color(0xFF92722A)
+ //
+
+ ),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(7)),
), // Set the border color here
),
child: Text(
"Cancel",
- style: TextStyle(color: isDarkTheme ? Color(0xFF7296BE) : Color(0xFF92722A),fontFamily: context.translate(
- 'Roboto',
- 'NotoKufi',
- ),),
+ style: TextStyle(
+ color: Color(0xFFB68A34),
+ // color: isDarkTheme ? Color(0xFF7296BE) : Color(0xFF92722A),
+ fontFamily: context.translate(
+ 'Roboto',
+ 'NotoKufi',
+ ),
+ ),
),
),
ElevatedButton(
onPressed: () => Navigator.of(context).pop(true),
style: ElevatedButton.styleFrom(
- backgroundColor: isDarkTheme ? Color(0xFF7296BE) : Color(0xFF92722A), // Brown color
+ backgroundColor: Color(0xFFB68A34),
+
+ // backgroundColor: isDarkTheme
+ // ? Color(0xFF7296BE)
+ // : Color(0xFF92722A), // Brown color
foregroundColor: Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8),
@@ -1351,4 +1532,4 @@ class ConfirmationDialog extends ConsumerWidget {
],
);
}
-}
+}
\ No newline at end of file
diff --git a/lib/presentation/components/dialogs.dart b/lib/presentation/components/dialogs.dart
index 198466b9..328c0d48 100644
--- a/lib/presentation/components/dialogs.dart
+++ b/lib/presentation/components/dialogs.dart
@@ -40,12 +40,12 @@ extension Dialogs on BuildContext {
/// If [errorDialogBuilder] is provided, an
/// [showLogBtn] is also true exception is thrown;
Future loaderWithErrorDialog(
- FutureOr Function() computation, {
- Future Function(
- Object error, [
- StackTrace stackTrace,
- ])? errorDialogBuilder,
- }) async {
+ FutureOr Function() computation, {
+ Future Function(
+ Object error, [
+ StackTrace stackTrace,
+ ])? errorDialogBuilder,
+ }) async {
final loaderContext = await _pushLoaderDialog();
late final T value;
try {
@@ -100,20 +100,17 @@ extension Dialogs on BuildContext {
final contentText = Text(content);
return AlertDialog(
title: Text(title,
- style: TextStyle(
- color: Color(0xFF898C81),
- fontWeight: FontWeight.w700)
- ),
+ style: TextStyle(
+ color: Color(0xFF898C81), fontWeight: FontWeight.w700)),
content: content.length > 300
? SingleChildScrollView(
- child:Text(
- content,
- style: TextStyle(color: Color(0xFF898C81))
- ),
- )
+ child: Text(content,
+ style: TextStyle(color: Color(0xFF898C81))),
+ )
: Text(
content,
- style: TextStyle(color:Color(0xFF898C81)), // Set content text color
+ style: TextStyle(
+ color: Color(0xFF898C81)), // Set content text color
),
actions: [
TextButton(
@@ -122,11 +119,12 @@ extension Dialogs on BuildContext {
rootNavigator: true,
).pop,
style: TextButton.styleFrom(
- backgroundColor: Color(0xFFAA8E83), // Background color
+ // backgroundColor: Color(0xFFAA8E83), // Background color
+ backgroundColor: Color(0xFFB68A34), // Background color
foregroundColor: Colors.white, // Font (text) color
side: BorderSide(
- // color: Color(0xFF92722A)), // Border outline color
- color: Color(0xFFAA8E83)), // Border outline color
+ // color: Color(0xFF92722A)), // Border outline color
+ color: Color(0xFFB68A34)), // Border outline color
shape: RoundedRectangleBorder(
borderRadius:
BorderRadius.circular(8), // Optional: Rounded corners
@@ -154,11 +152,11 @@ extension Dialogs on BuildContext {
);
Future confirmationDialog(
- String titleText,
- String contentText, {
- String cancelText = 'Cancel',
- String confirmText = 'Confirm',
- }) =>
+ String titleText,
+ String contentText, {
+ String cancelText = 'Cancel',
+ String confirmText = 'Confirm',
+ }) =>
showDialog(
context: this,
barrierDismissible: false,
diff --git a/lib/presentation/routes/auth_routes/login_route.dart b/lib/presentation/routes/auth_routes/login_route.dart
index d5fa9185..2e4bb8d5 100644
--- a/lib/presentation/routes/auth_routes/login_route.dart
+++ b/lib/presentation/routes/auth_routes/login_route.dart
@@ -10,6 +10,7 @@ import 'package:flutter_hooks/flutter_hooks.dart';
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
import 'package:go_router/go_router.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
+import 'package:jwt_decoder/jwt_decoder.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:the_validator/the_validator.dart';
import 'package:uae_stat/config/app_links_helper.dart';
@@ -18,8 +19,10 @@ import 'package:uae_stat/config/my_theme.dart';
import 'package:uae_stat/config/theme/app_theme.dart';
import 'package:uae_stat/config/theme/service.dart';
import 'package:uae_stat/config/theme/theme_provider.dart';
+import 'package:uae_stat/domain/entities/session_entity.dart';
import 'package:uae_stat/domain/use_cases/auth_use_case.dart';
import 'package:uae_stat/domain/use_cases/language.dart';
+import 'package:uae_stat/infrastructure/data/p_auth_repo.dart';
import 'package:uae_stat/infrastructure/services/img_asset_paths/banner_asset_path.dart';
import 'package:uae_stat/infrastructure/services/img_asset_paths/icons/misc_icon_asset_path.dart';
import 'package:uae_stat/presentation/Screens/demo_home.dart';
@@ -30,6 +33,7 @@ import 'package:uae_stat/presentation/components/space.dart';
import 'package:uae_stat/presentation/components/themed_text_field.dart';
import 'package:uae_stat/presentation/routes/bottom_bar_routes/tab_routes/home_route.dart';
import 'package:http/http.dart' as http;
+import 'package:url_launcher/url_launcher.dart';
import '../../Screens/auth_verification/registration.dart';
import 'package:pocketbase/pocketbase.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
@@ -325,6 +329,175 @@ class LoginRoute extends HookConsumerWidget {
print('themeMode $themeMode');
}
+ Future googleLogin(BuildContext context, WidgetRef ref,platform) async {
+ print(platform);
+ try {
+ final authData =
+ await pb.collection('users').authWithOAuth2(platform, (url) async {
+ await launchUrl(url);
+ });
+ print(authData);
+ // ✅ Check if authData is valid
+ if (authData.token.isNotEmpty && authData.record != null) {
+ print("✅ Login Successful");
+ print(authData.record);
+
+ final userDetails = authData.record;
+ final userId = userDetails?.id;
+ final email = userDetails?.data['email'] ?? '';
+ final isProfileComplete =
+ userDetails?.data['is_profile_completed'] ?? '';
+ final loginCount = userDetails?.data['login_count'] ?? '';
+
+ print("User ID: ${userId}");
+ print("Email: ${email}");
+ print("Email: ${isProfileComplete}");
+ print("Email: ${loginCount}");
+
+ await saveUserId(userId!, loginCount);
+ // await getDeviceToken(context, id);
+ await initializeTheme(context, ref, userId);
+
+ final session = await context.loaderWithErrorDialog(
+ () => ref
+ .read(
+ authUseCaseProvider.notifier,
+ )
+ .googleAndAppleAuthencation(authData),
+ errorDialogBuilder: (
+ error, [
+ StackTrace? stackTrace,
+ ]) {
+ if (error == LoginError.invalidEmailPw) {
+ return context.simpleDialog(
+ title: context.translate(
+ 'Incorrect Credentials',
+ 'أوراق غير صحيحة',
+ ),
+ content: context.translate(
+ 'Your email or password is invalid. Please try again.',
+ 'بريدك الإلكتروني أو كلمة المرور غير صالحة. حاول مرة اخرى.',
+ ),
+ );
+ }
+ return context.simpleDialog();
+ },
+ );
+
+ print("sessionTST - $session");
+
+ // final se = _sessionEntityFromPocketbaseRecord(authData);
+ // await _LocalAuthRepo.storeLocally(se);
+
+ // Extract intendedPath from query parameters (if coming from redirect)
+ final String? intendedPath =
+ GoRouterState.of(context).uri.queryParameters['intendedPath'];
+ print("Extracted intendedPath after login: $intendedPath");
+
+ if (isProfileComplete) {
+ print('Redirecting to Home / Intended Path');
+ // **Set Default Locale in Provider**
+ if (preferredLanguage == 'ar') {
+ ref.read(localeProvider.notifier).setLocale(const Locale('ar'));
+ } else {
+ ref.read(localeProvider.notifier).setLocale(const Locale('en'));
+ }
+
+ context.go(intendedPath ?? '/myhomepage');
+ } else {
+ print('Redirecting to Profile Setup');
+
+ context.go('/profile/$userId');
+ }
+ } else {
+ print("❌ Login failed: Invalid authData");
+ }
+ } catch (e) {
+ print("❌ Error during Google login: $e");
+ ScaffoldMessenger.of(context).showSnackBar(
+ SnackBar(content: Text("Login failed. Please try again.")),
+ );
+ }
+ }
+
+ // SessionEntity _sessionEntityFromPocketbaseRecord(RecordAuth ra) {
+ // final decodedToken = JwtDecoder.decode(ra.token);
+ // final expInSeconds = decodedToken['exp'];
+ // final expInMilliseconds = expInSeconds * 1000;
+ // final expiresOn = DateTime.fromMillisecondsSinceEpoch(expInMilliseconds);
+ // final se = SessionEntity(
+ // id: ra.record!.id,
+ // expiresOn: expiresOn,
+ // token: ra.token,
+ // modelJson: ra.record!.toJson(),
+ // );
+ // return se;
+ // }
+
+ // Future googleLogin(BuildContext context,WidgetRef ref) async {
+ // try {
+ // final authData = await pb.collection('users').authWithOAuth2('apple', (url) async {
+ // await launchUrl(url);
+ // });
+ // print(authData);
+ // // ✅ Check if authData is valid
+ // if (authData.token.isNotEmpty && authData.record != null) {
+ //
+ //
+ // print("✅ Login Successful");
+ // print(authData.record);
+ //
+ //
+ // final userDetails = authData.record;
+ // final userId = userDetails?.id;
+ // final email = userDetails?.data['email'] ?? '';
+ // final isProfileComplete = userDetails?.data['is_profile_completed'] ?? '';
+ // final loginCount = userDetails?.data['login_count'] ?? '';
+ // // final verified = userDetails?.data['verified'] ?? '';
+ //
+ // final se = _sessionEntityFromPocketbaseRecord(authData);
+ // await _LocalAuthRepo.storeLocally(se);
+ //
+ // print("User ID: ${userId}");
+ // print("Email: ${email}");
+ // print("Email: ${isProfileComplete}");
+ // print("Email: ${loginCount}");
+ //
+ // await saveUserId(userId!, loginCount);
+ // // await getDeviceToken(context, id);
+ // await initializeTheme(context,ref,userId);
+ //
+ // // Extract intendedPath from query parameters (if coming from redirect)
+ // final String? intendedPath =
+ // GoRouterState.of(context).uri.queryParameters['intendedPath'];
+ // print("Extracted intendedPath after login: $intendedPath");
+ //
+ // if (isProfileComplete) {
+ // print('Redirecting to Home / Intended Path');
+ // // **Set Default Locale in Provider**
+ // if (preferredLanguage == 'ar') {
+ // ref.read(localeProvider.notifier).setLocale(const Locale('ar'));
+ // } else {
+ // ref.read(localeProvider.notifier).setLocale(const Locale('en'));
+ // }
+ // context.go(intendedPath ?? '/myhomepage');
+ // } else {
+ // print('Redirecting to Profile Setup');
+ //
+ // context.go('/profile/$userId');
+ //
+ // }
+ // } else {
+ // print("❌ Login failed: Invalid authData");
+ // }
+ // } catch (e) {
+ // print("❌ Error during Google login: $e");
+ // ScaffoldMessenger.of(context).showSnackBar(
+ // SnackBar(content: Text("Login failed. Please try again.")),
+ // );
+ // }
+ // }
+
@override
Widget build(BuildContext context, WidgetRef ref) {
@@ -662,9 +835,9 @@ class LoginRoute extends HookConsumerWidget {
print("Is Profile Complete: $isProfileComplete");
// Extract intendedPath from query parameters (if coming from redirect)
- final String? intendedPath =
- GoRouterState.of(context).uri.queryParameters['intendedPath'];
- print("Extracted intendedPath after login: $intendedPath");
+ // final String? intendedPath =
+ // GoRouterState.of(context).uri.queryParameters['intendedPath'];
+ // print("Extracted intendedPath after login: $intendedPath");
if (!context.mounted) return;
@@ -676,7 +849,7 @@ class LoginRoute extends HookConsumerWidget {
} else {
ref.read(localeProvider.notifier).setLocale(const Locale('en'));
}
- context.go(intendedPath ?? '/myhomepage');
+ context.go('/myhomepage');
} else {
print('Redirecting to Profile Setup');
if (userId.isNotEmpty) {
@@ -972,7 +1145,9 @@ class LoginRoute extends HookConsumerWidget {
final signInWithGoogleBtn = SizedBox(
width: double.infinity,
child: OutlinedButton(
- onPressed: () async {},
+ onPressed: () async {
+ googleLogin(context,ref,'google');
+ },
style: OutlinedButton.styleFrom(
side: const BorderSide(color: Color(0xFF000000)),
shape: RoundedRectangleBorder(
@@ -1010,7 +1185,9 @@ class LoginRoute extends HookConsumerWidget {
final signInWithAppleBtn = SizedBox(
width: double.infinity,
child: OutlinedButton(
- onPressed: () async {},
+ onPressed: () async {
+ googleLogin(context,ref,'apple');
+ },
style: OutlinedButton.styleFrom(
side: const BorderSide(color: Color(0xFF000000)),
shape: RoundedRectangleBorder(
@@ -1219,3 +1396,30 @@ class LoginRoute extends HookConsumerWidget {
// );
// }
}
+
+
+// abstract class _LocalAuthRepo {
+// static const _key = 'session';
+// static const _storage = FlutterSecureStorage();
+//
+// static Future fetchLocallyStored() async {
+// final e = await _storage.read(key: _key);
+// if (e == null) return null;
+// final se = SessionEntity.fromJson(e);
+// if (se.freshness == SessionFreshness.expired) {
+// await clear();
+// return null;
+// }
+// return se;
+// }
+//
+// static Future storeLocally(
+// SessionEntity se,
+// ) =>
+// _storage.write(
+// key: _key,
+// value: se.toJson(),
+// );
+//
+// static Future clear() => _storage.delete(key: _key);
+// }
\ No newline at end of file
diff --git a/lib/presentation/routes/bottom_bar_routes/tab_routes/home_route.dart b/lib/presentation/routes/bottom_bar_routes/tab_routes/home_route.dart
index e8b3db4f..a9984fcd 100644
--- a/lib/presentation/routes/bottom_bar_routes/tab_routes/home_route.dart
+++ b/lib/presentation/routes/bottom_bar_routes/tab_routes/home_route.dart
@@ -1092,8 +1092,8 @@ class EconomyStatsState extends ConsumerState {
currentTheme = ref.read(themeProvider);
print('123456789');
print(currentTheme);
- final isDark = currentTheme == ThemeMode.dark ||
- (currentTheme == ThemeMode.system &&
+ final isDark = ref.read(themeProvider) == ThemeMode.dark ||
+ (ref.read(themeProvider) == ThemeMode.system &&
MediaQuery.of(context).platformBrightness == Brightness.dark);
final themeMode = (isDark ? 'dark' : 'light');
@@ -1634,7 +1634,7 @@ class InfoCard extends StatelessWidget {
Text(
title,
style: TextStyle(
- fontSize: 13,
+ fontSize: 12,
fontWeight: FontWeight.w700,
letterSpacing: 0,
// color: Colors.black,
diff --git a/lib/presentation/routes/drawer_routes/Drawer Items/bookmark.dart b/lib/presentation/routes/drawer_routes/Drawer Items/bookmark.dart
index 3c57bc86..96c8cb0c 100644
--- a/lib/presentation/routes/drawer_routes/Drawer Items/bookmark.dart
+++ b/lib/presentation/routes/drawer_routes/Drawer Items/bookmark.dart
@@ -6,6 +6,7 @@ import 'package:flutter_svg/svg.dart';
import 'package:go_router/go_router.dart';
import 'package:dio/dio.dart';
import 'package:http/http.dart' as http;
+// import 'package:uae_stat/l10n/app_localizations.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import 'package:pocketbase/pocketbase.dart';
import 'package:shared_preferences/shared_preferences.dart';
@@ -270,9 +271,9 @@ class _BookMarkState extends ConsumerState {
AppLocalizations.of(context)!.removed_from_Bookmark,
style: TextStyle(
fontFamily: context.translate(
- 'Roboto',
- 'NotoKufi',
- )),
+ 'Roboto',
+ 'NotoKufi',
+ )),
),
duration: Duration(seconds: 2),
),
@@ -389,7 +390,7 @@ class _BookMarkState extends ConsumerState {
foregroundColor: Colors.white,
shape: RoundedRectangleBorder(
borderRadius:
- BorderRadius.circular(10.0), // Set text color
+ BorderRadius.circular(10.0), // Set text color
),
),
child: Text(
@@ -463,7 +464,8 @@ class _BookMarkState extends ConsumerState {
final List