kopia lustrzana https://gitlab.com/mysocialportal/relatica
Catch not-logged in on ProfileScreen if asked to draw one time before logout
rodzic
d1203c53a2
commit
bc42e6dc7a
|
@ -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'),
|
||||
|
|
Ładowanie…
Reference in New Issue