Refactor profile tab layout: replace SingleChildScrollView with Stack for improved logout button positioning and enhance avatar display

This commit is contained in:
Leon Bösche
2026-01-27 09:22:44 +01:00
parent 262ce18902
commit ebe2887d7c

View File

@@ -326,7 +326,9 @@ class _AccountSettingsDialogState extends State<AccountSettingsDialog> {
}
Widget _buildProfileTab() {
return SingleChildScrollView(
return Stack(
children: [
SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
@@ -360,7 +362,10 @@ class _AccountSettingsDialogState extends State<AccountSettingsDialog> {
const SizedBox(height: 8),
Text(
'Tap to change avatar',
style: TextStyle(color: AppTheme.secondaryText, fontSize: 12),
style: TextStyle(
color: AppTheme.secondaryText,
fontSize: 12,
),
),
],
),
@@ -408,19 +413,24 @@ class _AccountSettingsDialogState extends State<AccountSettingsDialog> {
),
),
),
const SizedBox(height: 24),
// Logout Button
Center(
const SizedBox(height: 80), // Space for logout button
],
),
),
// Logout Button in bottom right corner of profile tab
Positioned(
bottom: 16,
right: 16,
child: IconButton(
onPressed: _logout,
icon: Icon(Icons.logout, color: AppTheme.errorColor),
tooltip: 'Logout',
iconSize: 28,
splashColor: Colors.transparent,
highlightColor: Colors.transparent,
),
),
],
),
);
}