From 9c168d37ce5468ce7df11b4fea2783f9c8ff668f Mon Sep 17 00:00:00 2001 From: mso7nueh Date: Wed, 25 Jun 2025 14:56:59 +0300 Subject: [PATCH] fix: black screen --- .../bloc/profile_avatar_cubit/profile_avatar_cubit.dart | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/features/bottom_navigation_bar/presentation/bloc/profile_avatar_cubit/profile_avatar_cubit.dart b/lib/features/bottom_navigation_bar/presentation/bloc/profile_avatar_cubit/profile_avatar_cubit.dart index ae45a6ca..94ae4601 100644 --- a/lib/features/bottom_navigation_bar/presentation/bloc/profile_avatar_cubit/profile_avatar_cubit.dart +++ b/lib/features/bottom_navigation_bar/presentation/bloc/profile_avatar_cubit/profile_avatar_cubit.dart @@ -1,6 +1,8 @@ +import 'package:eatvio_app/core/app_router.dart'; import 'package:eatvio_app/features/bottom_navigation_bar/presentation/bloc/profile_avatar_cubit/profile_avatar_state.dart'; import 'package:eatvio_app/features/profile/repositories/profile_repository.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:go_router/go_router.dart'; class ProfileAvatarCubit extends Cubit { final ProfileRepository profileRepository; @@ -18,6 +20,7 @@ class ProfileAvatarCubit extends Cubit { ), ); } catch (e) { + AppRouter.navigatorKey.currentContext?.go('/auth-screen'); emit(ProfileAvatarState.error(errorMessage: e.toString())); } }