refactor(diary): fix service

This commit is contained in:
mso7nueh
2024-07-12 14:33:18 +03:00
parent 551debd450
commit ed74fd99f0
5 changed files with 40 additions and 54 deletions

View File

@@ -41,24 +41,13 @@ class MyApp extends StatelessWidget {
Widget build(BuildContext context) {
return MultiBlocProvider(
providers: [
BlocProvider<InitializationCubit>(
create: (context) => InitializationCubit(chatRepository: sl())),
BlocProvider<ThemeBloc>(
create: (context) =>
ThemeBloc(ThemeState(themeType: PrefUtils().getThemeData()))),
BlocProvider<FeedCubit>(
create: (context) => sl<FeedCubit>()..loadFeedBlogPostList()),
BlocProvider<MyProfileBloc>(
create: (context) => MyProfileBloc(
MyProfileState(myProfileModelObj: MyProfileModel()))
..add(MyProfileInitialEvent())),
BlocProvider<DiaryBloc>(
create: (context) => sl<DiaryBloc>()..add(LoadDiary()),
),
BlocProvider<InitializationCubit>(create: (context) => InitializationCubit(chatRepository: sl())),
BlocProvider<ThemeBloc>(create: (context) => ThemeBloc(ThemeState(themeType: PrefUtils().getThemeData()))),
BlocProvider<FeedCubit>(create: (context) => sl<FeedCubit>()..loadFeedBlogPostList()),
BlocProvider<MyProfileBloc>(create: (context) => MyProfileBloc(MyProfileState(myProfileModelObj: MyProfileModel()))..add(MyProfileInitialEvent())),
BlocProvider<DiaryBloc>(create: (context) => sl<DiaryBloc>()..add(LoadDiary())),
BlocProvider<ChatSelectBloc>(
create: (context) => ChatSelectBloc(
ChatSelectState(chatSelectModelObj: ChatSelectModel()))
..add(ChatSelectInitialEvent()),
create: (context) => ChatSelectBloc(ChatSelectState(chatSelectModelObj: ChatSelectModel()))..add(ChatSelectInitialEvent()),
),
],
child: BlocListener<InitializationCubit, InitializationState>(