Remove unnecessary local bindings when global binding did

This commit is contained in:
Dat PHAM HOANG
2023-03-03 12:15:26 +07:00
committed by Dat Vu
parent f1ccbe26e5
commit d252479d19
17 changed files with 90 additions and 148 deletions
@@ -80,10 +80,6 @@ class ManageAccountDashBoardBindings extends BaseBindings {
@override
void bindingsInteractor() {
Get.lazyPut(() => LogoutOidcInteractor(
Get.find<AccountRepository>(),
Get.find<AuthenticationOIDCRepository>(),
));
Get.lazyPut(() => DeleteAuthorityOidcInteractor(
Get.find<AuthenticationOIDCRepository>(),
Get.find<CredentialRepository>()));
@@ -62,8 +62,6 @@ class ManageAccountDashBoardController extends ReloadableController {
GetAuthenticatedAccountInteractor getAuthenticatedAccountInteractor,
UpdateAuthenticationAccountInteractor updateAuthenticationAccountInteractor
) : super(
logoutOidcInteractor,
deleteAuthorityOidcInteractor,
getAuthenticatedAccountInteractor,
updateAuthenticationAccountInteractor
);
@@ -70,8 +70,4 @@ class ManageAccountMenuController extends BaseController {
void backToMailboxDashBoard(BuildContext context) {
dashBoardController.backToMailboxDashBoard(context);
}
void logout(){
dashBoardController.logout(dashBoardController.sessionCurrent.value, dashBoardController.accountId.value);
}
}
@@ -98,7 +98,10 @@ class ManageAccountMenuView extends GetWidget<ManageAccountMenuController> {
Padding(padding: const EdgeInsets.only(left: 32),
child: InkWell(
onTap: () {
controller.logout();
controller.logout(
controller.dashBoardController.sessionCurrent.value,
controller.dashBoardController.accountId.value
);
},
child: Row(children: [
SvgPicture.asset(_imagePaths.icSignOut, fit: BoxFit.fill),