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,6 +1,7 @@
import 'package:core/core.dart';
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/login/data/datasource/authentication_datasource.dart';
import 'package:tmail_ui_user/features/login/data/datasource_impl/authentication_datasource_impl.dart';
import 'package:tmail_ui_user/features/login/data/repository/authentication_repository_impl.dart';
@@ -10,24 +11,49 @@ import 'package:tmail_ui_user/features/login/domain/repository/credential_reposi
import 'package:tmail_ui_user/features/login/domain/usecases/authentication_user_interactor.dart';
import 'package:tmail_ui_user/features/login/presentation/login_controller.dart';
class LoginBindings extends Bindings {
class LoginBindings extends BaseBindings {
@override
void dependencies() {
Get.lazyPut(() => AuthenticationDataSourceImpl());
Get.lazyPut<AuthenticationDataSource>(() => Get.find<AuthenticationDataSourceImpl>());
Get.lazyPut(() => CredentialRepositoryImpl(Get.find<SharedPreferences>()));
Get.lazyPut<CredentialRepository>(() => Get.find<CredentialRepositoryImpl>());
Get.lazyPut(() => AuthenticationRepositoryImpl(Get.find<AuthenticationDataSource>()));
Get.lazyPut<AuthenticationRepository>(() => Get.find<AuthenticationRepositoryImpl>());
Get.lazyPut(() => AuthenticationInteractor(Get.find<AuthenticationRepository>(), Get.find<CredentialRepository>()));
super.dependencies();
}
@override
void bindingsController() {
Get.lazyPut(() => LoginController(
Get.find<AuthenticationInteractor>(),
Get.find<DynamicUrlInterceptors>(),
Get.find<AuthorizationInterceptors>())
);
Get.find<AuthenticationInteractor>(),
Get.find<DynamicUrlInterceptors>(),
Get.find<AuthorizationInterceptors>(),
));
}
@override
void bindingsDataSource() {
Get.lazyPut<AuthenticationDataSource>(() => Get.find<AuthenticationDataSourceImpl>());
}
@override
void bindingsDataSourceImpl() {
Get.lazyPut(() => AuthenticationDataSourceImpl());
}
@override
void bindingsInteractor() {
Get.lazyPut(() => AuthenticationInteractor(
Get.find<AuthenticationRepository>(),
Get.find<CredentialRepository>(),
));
}
@override
void bindingsRepository() {
Get.lazyPut<CredentialRepository>(() => Get.find<CredentialRepositoryImpl>());
Get.lazyPut<AuthenticationRepository>(() => Get.find<AuthenticationRepositoryImpl>());
}
@override
void bindingsRepositoryImpl() {
Get.lazyPut(() => CredentialRepositoryImpl(Get.find<SharedPreferences>()));
Get.lazyPut(() => AuthenticationRepositoryImpl(Get.find<AuthenticationDataSource>()));
}
}