AppFlowy/app_flowy/lib/welcome/infrastructure/deps_resolver.dart

25 lines
1.1 KiB
Dart
Raw Normal View History

2021-07-22 09:06:53 +00:00
import 'package:app_flowy/workspace/application/edit_pannel/edit_pannel_bloc.dart';
2021-09-06 08:18:34 +00:00
import 'package:app_flowy/welcome/application/splash_bloc.dart';
import 'package:app_flowy/welcome/infrastructure/i_splash_impl.dart';
2021-07-24 10:55:13 +00:00
import 'package:app_flowy/workspace/application/home/home_bloc.dart';
2021-09-08 10:25:32 +00:00
import 'package:app_flowy/workspace/application/home/home_auth_bloc.dart';
import 'package:app_flowy/workspace/domain/i_user.dart';
import 'package:app_flowy/workspace/infrastructure/i_user_impl.dart';
2021-07-21 07:43:05 +00:00
import 'package:get_it/get_it.dart';
class WelcomeDepsResolver {
static Future<void> resolve(GetIt getIt) async {
getIt.registerFactory<ISplashUser>(() => SplashUserImpl());
getIt.registerFactory<ISplashRoute>(() => SplashRoute());
2021-07-21 07:43:05 +00:00
getIt.registerFactory<HomeBloc>(() => HomeBloc());
getIt.registerFactory<EditPannelBloc>(() => EditPannelBloc());
getIt.registerFactory<SplashBloc>(() => SplashBloc(getIt<ISplashUser>()));
2021-09-08 10:25:32 +00:00
getIt.registerFactoryParam<HomeAuthBloc, UserProfile, void>(
(user, _) => HomeAuthBloc(
getIt<IUserWatch>(param1: user),
),
);
2021-07-21 07:43:05 +00:00
}
}