mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
17 lines
573 B
Dart
17 lines
573 B
Dart
|
import 'package:app_flowy/home/application/menu/menu_bloc.dart';
|
||
|
import 'package:app_flowy/home/infrastructure/app_repo.dart';
|
||
|
import 'package:app_flowy/home/infrastructure/i_app_impl.dart';
|
||
|
import 'package:get_it/get_it.dart';
|
||
|
|
||
|
class HomeDepsResolver {
|
||
|
static Future<void> resolve(GetIt getIt) async {
|
||
|
getIt.registerLazySingleton<AppRepository>(() => AppRepository());
|
||
|
|
||
|
//Interface implementation
|
||
|
getIt.registerFactory<IApp>(() => IAppImpl(repo: getIt<AppRepository>()));
|
||
|
|
||
|
//Bloc
|
||
|
getIt.registerFactory<MenuBloc>(() => MenuBloc(getIt<IApp>()));
|
||
|
}
|
||
|
}
|