Refactor profile tab layout: replace SingleChildScrollView with Stack for improved logout button positioning and enhance avatar display
This commit is contained in:
@@ -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,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user