diff --git a/.DS_Store b/.DS_Store index b237a450..50b6c093 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/android/app/.cxx/Debug/5g696y4j/arm64-v8a/configure_fingerprint.bin b/android/app/.cxx/Debug/5g696y4j/arm64-v8a/configure_fingerprint.bin index 63407afe..ea35e89f 100644 --- a/android/app/.cxx/Debug/5g696y4j/arm64-v8a/configure_fingerprint.bin +++ b/android/app/.cxx/Debug/5g696y4j/arm64-v8a/configure_fingerprint.bin @@ -2,27 +2,27 @@ C/C++ Structured Loga _ ]/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/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  Úðèû×2  ‹°™²Ö2^ \ -Z/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/arm64-v8a/android_gradle_build.json  �ÚÙ²Ö2¥ ‘°™²Ö2c +Z/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/arm64-v8a/android_gradle_build.json  Úðèû×2¥ ‘°™²Ö2c a -_/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/arm64-v8a/android_gradle_build_mini.json  �ÚÙ²Ö2² –°™²Ö2P +_/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/arm64-v8a/android_gradle_build_mini.json  Úðèû×2² –°™²Ö2P N -L/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/arm64-v8a/build.ninja  �ÚÙ²Ö2ŠÃ 쯙²Ö2T +L/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/arm64-v8a/build.ninja  Úðèû×2ŠÃ 쯙²Ö2T R -P/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/arm64-v8a/build.ninja.txt  �ÚÙ²Ö2Y +P/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/arm64-v8a/build.ninja.txt  Úðèû×2Y W -U/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/arm64-v8a/build_file_index.txt  �ÚÙ²Ö2 P —°™²Ö2Z +U/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/arm64-v8a/build_file_index.txt  Úðèû×2 P —°™²Ö2Z X -V/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/arm64-v8a/compile_commands.json  �ÚÙ²Ö2^ +V/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/arm64-v8a/compile_commands.json  Úðèû×2^ \ -Z/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/arm64-v8a/compile_commands.json.bin  �ÚÙ²Ö2 d +Z/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/arm64-v8a/compile_commands.json.bin  Úðèû×2 d b -`/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/arm64-v8a/metadata_generation_command.txt  �ÚÙ²Ö2 +`/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/arm64-v8a/metadata_generation_command.txt  Úðèû×2 ÿ —°™²Ö2W U -S/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/arm64-v8a/prefab_config.json  �ÚÙ²Ö2  ( —°™²Ö2\ +S/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/arm64-v8a/prefab_config.json  Úðèû×2  ( —°™²Ö2\ Z -X/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/arm64-v8a/symbol_folder_index.txt  �ÚÙ²Ö2  O —°™²Ö2T +X/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/arm64-v8a/symbol_folder_index.txt  Úðèû×2  O —°™²Ö2T R -P/Users/alex/flutter/packages/flutter_tools/gradle/src/main/groovy/CMakeLists.txt  �ÚÙ²Ö2 ¤  ­ÑÚÏ2 \ No newline at end of file +P/Users/alex/flutter/packages/flutter_tools/gradle/src/main/groovy/CMakeLists.txt  Ûðèû×2 ¤  ­ÑÚÏ2 \ No newline at end of file diff --git a/android/app/.cxx/Debug/5g696y4j/armeabi-v7a/configure_fingerprint.bin b/android/app/.cxx/Debug/5g696y4j/armeabi-v7a/configure_fingerprint.bin index 3134ce49..4d332c4e 100644 --- a/android/app/.cxx/Debug/5g696y4j/armeabi-v7a/configure_fingerprint.bin +++ b/android/app/.cxx/Debug/5g696y4j/armeabi-v7a/configure_fingerprint.bin @@ -2,27 +2,27 @@ C/C++ Structured Logc a _/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/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  íðèû×2  àòš²Ö2` ^ -\/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/armeabi-v7a/android_gradle_build.json  ¦ÚÙ²Ö2© âòš²Ö2e +\/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/armeabi-v7a/android_gradle_build.json  íðèû×2© âòš²Ö2e c -a/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/armeabi-v7a/android_gradle_build_mini.json  ¦ÚÙ²Ö2¶ ãòš²Ö2R +a/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/armeabi-v7a/android_gradle_build_mini.json  íðèû×2¶ ãòš²Ö2R P -N/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/armeabi-v7a/build.ninja  ¦ÚÙ²Ö2–à Âòš²Ö2V +N/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/armeabi-v7a/build.ninja  íðèû×2–à Âòš²Ö2V T -R/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/armeabi-v7a/build.ninja.txt  ¦ÚÙ²Ö2[ +R/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/armeabi-v7a/build.ninja.txt  íðèû×2[ Y -W/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/armeabi-v7a/build_file_index.txt  ¦ÚÙ²Ö2 P ãòš²Ö2\ +W/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/armeabi-v7a/build_file_index.txt  íðèû×2 P ãòš²Ö2\ Z -X/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/armeabi-v7a/compile_commands.json  ¦ÚÙ²Ö2` +X/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/armeabi-v7a/compile_commands.json  íðèû×2` ^ -\/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/armeabi-v7a/compile_commands.json.bin  ¦ÚÙ²Ö2 f +\/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/armeabi-v7a/compile_commands.json.bin  íðèû×2 f d -b/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/armeabi-v7a/metadata_generation_command.txt  ¦ÚÙ²Ö2 +b/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/armeabi-v7a/metadata_generation_command.txt  íðèû×2 ‰ ãòš²Ö2Y W -U/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/armeabi-v7a/prefab_config.json  ¦ÚÙ²Ö2  ( ãòš²Ö2^ +U/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/armeabi-v7a/prefab_config.json  íðèû×2  ( ãòš²Ö2^ \ -Z/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/armeabi-v7a/symbol_folder_index.txt  ¦ÚÙ²Ö2  Q ãòš²Ö2T +Z/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/armeabi-v7a/symbol_folder_index.txt  íðèû×2  Q ãòš²Ö2T R -P/Users/alex/flutter/packages/flutter_tools/gradle/src/main/groovy/CMakeLists.txt  ¦ÚÙ²Ö2 ¤  ­ÑÚÏ2 \ No newline at end of file +P/Users/alex/flutter/packages/flutter_tools/gradle/src/main/groovy/CMakeLists.txt  íðèû×2 ¤  ­ÑÚÏ2 \ No newline at end of file diff --git a/android/app/.cxx/Debug/5g696y4j/x86/configure_fingerprint.bin b/android/app/.cxx/Debug/5g696y4j/x86/configure_fingerprint.bin index dfd94e0d..36d33fe3 100644 --- a/android/app/.cxx/Debug/5g696y4j/x86/configure_fingerprint.bin +++ b/android/app/.cxx/Debug/5g696y4j/x86/configure_fingerprint.bin @@ -2,27 +2,27 @@ C/C++ Structured Log[ Y W/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/x86/additional_project_files.txtC A -?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  ®ÚÙ²Ö2  �÷š²Ö2X +?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  ôðèû×2  �÷š²Ö2X V -T/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/x86/android_gradle_build.json  ®ÚÙ²Ö2™ �÷š²Ö2] +T/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/x86/android_gradle_build.json  ôðèû×2™ �÷š²Ö2] [ -Y/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/x86/android_gradle_build_mini.json  ®ÚÙ²Ö2¦ ‘÷š²Ö2J +Y/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/x86/android_gradle_build_mini.json  ôðèû×2¦ ‘÷š²Ö2J H -F/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/x86/build.ninja  ®ÚÙ²Ö2æÂ †÷š²Ö2N +F/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/x86/build.ninja  ôðèû×2æÂ †÷š²Ö2N L -J/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/x86/build.ninja.txt  ®ÚÙ²Ö2S +J/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/x86/build.ninja.txt  ôðèû×2S Q -O/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/x86/build_file_index.txt  ®ÚÙ²Ö2 P ‘÷š²Ö2T +O/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/x86/build_file_index.txt  ôðèû×2 P ‘÷š²Ö2T R -P/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/x86/compile_commands.json  ®ÚÙ²Ö2X +P/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/x86/compile_commands.json  ôðèû×2X V -T/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/x86/compile_commands.json.bin  ®ÚÙ²Ö2 ^ +T/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/x86/compile_commands.json.bin  ôðèû×2 ^ \ -Z/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/x86/metadata_generation_command.txt  ®ÚÙ²Ö2 +Z/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/x86/metadata_generation_command.txt  ôðèû×2 á ‘÷š²Ö2Q O -M/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/x86/prefab_config.json  ®ÚÙ²Ö2  ( ‘÷š²Ö2V +M/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/x86/prefab_config.json  ôðèû×2  ( ‘÷š²Ö2V T -R/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/x86/symbol_folder_index.txt  ®ÚÙ²Ö2  I ‘÷š²Ö2T +R/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/x86/symbol_folder_index.txt  ôðèû×2  I ‘÷š²Ö2T R -P/Users/alex/flutter/packages/flutter_tools/gradle/src/main/groovy/CMakeLists.txt  ®ÚÙ²Ö2 ¤  ­ÑÚÏ2 \ No newline at end of file +P/Users/alex/flutter/packages/flutter_tools/gradle/src/main/groovy/CMakeLists.txt  ôðèû×2 ¤  ­ÑÚÏ2 \ No newline at end of file diff --git a/android/app/.cxx/Debug/5g696y4j/x86_64/configure_fingerprint.bin b/android/app/.cxx/Debug/5g696y4j/x86_64/configure_fingerprint.bin index 54e69ef9..e41c5b64 100644 --- a/android/app/.cxx/Debug/5g696y4j/x86_64/configure_fingerprint.bin +++ b/android/app/.cxx/Debug/5g696y4j/x86_64/configure_fingerprint.bin @@ -2,27 +2,27 @@ C/C++ Structured Log^ \ Z/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/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  úðèû×2  Üúš²Ö2[ Y -W/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/x86_64/android_gradle_build.json  ÁÚÙ²Ö2Ÿ Þúš²Ö2` +W/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/x86_64/android_gradle_build.json  úðèû×2Ÿ Þúš²Ö2` ^ -\/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/x86_64/android_gradle_build_mini.json  ÁÚÙ²Ö2¬ Þúš²Ö2M +\/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/x86_64/android_gradle_build_mini.json  úðèû×2¬ Þúš²Ö2M K -I/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/x86_64/build.ninja  ÁÚÙ²Ö2øÂ Ðúš²Ö2Q +I/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/x86_64/build.ninja  úðèû×2øÂ Ðúš²Ö2Q O -M/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/x86_64/build.ninja.txt  ÁÚÙ²Ö2V +M/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/x86_64/build.ninja.txt  úðèû×2V T -R/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/x86_64/build_file_index.txt  ÁÚÙ²Ö2 P ßúš²Ö2W +R/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/x86_64/build_file_index.txt  úðèû×2 P ßúš²Ö2W U -S/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/x86_64/compile_commands.json  ÁÚÙ²Ö2[ +S/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/x86_64/compile_commands.json  úðèû×2[ Y -W/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/x86_64/compile_commands.json.bin  ÁÚÙ²Ö2 a +W/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/x86_64/compile_commands.json.bin  úðèû×2 a _ -]/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/x86_64/metadata_generation_command.txt  ÁÚÙ²Ö2 +]/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/x86_64/metadata_generation_command.txt  úðèû×2 ð ßúš²Ö2T R -P/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/x86_64/prefab_config.json  ÁÚÙ²Ö2  ( ßúš²Ö2Y +P/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/x86_64/prefab_config.json  úðèû×2  ( ßúš²Ö2Y W -U/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/x86_64/symbol_folder_index.txt  ÁÚÙ²Ö2  L ßúš²Ö2T +U/Users/alex/eatvio_app/android/app/.cxx/Debug/5g696y4j/x86_64/symbol_folder_index.txt  úðèû×2  L ßúš²Ö2T R -P/Users/alex/flutter/packages/flutter_tools/gradle/src/main/groovy/CMakeLists.txt  ÁÚÙ²Ö2 ¤  ­ÑÚÏ2 \ No newline at end of file +P/Users/alex/flutter/packages/flutter_tools/gradle/src/main/groovy/CMakeLists.txt  úðèû×2 ¤  ­ÑÚÏ2 \ No newline at end of file diff --git a/assets/.DS_Store b/assets/.DS_Store index 2f718152..8b6f47c3 100644 Binary files a/assets/.DS_Store and b/assets/.DS_Store differ diff --git a/assets/images/no_avatar.png b/assets/images/no_avatar.png new file mode 100644 index 00000000..3b011916 Binary files /dev/null and b/assets/images/no_avatar.png differ diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 8b1d1fef..d790bfad 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -365,7 +365,7 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 45; + CURRENT_PROJECT_VERSION = 46; DEVELOPMENT_TEAM = VL68C36HYS; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( @@ -383,7 +383,7 @@ "$(inherited)", "$(PROJECT_DIR)/Flutter", ); - MARKETING_VERSION = 1.0.45; + MARKETING_VERSION = 1.0.46; PRODUCT_BUNDLE_IDENTIFIER = com.eatvioapp.app; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -514,7 +514,7 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 45; + CURRENT_PROJECT_VERSION = 46; DEVELOPMENT_TEAM = VL68C36HYS; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( @@ -532,7 +532,7 @@ "$(inherited)", "$(PROJECT_DIR)/Flutter", ); - MARKETING_VERSION = 1.0.45; + MARKETING_VERSION = 1.0.46; PRODUCT_BUNDLE_IDENTIFIER = com.eatvioapp.app; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -551,7 +551,7 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 45; + CURRENT_PROJECT_VERSION = 46; DEVELOPMENT_TEAM = VL68C36HYS; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( @@ -569,7 +569,7 @@ "$(inherited)", "$(PROJECT_DIR)/Flutter", ); - MARKETING_VERSION = 1.0.45; + MARKETING_VERSION = 1.0.46; PRODUCT_BUNDLE_IDENTIFIER = com.eatvioapp.app; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; diff --git a/lib/core/app_router.dart b/lib/core/app_router.dart index bee9eaf8..fca6fac5 100644 --- a/lib/core/app_router.dart +++ b/lib/core/app_router.dart @@ -65,7 +65,7 @@ class AppRouter { routes: [ GoRoute( path: '/auth-screen', - name: 'authScreen', + name: 'authScreen', builder: (context, state) => const AuthScreen(), routes: [ GoRoute( diff --git a/lib/core/locator_service.dart b/lib/core/locator_service.dart index cfca3868..99846f1a 100644 --- a/lib/core/locator_service.dart +++ b/lib/core/locator_service.dart @@ -167,7 +167,7 @@ Future init() async { sl.registerLazySingleton( () => Dio( BaseOptions( - baseUrl: baseUrl, + baseUrl: baseUrl, headers: { 'accept': 'application/json', 'content-type': 'application/json', diff --git a/lib/core/token_storage.dart b/lib/core/token_storage.dart index 5b28ffc7..a3eba6cc 100644 --- a/lib/core/token_storage.dart +++ b/lib/core/token_storage.dart @@ -1,12 +1,11 @@ import 'package:flutter_secure_storage/flutter_secure_storage.dart'; abstract class TokenStorage { - static Future haveTokenInStorage() async { try { if (await FlutterSecureStorage().read(key: 'token') == null) { return false; - } else { + } else { return true; } } catch (e) { @@ -17,7 +16,7 @@ abstract class TokenStorage { static Future getTokenFromStorage() async => await FlutterSecureStorage().read(key: 'token'); static saveTokenInStorage(String token) async { - await FlutterSecureStorage().write(key: 'token', value: token); + await FlutterSecureStorage().write(key: 'token', value: token); } static Future removeTokenInStorage() async => (await FlutterSecureStorage().delete(key: 'token')); diff --git a/lib/core/utils/toasts.dart b/lib/core/utils/toasts.dart index 7a0f3db9..3d4fda0d 100644 --- a/lib/core/utils/toasts.dart +++ b/lib/core/utils/toasts.dart @@ -1,4 +1,5 @@ import 'package:eatvio_app/core/theme/theme_helper.dart'; +import 'package:flutter/material.dart'; import 'package:fluttertoast/fluttertoast.dart'; const int _toastDuration = 2; @@ -19,10 +20,10 @@ void showErrorToast(String message) { Fluttertoast.showToast( msg: message, toastLength: Toast.LENGTH_LONG, - gravity: ToastGravity.TOP, + gravity: ToastGravity.CENTER, timeInSecForIosWeb: _toastDuration, - backgroundColor: appTheme.whiteA700, - textColor: appTheme.gray, + backgroundColor: appTheme.red, + textColor: Colors.white, fontSize: 16.0, ); } @@ -31,7 +32,7 @@ void showSuccessToast(String message) { Fluttertoast.showToast( msg: message, toastLength: Toast.LENGTH_SHORT, - gravity: ToastGravity.TOP, + gravity: ToastGravity.CENTER, timeInSecForIosWeb: _toastDuration, backgroundColor: appTheme.greenA70001, textColor: appTheme.whiteA700, diff --git a/lib/features/auth/presentation/bloc/auth_cubit.dart b/lib/features/auth/presentation/bloc/auth_cubit.dart index 924247d1..da1c3fef 100644 --- a/lib/features/auth/presentation/bloc/auth_cubit.dart +++ b/lib/features/auth/presentation/bloc/auth_cubit.dart @@ -1,6 +1,7 @@ import 'package:eatvio_app/core/app_router.dart'; import 'package:eatvio_app/core/locator_service.dart'; import 'package:eatvio_app/core/token_storage.dart'; +import 'package:eatvio_app/core/utils/toasts.dart'; import 'package:eatvio_app/features/auth/presentation/bloc/auth_state.dart'; import 'package:eatvio_app/features/auth/repositories/auth_repository.dart'; import 'package:eatvio_app/features/bottom_navigation_bar/presentation/bloc/profile_avatar_cubit/profile_avatar_cubit.dart'; @@ -28,11 +29,13 @@ class AuthCubit extends Cubit { token: token, ), ); + showSuccessToast('УÑ�пешный вход'); await TokenStorage.saveTokenInStorage(token); await sl().getMyProfile(); AppRouter.navigatorKey.currentContext?.go('/my-profile-screen'); } catch (e) { print(e); + showErrorToast('Ð�еверный адреÑ� Ñ�лектронной почты или пароль'); emit(AuthState.error(errorMessage: '$e')); } } diff --git a/lib/features/auth/presentation/pages/auth_screen.dart b/lib/features/auth/presentation/pages/auth_screen.dart index f620fb76..e446ece8 100644 --- a/lib/features/auth/presentation/pages/auth_screen.dart +++ b/lib/features/auth/presentation/pages/auth_screen.dart @@ -5,6 +5,7 @@ import 'package:eatvio_app/core/utils/image_constant.dart'; import 'package:eatvio_app/core/widgets/custom_text_form_field.dart'; import 'package:eatvio_app/features/auth/presentation/bloc/auth_cubit.dart'; import 'package:eatvio_app/generated/l10n.dart'; +import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter_native_splash/flutter_native_splash.dart'; @@ -12,6 +13,8 @@ import 'package:flutter_svg/flutter_svg.dart'; import 'package:go_router/go_router.dart'; import 'package:url_launcher/url_launcher.dart'; +import '../bloc/auth_state.dart'; + class AuthScreen extends StatefulWidget { const AuthScreen(); @@ -32,120 +35,128 @@ class _AuthScreenState extends State { FlutterNativeSplash.remove(); return BlocProvider( create: (BuildContext context) => authCubit, - child: Scaffold( - appBar: AppBar( - centerTitle: true, - title: SvgPicture.asset( - ImageConstant.imgLogoEatvio, - height: 48, - fit: BoxFit.contain, - ), - ), - body: SafeArea( - child: Padding( - padding: EdgeInsets.all(16), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text(s.email), - const SizedBox(height: 4), - CustomTextFormField( - controller: emailController, - textInputAction: TextInputAction.next, - keyboardType: TextInputType.emailAddress, - textInputType: TextInputType.emailAddress, - hintText: 'Введите email', - ), - const SizedBox(height: 16), - Text(s.password), - const SizedBox(height: 4), - CustomTextFormField( - obscureText: hidePassword, - controller: passwordController, - hintText: 'Введите пароль', - suffix: IconButton( - onPressed: () { - setState(() { - hidePassword = !hidePassword; - }); - }, - icon: Icon( - hidePassword ? Icons.visibility_outlined : Icons.visibility_off_outlined, - color: Colors.grey, - ), - ), - ), - const SizedBox(height: 16), - Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text('Ð�ет аккаунта? '), - GestureDetector( - onTap: () => GoRouter.of(context).goNamed('webViewRegistrationScreen'), - child: Text( - 'ЗарегиÑ�трироватьÑ�Ñ�', - style: TextStyle( - color: appTheme.blueA400, - decorationColor: appTheme.blueA400, - decoration: TextDecoration.underline, - ), - ), - ), - ], - ), - Spacer(), - Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - 'Ð�ажимаÑ� "Войти", Ð’Ñ‹ Ñ�оглашаетеÑ�ÑŒ Ñ� ', - style: TextStyle( - fontSize: 12, - ), - ), - GestureDetector( - onTap: () async { - await launchUrl(Uri.parse(baseUrl + '/oferta_bs.pdf')); - }, - child: Text( - 'Публичной офертой', - style: TextStyle( - fontSize: 12, - color: appTheme.blueA400, - decorationColor: appTheme.blueA400, - decoration: TextDecoration.underline, - ), - ), - ), - ], - ), - const SizedBox(height: 16), - Container( - height: 48, - width: MediaQuery.of(context).size.width - 32, - child: FloatingActionButton.extended( - heroTag: 'authButton', - highlightElevation: 0, - elevation: 0, - focusElevation: 0, - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(20), - ), - backgroundColor: appTheme.blueA400, - onPressed: () => authCubit.getTokenByCredentials( - emailController.text, - passwordController.text, - ), - label: Text( - 'Войти', - style: theme.textTheme.titleSmall!.copyWith(color: Colors.white), - ), - ), - ), - ], + child: BlocBuilder( + builder: (BuildContext context, AuthState state) { + return Scaffold( + appBar: AppBar( + centerTitle: true, + title: SvgPicture.asset( + ImageConstant.imgLogoEatvio, + height: 64, + fit: BoxFit.contain, + ), ), - ), - ), + body: SafeArea( + child: Padding( + padding: EdgeInsets.all(16), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text(s.email), + const SizedBox(height: 4), + CustomTextFormField( + controller: emailController, + textInputAction: TextInputAction.next, + keyboardType: TextInputType.emailAddress, + textInputType: TextInputType.emailAddress, + hintText: 'Введите email', + ), + const SizedBox(height: 16), + Text(s.password), + const SizedBox(height: 4), + CustomTextFormField( + obscureText: hidePassword, + controller: passwordController, + hintText: 'Введите пароль', + suffix: IconButton( + onPressed: () { + setState(() { + hidePassword = !hidePassword; + }); + }, + icon: Icon( + hidePassword ? Icons.visibility_outlined : Icons.visibility_off_outlined, + color: Colors.grey, + ), + ), + ), + const SizedBox(height: 16), + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text('Ð�ет аккаунта? '), + GestureDetector( + onTap: () => GoRouter.of(context).goNamed('webViewRegistrationScreen'), + child: Text( + 'ЗарегиÑ�трироватьÑ�Ñ�', + style: TextStyle( + color: appTheme.blueA400, + decorationColor: appTheme.blueA400, + decoration: TextDecoration.underline, + ), + ), + ), + ], + ), + Spacer(), + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + 'Ð�ажимаÑ� "Войти", Ð’Ñ‹ Ñ�оглашаетеÑ�ÑŒ Ñ� ', + style: TextStyle( + fontSize: 12, + ), + ), + GestureDetector( + onTap: () async { + await launchUrl(Uri.parse(baseUrl + '/oferta_bs.pdf')); + }, + child: Text( + 'Публичной офертой', + style: TextStyle( + fontSize: 12, + color: appTheme.blueA400, + decorationColor: appTheme.blueA400, + decoration: TextDecoration.underline, + ), + ), + ), + ], + ), + const SizedBox(height: 16), + Container( + height: 48, + width: MediaQuery.of(context).size.width - 32, + child: FloatingActionButton.extended( + heroTag: 'authButton', + highlightElevation: 0, + elevation: 0, + focusElevation: 0, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(20), + ), + backgroundColor: state is AuthStateLoading ? Colors.black.withAlpha(50) : appTheme.blueA400, + onPressed: state is AuthStateLoading + ? null + : () => authCubit.getTokenByCredentials( + emailController.text, + passwordController.text, + ), + label: state is AuthStateLoading + ? CupertinoActivityIndicator() + : Text( + 'Войти', + style: theme.textTheme.titleSmall!.copyWith(color: Colors.white), + ), + ), + ), + ], + ), + ), + ), + ); + }, ), ); } diff --git a/lib/features/feed/presentation/widgets/comments_widget.dart b/lib/features/feed/presentation/widgets/comments_widget.dart index ac4ea977..d9e44fb3 100644 --- a/lib/features/feed/presentation/widgets/comments_widget.dart +++ b/lib/features/feed/presentation/widgets/comments_widget.dart @@ -72,7 +72,7 @@ class _CommentsWidgetState extends State { style: TextStyle( height: 1, color: appTheme.gray, - fontSize: 12, + fontSize: 14, fontWeight: FontWeight.w500, ), ), @@ -84,7 +84,7 @@ class _CommentsWidgetState extends State { style: TextStyle( height: 1, color: appTheme.black, - fontSize: 12, + fontSize: 16, fontWeight: FontWeight.w500, ), ), @@ -97,7 +97,7 @@ class _CommentsWidgetState extends State { style: TextStyle( height: 1, color: appTheme.gray, - fontSize: 12, + fontSize: 14, fontWeight: FontWeight.w500, ), ), @@ -112,8 +112,8 @@ class _CommentsWidgetState extends State { style: TextStyle( height: 1, color: appTheme.gray, - fontSize: 12, - fontWeight: FontWeight.w500, + fontSize: 14, + fontWeight: FontWeight.w600, ), ), ), diff --git a/lib/features/feed/presentation/widgets/plan_widget.dart b/lib/features/feed/presentation/widgets/plan_widget.dart index 3166aa96..5d3f5bda 100644 --- a/lib/features/feed/presentation/widgets/plan_widget.dart +++ b/lib/features/feed/presentation/widgets/plan_widget.dart @@ -102,7 +102,7 @@ class _PlanWidgetState extends State { padding: const EdgeInsets.symmetric(horizontal: 16), child: Text( widget.plan.name, - style: TextStyles.textMSemibold.copyWith(color: appTheme.black), + style: TextStyles.textMSemibold.copyWith(color: appTheme.black, fontSize: 18), ), ), if (widget.plan.details.isNotEmpty) ...[ @@ -117,7 +117,7 @@ class _PlanWidgetState extends State { "*": Style( margin: Margins.zero, color: appTheme.black, - fontSize: FontSize(TextStyles.textSMedium.fontSize ?? 14), + fontSize: FontSize(16), fontWeight: TextStyles.textSMedium.fontWeight ?? FontWeight.w400, ), }, diff --git a/lib/features/internet_connection_checker/internet_connection_checker_screen.dart b/lib/features/internet_connection_checker/internet_connection_checker_screen.dart index dc6ed06b..4256518e 100644 --- a/lib/features/internet_connection_checker/internet_connection_checker_screen.dart +++ b/lib/features/internet_connection_checker/internet_connection_checker_screen.dart @@ -145,7 +145,7 @@ class NoInternetScreen extends StatelessWidget { Padding( padding: const EdgeInsets.symmetric(horizontal: 40), child: Text( - 'Проверьте Ñ�оединение Ñ� Ñ�етью и попробуйте ещё раз', + 'Проверьте Ñ�оединение Ñ� Ñ�етью\nи попробуйте ещё раз', textAlign: TextAlign.center, style: TextStyles.textMMedium.copyWith( color: appTheme.gray, diff --git a/lib/features/menu/presentation/pages/menu_screen.dart b/lib/features/menu/presentation/pages/menu_screen.dart index 45728f70..73a3a358 100644 --- a/lib/features/menu/presentation/pages/menu_screen.dart +++ b/lib/features/menu/presentation/pages/menu_screen.dart @@ -8,6 +8,7 @@ import 'package:eatvio_app/features/dev_tools/presentation/dev_tools_screen.dart import 'package:eatvio_app/features/my_diets/presentation/my_diets_screen.dart'; import 'package:eatvio_app/features/my_plans/presentation/my_plans_screen.dart'; import 'package:eatvio_app/features/profile/models/profile_model.dart'; +import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; import 'package:go_router/go_router.dart'; @@ -68,12 +69,12 @@ class MenuScreen extends StatelessWidget { } }, ), - _divider(context), - _tile( - leading: 'assets/icons/calendar.svg', - title: 'Календарь', - onTap: () => GoRouter.of(context).push('/calendar-screen'), - ), + // _divider(context), + // _tile( + // leading: 'assets/icons/calendar.svg', + // title: 'Календарь', + // onTap: () => GoRouter.of(context).push('/calendar-screen'), + // ), _divider(context), _tile( leading: ImageConstant.icnGlossary, @@ -141,15 +142,36 @@ class MenuScreen extends StatelessWidget { _onTapLogout(BuildContext context) { return () async { - try { - await sl().post( - baseUrl + '/api/profile/logout', - ); - } catch (e) { - } finally { - await TokenStorage.removeTokenInStorage(); - GoRouter.of(context).go('/auth-screen', extra: true); - } + showDialog( + context: context, + builder: (context) => CupertinoAlertDialog( + title: Text("Выход"), + actions: [ + CupertinoDialogAction( + onPressed: () async { + try { + await sl().post( + baseUrl + '/api/profile/logout', + ); + } catch (e) { + } finally { + await TokenStorage.removeTokenInStorage(); + GoRouter.of(context).go('/auth-screen', extra: true); + } + }, + child: Text("Выйти"), + isDestructiveAction: true, + ), + CupertinoDialogAction( + onPressed: () { + Navigator.of(context).pop(); + }, + child: Text("Отмена"), + ), + ], + content: Text("Ð’Ñ‹ уверены что хотите выйти из аккаунта?"), + ), + ); }; } } diff --git a/lib/features/profile/presentation/pages/profile_screen.dart b/lib/features/profile/presentation/pages/profile_screen.dart index 07eb536a..6d12aa9b 100644 --- a/lib/features/profile/presentation/pages/profile_screen.dart +++ b/lib/features/profile/presentation/pages/profile_screen.dart @@ -931,7 +931,8 @@ class _ProfileScreenState extends State { tag: state.profile.profilePhotoUrl, child: CircleAvatar( radius: 32, - backgroundImage: NetworkImage(state.profile.profilePhotoUrl), + foregroundImage: NetworkImage(state.profile.profilePhotoUrl), + backgroundImage: AssetImage('assets/images/no_avatar.png'), ), ), ), diff --git a/lib/features/profile/presentation/widgets/profile_blog_post_widget.dart b/lib/features/profile/presentation/widgets/profile_blog_post_widget.dart index dd1389bc..1b19f2b8 100644 --- a/lib/features/profile/presentation/widgets/profile_blog_post_widget.dart +++ b/lib/features/profile/presentation/widgets/profile_blog_post_widget.dart @@ -106,6 +106,7 @@ class _ProfileBlogPostWidgetState extends State { state.blogPosts[widget.index].title, style: TextStyle( fontWeight: FontWeight.w600, + fontSize: 18, color: Colors.black87, ), ), @@ -120,6 +121,7 @@ class _ProfileBlogPostWidgetState extends State { : state.blogPosts[widget.index].description, style: { "*": Style( + fontSize: FontSize(16), color: Colors.black87, ), }, diff --git a/lib/features/registration/presentation/pages/webview_registration_screen.dart b/lib/features/registration/presentation/pages/webview_registration_screen.dart index 5292ba61..54f4a199 100644 --- a/lib/features/registration/presentation/pages/webview_registration_screen.dart +++ b/lib/features/registration/presentation/pages/webview_registration_screen.dart @@ -1,6 +1,9 @@ +import 'dart:convert'; + import 'package:eatvio_app/core/const.dart'; +import 'package:eatvio_app/core/locator_service.dart'; +import 'package:eatvio_app/features/auth/presentation/bloc/auth_cubit.dart'; import 'package:flutter/material.dart'; -import 'package:go_router/go_router.dart'; import 'package:webview_flutter/webview_flutter.dart'; class WebViewRegistrationScreen extends StatefulWidget { @@ -12,23 +15,71 @@ class WebViewRegistrationScreen extends StatefulWidget { class _WebViewRegistrationScreenState extends State { late final WebViewController _controller; + late final AuthCubit authCubit; + String? email; + String? password; @override void initState() { super.initState(); + authCubit = sl(); _controller = WebViewController() ..setJavaScriptMode(JavaScriptMode.unrestricted) + ..addJavaScriptChannel( + 'flutter_inject', + onMessageReceived: (JavaScriptMessage message) { + final data = jsonDecode(message.message); + if (data['type'] == 'email') { + email = data['value']; + print("Email: $email"); + } else if (data['type'] == 'password') { + password = data['value']; + print("Password: $password"); + } + }, + ) ..setNavigationDelegate( NavigationDelegate( onNavigationRequest: (NavigationRequest request) { if (request.url.contains('profile')) { - GoRouter.of(context).go('authScreen'); + authCubit.getTokenByCredentials( + email!, + password!, + ); } return NavigationDecision.navigate; }, ), ) ..loadRequest(Uri.parse(baseUrl + '/registration/step1')); + + _injectJavaScript(); + } + + void _injectJavaScript() async { + await Future.delayed(Duration(seconds: 2)); + _controller.runJavaScript(''' + function sendMessageToFlutter(data) { + window.flutter_inject.postMessage(JSON.stringify(data)); + } + + function trackInputChanges() { + let emailField = document.getElementById('inputEmail'); + let passwordField = document.getElementById('inputPassword'); + + if (emailField && passwordField) { + emailField.addEventListener('input', function() { + sendMessageToFlutter({ type: 'email', value: emailField.value }); + }); + + passwordField.addEventListener('input', function() { + sendMessageToFlutter({ type: 'password', value: passwordField.value }); + }); + } + } + + trackInputChanges(); + '''); } @override diff --git a/lib/features/settings/presentation/pages/settings_screen.dart b/lib/features/settings/presentation/pages/settings_screen.dart index c7ac0a30..00ce51c0 100644 --- a/lib/features/settings/presentation/pages/settings_screen.dart +++ b/lib/features/settings/presentation/pages/settings_screen.dart @@ -420,7 +420,7 @@ class _SettingsScreenState extends State { title: Text( title, style: TextStyle( - fontSize: 14, + fontSize: 16, fontWeight: FontWeight.w500, height: 1, ), diff --git a/pubspec.yaml b/pubspec.yaml index 6eab7d58..69d34415 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: eatvio_app description: A new Flutter project. -version: 1.0.45+45 +version: 1.0.46+46 publish_to: 'none' environment: