From c9f293159ef76602fa9896a6e34a9db5b3c1d866 Mon Sep 17 00:00:00 2001 From: mso7nueh Date: Wed, 31 Jul 2024 13:56:07 +0300 Subject: [PATCH] merge --- lib/app_router.dart | 6 ++++++ .../presentation/bloc/chat_room_cubit/chat_room_cubit.dart | 1 + lib/main.dart | 7 ++++++- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/lib/app_router.dart b/lib/app_router.dart index af7073c3..5eb1d0cc 100644 --- a/lib/app_router.dart +++ b/lib/app_router.dart @@ -3,6 +3,7 @@ import 'package:eatvio_app/core/token_storage.dart'; import 'package:eatvio_app/features/blog_post/presentation/pages/blog_post_screen.dart'; import 'package:eatvio_app/features/blog_post_create/presentation/pages/blog_post_create_screen.dart'; import 'package:eatvio_app/features/bottom_navigation_bar/presentation/widgets/bottom_navigation_bar_widget.dart'; +import 'package:eatvio_app/features/calendar/presentation/pages/calendar_screen.dart'; import 'package:eatvio_app/features/chat/presentation/pages/chat_screen.dart'; import 'package:eatvio_app/features/chat/presentation/pages/chat_select_screen/chat_select_screen.dart'; import 'package:eatvio_app/features/chat/presentation/pages/photo_view_screen.dart'; @@ -126,6 +127,11 @@ class AppRouter { name: 'planSelectScreen', builder: (context, state) => PlanSelectScreen.builder(context), ), + GoRoute( + path: '/calendar-screen', + name: 'calendarScreen', + builder: (context, state) => CalendarScreen(), + ), GoRoute( path: '/glossary-screen', name: 'glossaryScreen', diff --git a/lib/features/chat/presentation/bloc/chat_room_cubit/chat_room_cubit.dart b/lib/features/chat/presentation/bloc/chat_room_cubit/chat_room_cubit.dart index 96e2bd2c..3773c43c 100644 --- a/lib/features/chat/presentation/bloc/chat_room_cubit/chat_room_cubit.dart +++ b/lib/features/chat/presentation/bloc/chat_room_cubit/chat_room_cubit.dart @@ -73,6 +73,7 @@ class ChatRoomCubit extends Cubit { isLoading: isLoading, )); } catch (e) { + print(e); emit(ChatRoomState.error(errorMessage: 'Ошибка получеия данных')); } } diff --git a/lib/main.dart b/lib/main.dart index 743ac0c3..d9bc52c6 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,6 +1,9 @@ import 'package:eatvio_app/app_router.dart'; import 'package:eatvio_app/core/initialization_cubit/initialization_cubit.dart'; import 'package:eatvio_app/core/initialization_cubit/initialization_state.dart'; +import 'package:eatvio_app/features/bottom_navigation_bar/presentation/bloc/new_messages_cubit/new_messages_cubit.dart'; +import 'package:eatvio_app/features/bottom_navigation_bar/presentation/bloc/notifications_cubit/notifications_cubit.dart'; +import 'package:eatvio_app/features/calendar/presentation/bloc/calendar_cubit.dart'; import 'package:eatvio_app/features/chat/presentation/pages/chat_select_screen/bloc/chat_select_bloc.dart'; import 'package:eatvio_app/features/chat/presentation/pages/chat_select_screen/models/chat_select_model.dart'; import 'package:eatvio_app/features/feed/presentation/bloc/feed_cubit/feed_cubit.dart'; @@ -40,7 +43,9 @@ class MyApp extends StatelessWidget { Widget build(BuildContext context) { return MultiBlocProvider( providers: [ - BlocProvider(create: (context) => InitializationCubit(chatRepository: sl())), + BlocProvider(create: (context) => sl()), + BlocProvider(create: (context) => sl()), + BlocProvider(create: (context) => sl()), BlocProvider(create: (context) => ThemeBloc(ThemeState(themeType: PrefUtils().getThemeData()))), BlocProvider(create: (context) => sl()..loadFeedBlogPostList()), BlocProvider(create: (context) => MyProfileBloc(MyProfileState(myProfileModelObj: MyProfileModel()))..add(MyProfileInitialEvent())),