Check whether it needs to request auth or not AFTER the user gets back to the app

This commit is contained in:
OmarHatem 2022-12-15 14:14:54 +02:00
parent 761b34999e
commit f9566cf33e

View file

@ -91,14 +91,15 @@ class RootState extends State<Root> with WidgetsBindingObserver {
return;
}
setState(() {
_requestAuth = widget.authService.requireAuth();
});
if (!_isInactive && widget.authenticationStore.state == AuthenticationState.allowed) {
setState(() => _setInactive(true));
}
break;
case AppLifecycleState.resumed:
setState(() {
_requestAuth = widget.authService.requireAuth();
});
break;
default:
break;