profile_page.dart (1605B)
1 import 'package:firebase_auth/firebase_auth.dart'; 2 import 'package:flutter/material.dart'; 3 import 'package:penny/pages/settings_page.dart'; 4 5 class ProfileScreen extends StatelessWidget { 6 const ProfileScreen({super.key}); 7 8 @override 9 Widget build(BuildContext context) { 10 return Scaffold( 11 appBar: AppBar( 12 actions: [ 13 IconButton( 14 icon: const Icon(Icons.settings), 15 onPressed: () { 16 Navigator.push( 17 context, 18 MaterialPageRoute(builder: (context) => const SettingsScreen()), 19 ); 20 }, 21 ), 22 ], 23 ), 24 body: SingleChildScrollView( 25 child: Column( 26 children: [ 27 // Profile picture section 28 Padding( 29 padding: const EdgeInsets.all(16.0), 30 child: Row( 31 children: [ 32 const CircleAvatar( 33 radius: 50.0, 34 ), 35 const SizedBox(width: 16.0), 36 Column( 37 crossAxisAlignment: CrossAxisAlignment.start, 38 children: [ 39 if (FirebaseAuth.instance.currentUser != null) 40 Text( 41 FirebaseAuth.instance.currentUser!.email!, 42 style: const TextStyle( 43 fontSize: 18.0, fontWeight: FontWeight.bold), 44 ), 45 ], 46 ), 47 ], 48 ), 49 ), 50 ], 51 ), 52 ), 53 ); 54 } 55 }