2021-07-21 07:43:05 +00:00
|
|
|
import 'package:app_flowy/user/application/sign_in/sign_in_bloc.dart';
|
|
|
|
import 'package:app_flowy/user/domain/i_auth.dart';
|
|
|
|
import 'package:app_flowy/user/infrastructure/repos/auth_repo.dart';
|
|
|
|
import 'package:app_flowy/user/infrastructure/i_auth_impl.dart';
|
|
|
|
import 'package:get_it/get_it.dart';
|
|
|
|
|
|
|
|
class UserDepsResolver {
|
|
|
|
static Future<void> resolve(GetIt getIt) async {
|
2021-07-25 10:04:16 +00:00
|
|
|
getIt.registerFactory<AuthRepository>(() => AuthRepository());
|
2021-07-21 07:43:05 +00:00
|
|
|
|
|
|
|
//Interface implementation
|
|
|
|
getIt.registerFactory<IAuth>(() => AuthImpl(repo: getIt<AuthRepository>()));
|
2021-07-25 10:04:16 +00:00
|
|
|
getIt.registerFactory<IAuthRouter>(() => AuthRouterImpl());
|
2021-07-21 07:43:05 +00:00
|
|
|
|
|
|
|
//Bloc
|
|
|
|
getIt.registerFactory<SignInBloc>(() => SignInBloc(getIt<IAuth>()));
|
|
|
|
}
|
|
|
|
}
|