TF-2046 Add delay time for a while for GetX to delete the controller instance of the previous page

(cherry picked from commit 466784af57d5c6be7b205e4b76e94a2ffa8f8347)
This commit is contained in:
dab246
2023-07-20 15:59:32 +07:00
committed by Dat Vu
parent 036d0db4ce
commit efddcc0ae5
+7 -2
View File
@@ -279,8 +279,13 @@ abstract class BaseController extends GetxController
bool _isFcmActivated(Session session, AccountId accountId) =>
[FirebaseCapability.fcmIdentifier].isSupported(session, accountId) && AppConfig.fcmAvailable;
void goToLogin({LoginArguments? arguments}) {
pushAndPopAll(AppRoutes.login, arguments: arguments);
void goToLogin({LoginArguments? arguments}) async {
await Future.delayed(
const Duration(milliseconds: 500),
() async {
await pushAndPopAll(AppRoutes.login, arguments: arguments);
}
);
}
void logout(Session? session, AccountId? accountId) {