Insparkspokalen-ui/lib/ProfileInfoTab/profilePageAdmin.dart
pompo96 1be5eb2a07 Logout functionality
Logout button for userProfile and AdminProfile
Preliminary endpoints for backend to create and fetch user
Removed authguard
Refactored loginGoogle to googleAuthService.dart
2025-05-14 00:06:27 +02:00

64 lines
1.8 KiB
Dart

import 'package:flutter/material.dart';
import '../services/googleAuthService.dart';
class ProfilePageAdmin extends StatelessWidget {
const ProfilePageAdmin({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: const Color(0xFF212121),
appBar: AppBar(
backgroundColor: const Color(0xFF212121),
elevation: 0,
iconTheme: const IconThemeData(color: Colors.white),
title: const Text(
'Profil',
style: TextStyle(color: Colors.white),
),
actions: [
IconButton(
icon: const Icon(Icons.logout, color: Colors.white),
tooltip: 'Logga ut',
onPressed: () async {
await GoogleAuthService.logout(context);
},
),
],
),
body: SafeArea(
child: Center(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
CircleAvatar(
radius: 50,
backgroundColor: Colors.grey[700],
child: Icon(Icons.person, size: 50, color: Colors.grey[300]),
),
const SizedBox(height: 20),
const Text(
'Admin',
style: TextStyle(fontSize: 24, color: Colors.white),
),
const SizedBox(height: 20),
Container(
padding: const EdgeInsets.all(10),
height: 150,
width: MediaQuery.of(context).size.width * 0.8,
color: Colors.grey[800],
child: const Center(
child: Text(
'Admin-namn',
style: TextStyle(color: Colors.white70),
),
),
),
],
),
),
),
);
}
}