Catch not-logged in on ProfileScreen if asked to draw one time before logout

codemagic-setup
Hank Grabowski 2023-02-27 14:56:02 -05:00
rodzic d1203c53a2
commit bc42e6dc7a
1 zmienionych plików z 7 dodań i 0 usunięć

Wyświetl plik

@ -17,6 +17,13 @@ class _ProfileScreenState extends State<ProfileScreen> {
@override
Widget build(BuildContext context) {
final authService = context.watch<AccountsService>();
if (!authService.loggedIn) {
return Scaffold(
appBar: StandardAppBar.build(context, 'Not Logged In'),
body: Center(
child: Text('Not logged in'),
));
}
final profile = authService.currentProfile;
return Scaffold(
appBar: StandardAppBar.build(context, 'Profile'),