TF-234 Display selection multiple mailbox

This commit is contained in:
dab246
2022-02-24 13:17:51 +07:00
committed by Dat H. Pham
parent ba453f71b2
commit cdeab01a58
17 changed files with 697 additions and 223 deletions
@@ -1,5 +1,6 @@
import 'package:get/get.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:tmail_ui_user/features/base/base_bindings.dart';
import 'package:tmail_ui_user/features/caching/caching_manager.dart';
import 'package:tmail_ui_user/features/login/data/repository/credential_repository_impl.dart';
import 'package:tmail_ui_user/features/login/domain/repository/credential_repository.dart';
@@ -12,20 +13,47 @@ import 'package:tmail_ui_user/features/session/domain/repository/session_reposit
import 'package:tmail_ui_user/features/session/domain/usecases/get_session_interactor.dart';
import 'package:tmail_ui_user/features/session/presentation/session_controller.dart';
class SessionBindings extends Bindings {
class SessionBindings extends BaseBindings {
@override
void dependencies() {
Get.lazyPut(() => SessionDataSourceImpl(Get.find<SessionAPI>()));
Get.lazyPut<SessionDataSource>(() => Get.find<SessionDataSourceImpl>());
Get.lazyPut(() => SessionRepositoryImpl(Get.find<SessionDataSource>()));
Get.lazyPut<SessionRepository>(() => Get.find<SessionRepositoryImpl>());
Get.lazyPut(() => GetSessionInteractor(Get.find<SessionRepository>()));
Get.lazyPut(() => CredentialRepositoryImpl(Get.find<SharedPreferences>()));
Get.lazyPut<CredentialRepository>(() => Get.find<CredentialRepositoryImpl>());
Get.lazyPut(() => DeleteCredentialInteractor(Get.find<CredentialRepository>()));
super.dependencies();
}
@override
void bindingsController() {
Get.lazyPut(() => SessionController(
Get.find<GetSessionInteractor>(),
Get.find<DeleteCredentialInteractor>(),
Get.find<CachingManager>()));
Get.find<GetSessionInteractor>(),
Get.find<DeleteCredentialInteractor>(),
Get.find<CachingManager>(),
));
}
@override
void bindingsDataSource() {
Get.lazyPut<SessionDataSource>(() => Get.find<SessionDataSourceImpl>());
}
@override
void bindingsDataSourceImpl() {
Get.lazyPut(() => SessionDataSourceImpl(Get.find<SessionAPI>()));
}
@override
void bindingsInteractor() {
Get.lazyPut(() => GetSessionInteractor(Get.find<SessionRepository>()));
Get.lazyPut(() => DeleteCredentialInteractor(Get.find<CredentialRepository>()));
}
@override
void bindingsRepository() {
Get.lazyPut<SessionRepository>(() => Get.find<SessionRepositoryImpl>());
Get.lazyPut<CredentialRepository>(() => Get.find<CredentialRepositoryImpl>());
}
@override
void bindingsRepositoryImpl() {
Get.lazyPut(() => SessionRepositoryImpl(Get.find<SessionDataSource>()));
Get.lazyPut(() => CredentialRepositoryImpl(Get.find<SharedPreferences>()));
}
}