-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
When their is no internet connection the state of the Auth changes to the unauthenticated and the user redirects to the login page
After making the internet available back it goes directly to the main page and the auth state is then authenticated.
It should stay authenticated or at least should stay in main page after no internet connection.
from the UX perspective it looks not good that after no internet it redirects to the Login Page, but at the back its already authenticated.
My implementation of Auth
class MainWidget extends StatelessWidget {
const MainWidget({super.key});
@override
Widget build(BuildContext context) {
final authNotifier = context.authNotifier;
Widget widget;
switch (authNotifier.status) {
case AuthStatus.authenticated:
widget = const FeedPage();
break;
case AuthStatus.unauthenticated:
case AuthStatus.authenticating:
widget = const LoginPage();
break;
case AuthStatus.uninitialized:
widget = const SplashScreenWidget();
break;
default:
widget = const SplashScreenWidget();
break;
}
return widget;
}
}
Metadata
Metadata
Assignees
Labels
No labels