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.registerLazySingleton( () => WorkspaceRepository()); getIt.registerFactoryParam( (appId, _) => AppRepository(appId: appId)); //Interface implementation getIt.registerFactory(() => IAppImpl(repo: getIt())); getIt.registerFactory( () => IWorkspaceImpl(repo: getIt())); //Bloc getIt.registerFactory(() => MenuBloc(getIt())); } }