import 'package:app_flowy/home/application/menu/menu_bloc.dart'; import 'package:app_flowy/home/infrastructure/i_app_impl.dart'; import 'package:app_flowy/home/infrastructure/i_workspace_impl.dart'; import 'package:app_flowy/home/infrastructure/repos/app_repo.dart'; import 'package:app_flowy/home/infrastructure/repos/workspace_repo.dart'; import 'package:get_it/get_it.dart'; class HomeDepsResolver { static Future resolve(GetIt getIt) async { getIt.registerFactoryParam( (workspaceId, _) => WorkspaceRepository(workspaceId: workspaceId)); getIt.registerFactoryParam( (appId, _) => AppRepository(appId: appId)); //Interface implementation getIt.registerFactoryParam( (appId, _) => IAppImpl(repo: getIt(param1: appId))); getIt.registerFactoryParam((workspacId, _) => IWorkspaceImpl(repo: getIt(param1: workspacId))); //Bloc getIt.registerFactoryParam( (workspaceId, _) => MenuBloc(getIt(param1: workspaceId))); } }