| 
									
										
										
										
											2021-09-05 22:52:20 +08:00
										 |  |  | import 'package:app_flowy/user/application/sign_in_bloc.dart'; | 
					
						
							|  |  |  | import 'package:app_flowy/user/application/sign_up_bloc.dart'; | 
					
						
							| 
									
										
										
										
											2021-10-09 10:09:31 +08:00
										 |  |  | import 'package:app_flowy/user/application/splash_bloc.dart'; | 
					
						
							| 
									
										
										
										
											2021-07-21 15:43:05 +08:00
										 |  |  | import 'package:app_flowy/user/domain/i_auth.dart'; | 
					
						
							| 
									
										
										
										
											2021-10-09 10:09:31 +08:00
										 |  |  | import 'package:app_flowy/user/domain/i_splash.dart'; | 
					
						
							| 
									
										
										
										
											2021-07-21 15:43:05 +08:00
										 |  |  | import 'package:app_flowy/user/infrastructure/repos/auth_repo.dart'; | 
					
						
							|  |  |  | import 'package:app_flowy/user/infrastructure/i_auth_impl.dart'; | 
					
						
							| 
									
										
										
										
											2021-10-09 10:09:31 +08:00
										 |  |  | import 'package:app_flowy/user/infrastructure/i_splash_impl.dart'; | 
					
						
							|  |  |  | import 'package:app_flowy/workspace/application/edit_pannel/edit_pannel_bloc.dart'; | 
					
						
							|  |  |  | import 'package:app_flowy/workspace/application/home/home_bloc.dart'; | 
					
						
							| 
									
										
										
										
											2021-10-11 13:15:41 +08:00
										 |  |  | import 'package:app_flowy/workspace/application/home/home_listen_bloc.dart'; | 
					
						
							| 
									
										
										
										
											2021-10-09 10:09:31 +08:00
										 |  |  | import 'package:app_flowy/workspace/domain/i_user.dart'; | 
					
						
							|  |  |  | import 'package:app_flowy/workspace/infrastructure/i_user_impl.dart'; | 
					
						
							| 
									
										
										
										
											2021-07-21 15:43:05 +08:00
										 |  |  | import 'package:get_it/get_it.dart'; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-12-04 22:24:32 +08:00
										 |  |  | import 'network_monitor.dart'; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-07-21 15:43:05 +08:00
										 |  |  | class UserDepsResolver { | 
					
						
							|  |  |  |   static Future<void> resolve(GetIt getIt) async { | 
					
						
							| 
									
										
										
										
											2021-07-25 18:04:16 +08:00
										 |  |  |     getIt.registerFactory<AuthRepository>(() => AuthRepository()); | 
					
						
							| 
									
										
										
										
											2021-07-21 15:43:05 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  |     //Interface implementation
 | 
					
						
							|  |  |  |     getIt.registerFactory<IAuth>(() => AuthImpl(repo: getIt<AuthRepository>())); | 
					
						
							| 
									
										
										
										
											2021-07-25 18:04:16 +08:00
										 |  |  |     getIt.registerFactory<IAuthRouter>(() => AuthRouterImpl()); | 
					
						
							| 
									
										
										
										
											2021-07-21 15:43:05 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  |     //Bloc
 | 
					
						
							|  |  |  |     getIt.registerFactory<SignInBloc>(() => SignInBloc(getIt<IAuth>())); | 
					
						
							| 
									
										
										
										
											2021-09-05 22:52:20 +08:00
										 |  |  |     getIt.registerFactory<SignUpBloc>(() => SignUpBloc(getIt<IAuth>())); | 
					
						
							| 
									
										
										
										
											2021-10-09 10:09:31 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  |     getIt.registerFactory<ISplashUser>(() => SplashUserImpl()); | 
					
						
							|  |  |  |     getIt.registerFactory<ISplashRoute>(() => SplashRoute()); | 
					
						
							|  |  |  |     getIt.registerFactory<HomeBloc>(() => HomeBloc()); | 
					
						
							|  |  |  |     getIt.registerFactory<EditPannelBloc>(() => EditPannelBloc()); | 
					
						
							|  |  |  |     getIt.registerFactory<SplashBloc>(() => SplashBloc(getIt<ISplashUser>())); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-12-11 13:47:16 +08:00
										 |  |  |     getIt.registerFactoryParam<HomeListenBloc, UserProfile, void>((user, _) => HomeListenBloc( | 
					
						
							|  |  |  |           getIt<IUserListener>(param1: user), | 
					
						
							|  |  |  |         )); | 
					
						
							| 
									
										
										
										
											2021-12-04 22:24:32 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  |     getIt.registerLazySingleton<NetworkMonitor>(() => NetworkMonitor()); | 
					
						
							| 
									
										
										
										
											2021-07-21 15:43:05 +08:00
										 |  |  |   } | 
					
						
							|  |  |  | } |