From e01855c0cd116653f88cc13b8f0602c46ff5f7b0 Mon Sep 17 00:00:00 2001 From: Juki-shiba Date: Wed, 5 Mar 2025 11:47:15 +0530 Subject: [PATCH] share link completed --- .../arm64-v8a/configure_fingerprint.bin | 24 +++++++++---------- .../armeabi-v7a/configure_fingerprint.bin | 24 +++++++++---------- .../6q3k463w/x86/configure_fingerprint.bin | 24 +++++++++---------- .../6q3k463w/x86_64/configure_fingerprint.bin | 24 +++++++++---------- lib/config/api_config.dart | 4 +++- lib/config/my_router.dart | 21 ++++++++-------- lib/config/sessionCheckScreen.dart | 3 ++- .../routes/auth_routes/login_route.dart | 22 ++++++++--------- 8 files changed, 75 insertions(+), 71 deletions(-) diff --git a/android/app/.cxx/Debug/6q3k463w/arm64-v8a/configure_fingerprint.bin b/android/app/.cxx/Debug/6q3k463w/arm64-v8a/configure_fingerprint.bin index 746a2cf1..354349fc 100644 --- a/android/app/.cxx/Debug/6q3k463w/arm64-v8a/configure_fingerprint.bin +++ b/android/app/.cxx/Debug/6q3k463w/arm64-v8a/configure_fingerprint.bin @@ -2,27 +2,27 @@ C/C++ Structured Loge c aC:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\arm64-v8a\additional_project_files.txtC A -?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  2  ۮ2b +?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  2  ۮ2b ` -^C:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\arm64-v8a\android_gradle_build.json  2 ۮ2g +^C:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\arm64-v8a\android_gradle_build.json  2 ۮ2g e -cC:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\arm64-v8a\android_gradle_build_mini.json  2 ܮ2T +cC:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\arm64-v8a\android_gradle_build_mini.json  2 ܮ2T R -PC:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\arm64-v8a\build.ninja  2 ۮ2X +PC:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\arm64-v8a\build.ninja  2 ۮ2X V -TC:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\arm64-v8a\build.ninja.txt  2] +TC:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\arm64-v8a\build.ninja.txt  2] [ -YC:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\arm64-v8a\build_file_index.txt  2 S ܮ2^ +YC:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\arm64-v8a\build_file_index.txt  2 S ܮ2^ \ -ZC:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\arm64-v8a\compile_commands.json  2b +ZC:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\arm64-v8a\compile_commands.json  2b ` -^C:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\arm64-v8a\compile_commands.json.bin  2 h +^C:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\arm64-v8a\compile_commands.json.bin  2 h f -dC:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\arm64-v8a\metadata_generation_command.txt  2 +dC:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\arm64-v8a\metadata_generation_command.txt  2  ܮ2[ Y -WC:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\arm64-v8a\prefab_config.json  2  ( ܮ2` +WC:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\arm64-v8a\prefab_config.json  2  ( ܮ2` ^ -\C:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\arm64-v8a\symbol_folder_index.txt  2  S ܮ2W +\C:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\arm64-v8a\symbol_folder_index.txt  2  S ܮ2W U -SC:\flutter\src\flutter\packages\flutter_tools\gradle\src\main\groovy\CMakeLists.txt  2  2 \ No newline at end of file +SC:\flutter\src\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/6q3k463w/armeabi-v7a/configure_fingerprint.bin b/android/app/.cxx/Debug/6q3k463w/armeabi-v7a/configure_fingerprint.bin index f939f461..4fd5703d 100644 --- a/android/app/.cxx/Debug/6q3k463w/armeabi-v7a/configure_fingerprint.bin +++ b/android/app/.cxx/Debug/6q3k463w/armeabi-v7a/configure_fingerprint.bin @@ -2,27 +2,27 @@ C/C++ Structured Logg e cC:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\armeabi-v7a\additional_project_files.txtC A -?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  2  ܮ2d +?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  2  ܮ2d b -`C:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\armeabi-v7a\android_gradle_build.json  2 ܮ2i +`C:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\armeabi-v7a\android_gradle_build.json  2 ܮ2i g -eC:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\armeabi-v7a\android_gradle_build_mini.json  2 ܮ2V +eC:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\armeabi-v7a\android_gradle_build_mini.json  2 ܮ2V T -RC:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\armeabi-v7a\build.ninja  2 ܮ2Z +RC:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\armeabi-v7a\build.ninja  2 ܮ2Z X -VC:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\armeabi-v7a\build.ninja.txt  2_ +VC:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\armeabi-v7a\build.ninja.txt  2_ ] -[C:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\armeabi-v7a\build_file_index.txt  2 S ܮ2` +[C:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\armeabi-v7a\build_file_index.txt  2 S ܮ2` ^ -\C:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\armeabi-v7a\compile_commands.json  2d +\C:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\armeabi-v7a\compile_commands.json  2d b -`C:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\armeabi-v7a\compile_commands.json.bin  2 j +`C:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\armeabi-v7a\compile_commands.json.bin  2 j h -fC:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\armeabi-v7a\metadata_generation_command.txt  2 +fC:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\armeabi-v7a\metadata_generation_command.txt  2  ܮ2] [ -YC:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\armeabi-v7a\prefab_config.json  2  ( ܮ2b +YC:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\armeabi-v7a\prefab_config.json  2  ( ܮ2b ` -^C:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\armeabi-v7a\symbol_folder_index.txt  2  U ܮ2W +^C:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\armeabi-v7a\symbol_folder_index.txt  2  U ܮ2W U -SC:\flutter\src\flutter\packages\flutter_tools\gradle\src\main\groovy\CMakeLists.txt  2  2 \ No newline at end of file +SC:\flutter\src\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/6q3k463w/x86/configure_fingerprint.bin b/android/app/.cxx/Debug/6q3k463w/x86/configure_fingerprint.bin index 9d5b882f..c726ea60 100644 --- a/android/app/.cxx/Debug/6q3k463w/x86/configure_fingerprint.bin +++ b/android/app/.cxx/Debug/6q3k463w/x86/configure_fingerprint.bin @@ -2,27 +2,27 @@ C/C++ Structured Log_ ] [C:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\x86\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 -XC:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\x86\android_gradle_build.json  2 ܮ2a +XC:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\x86\android_gradle_build.json  2 ܮ2a _ -]C:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\x86\android_gradle_build_mini.json  2 ܮ2N +]C:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\x86\android_gradle_build_mini.json  2 ܮ2N L -JC:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\x86\build.ninja  2 ܮ2R +JC:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\x86\build.ninja  2 ܮ2R P -NC:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\x86\build.ninja.txt  2W +NC:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\x86\build.ninja.txt  2W U -SC:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\x86\build_file_index.txt  2 S ܮ2X +SC:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\x86\build_file_index.txt  2 S ܮ2X V -TC:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\x86\compile_commands.json  2\ +TC:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\x86\compile_commands.json  2\ Z -XC:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\x86\compile_commands.json.bin  2 b +XC:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\x86\compile_commands.json.bin  2 b ` -^C:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\x86\metadata_generation_command.txt  2 +^C:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\x86\metadata_generation_command.txt  2  ܮ2U S -QC:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\x86\prefab_config.json  2  ( ܮ2Z +QC:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\x86\prefab_config.json  2  ( ܮ2Z X -VC:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\x86\symbol_folder_index.txt  2  M ܮ2W +VC:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\x86\symbol_folder_index.txt  2  M ܮ2W U -SC:\flutter\src\flutter\packages\flutter_tools\gradle\src\main\groovy\CMakeLists.txt  2  2 \ No newline at end of file +SC:\flutter\src\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/6q3k463w/x86_64/configure_fingerprint.bin b/android/app/.cxx/Debug/6q3k463w/x86_64/configure_fingerprint.bin index cb9b8d49..37c04dcf 100644 --- a/android/app/.cxx/Debug/6q3k463w/x86_64/configure_fingerprint.bin +++ b/android/app/.cxx/Debug/6q3k463w/x86_64/configure_fingerprint.bin @@ -2,27 +2,27 @@ C/C++ Structured Logb ` ^C:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\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_ ] -[C:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\x86_64\android_gradle_build.json  崳2 ܮ2d +[C:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\x86_64\android_gradle_build.json  2 ܮ2d b -`C:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\x86_64\android_gradle_build_mini.json  崳2 ܮ2Q +`C:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\x86_64\android_gradle_build_mini.json  2 ܮ2Q O -MC:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\x86_64\build.ninja  崳2 ܮ2U +MC:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\x86_64\build.ninja  2 ܮ2U S -QC:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\x86_64\build.ninja.txt  崳2Z +QC:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\x86_64\build.ninja.txt  2Z X -VC:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\x86_64\build_file_index.txt  崳2 S ܮ2[ +VC:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\x86_64\build_file_index.txt  2 S ܮ2[ Y -WC:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\x86_64\compile_commands.json  崳2_ +WC:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\x86_64\compile_commands.json  2_ ] -[C:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\x86_64\compile_commands.json.bin  鴳2 e +[C:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\x86_64\compile_commands.json.bin  2 e c -aC:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\x86_64\metadata_generation_command.txt  鴳2 +aC:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\x86_64\metadata_generation_command.txt  2  ܮ2X V -TC:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\x86_64\prefab_config.json  鴳2  ( ܮ2] +TC:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\x86_64\prefab_config.json  2  ( ܮ2] [ -YC:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\x86_64\symbol_folder_index.txt  鴳2  P ܮ2W +YC:\flutter code\clone\FCSC\android\app\.cxx\Debug\6q3k463w\x86_64\symbol_folder_index.txt  2  P ܮ2W U -SC:\flutter\src\flutter\packages\flutter_tools\gradle\src\main\groovy\CMakeLists.txt  鴳2  2 \ No newline at end of file +SC:\flutter\src\flutter\packages\flutter_tools\gradle\src\main\groovy\CMakeLists.txt  2  2 \ No newline at end of file diff --git a/lib/config/api_config.dart b/lib/config/api_config.dart index 07b7c7f4..494ab9e9 100644 --- a/lib/config/api_config.dart +++ b/lib/config/api_config.dart @@ -1,3 +1,5 @@ // api_config.dart // const String apiUrl = 'http://192.168.1.26:8090'; -const String apiUrl = 'https://pbdev.venbait.in/'; +// const String apiUrl = 'https://pbdev.venbait.in/'; +const String apiUrl = 'https://pb.venbait.in/'; + diff --git a/lib/config/my_router.dart b/lib/config/my_router.dart index 1f82ca0d..b60be0c9 100644 --- a/lib/config/my_router.dart +++ b/lib/config/my_router.dart @@ -640,16 +640,17 @@ final GoRouter router = GoRouter( builder: (context, state) => Contact(), ), ], - redirect: (context, state) async { - if (state.uri.path == '/SessionCheckScreen' || state.uri.path == '/login') { + redirect: (context, state) async { + if (state.uri.path == '/SessionCheckScreen' || state.uri.path == '/login') { + return null; + } + + final session = await PAuthRepo().fetchLocallyStored(); + + if (session == null || session.freshness == SessionFreshness.expired) { + print('Session expired, redirecting to login with intendedPath: ${state.uri.path}'); + return '/login${state.uri.path != '/' ? '?intendedPath=${state.uri.path}' : ''}'; + } return null; } - - final session = await PAuthRepo().fetchLocallyStored(); - if (session == null || session.freshness == SessionFreshness.expired) { - return '/login'; - } - - return null; - }, ); diff --git a/lib/config/sessionCheckScreen.dart b/lib/config/sessionCheckScreen.dart index 6958d4a9..77d757fa 100644 --- a/lib/config/sessionCheckScreen.dart +++ b/lib/config/sessionCheckScreen.dart @@ -27,10 +27,11 @@ class _SessionCheckScreenState extends State { final SessionEntity? session = await _authRepo.fetchLocallyStored(); final GoRouterState state = GoRouterState.of(context); final String? intendedPath = state.uri.toString().isNotEmpty && state.uri.path != '/' - ? state.uri.path // Use just the path (e.g., "/chartS1") + ? state.uri.path : null; print('fetchLocallyStored $session'); + print('navigating to intended path: $intendedPath'); // First if: Check if app data exists (indicating app setup) if (session != null) { diff --git a/lib/presentation/routes/auth_routes/login_route.dart b/lib/presentation/routes/auth_routes/login_route.dart index 63f06aac..ab630db9 100644 --- a/lib/presentation/routes/auth_routes/login_route.dart +++ b/lib/presentation/routes/auth_routes/login_route.dart @@ -370,20 +370,20 @@ class LoginRoute extends HookConsumerWidget { } try { final bool isProfileComplete = await profileStatus(userId); - print(isProfileComplete); + 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"); + + if (!context.mounted) return; + if (isProfileComplete) { - print('home'); - // if (role == 'admin') { - // context.go('/myhomepage'); - // } else { - // context.go('/myhomepage'); - // } - final extra = GoRouterState.of(context).extra as Map?; - final String? intendedPath = extra?['intendedPath'] as String?; + print('Redirecting to Home / Intended Path'); context.go(intendedPath ?? '/myhomepage'); } else { - print('profile'); - if (userId != null && userId.isNotEmpty) { + print('Redirecting to Profile Setup'); + if (userId.isNotEmpty) { context.go('/profile/$userId'); } else { print('Error: userId is null or empty.');