import 'package:app_flowy/workspace/application/app/app_bloc.dart'; import 'package:app_flowy/workspace/application/app/app_watch_bloc.dart'; import 'package:app_flowy/workspace/application/menu/menu_bloc.dart'; import 'package:app_flowy/workspace/application/menu/menu_watch.dart'; import 'package:app_flowy/workspace/application/view/view_bloc.dart'; import 'package:app_flowy/workspace/domain/i_doc.dart'; import 'package:app_flowy/workspace/domain/i_view.dart'; import 'package:app_flowy/workspace/domain/page_stack/page_stack.dart'; import 'package:app_flowy/workspace/infrastructure/i_app_impl.dart'; import 'package:app_flowy/workspace/infrastructure/i_doc_impl.dart'; import 'package:app_flowy/workspace/infrastructure/i_workspace_impl.dart'; import 'package:app_flowy/workspace/infrastructure/repos/app_repo.dart'; import 'package:app_flowy/workspace/infrastructure/repos/doc_repo.dart'; import 'package:app_flowy/workspace/infrastructure/repos/view_repo.dart'; import 'package:app_flowy/workspace/infrastructure/repos/workspace_repo.dart'; import 'package:get_it/get_it.dart'; import 'i_view_impl.dart'; class HomeDepsResolver { static Future resolve(GetIt getIt) async { // getIt.registerLazySingleton(() => HomePageStack()); //App getIt.registerFactoryParam( (appId, _) => IAppImpl(repo: AppRepository(appId: appId))); getIt.registerFactoryParam( (appId, _) => IAppWatchImpl(repo: AppWatchRepository(appId: appId))); //workspace getIt.registerFactoryParam((workspaceId, _) => IWorkspaceImpl(repo: WorkspaceRepo(workspaceId: workspaceId))); getIt.registerFactoryParam((workspacId, _) => IWorkspaceWatchImpl(repo: WorkspaceWatchRepo(workspaceId: workspacId))); // View getIt.registerFactoryParam( (viewId, _) => IViewImpl(repo: ViewRepository(viewId: viewId))); getIt.registerFactoryParam((viewId, _) => IViewWatchImpl(repo: ViewWatchRepository(viewId: viewId))); // Doc getIt.registerFactoryParam( (docId, _) => IDocImpl(repo: DocRepository(docId: docId))); //Bloc getIt.registerFactoryParam( (workspaceId, _) => MenuBloc(getIt(param1: workspaceId))); getIt.registerFactoryParam((workspaceId, _) => MenuWatchBloc(getIt(param1: workspaceId))); getIt.registerFactoryParam( (appId, _) => AppBloc(getIt(param1: appId))); getIt.registerFactoryParam( (appId, _) => AppWatchBloc(getIt(param1: appId))); getIt.registerFactoryParam( (viewId, _) => ViewBloc(iViewImpl: getIt(param1: viewId))); // getIt.registerFactoryParam( // (viewId, _) => ViewBloc(iViewImpl: getIt(param1: viewId))); } }