feat: restructure the settings page

This commit is contained in:
sBubshait 2025-08-05 11:12:03 +03:00
parent 4cda9f8b59
commit 339f7e1762

View File

@ -688,6 +688,64 @@ class _SettingsPageState extends State<SettingsPage> {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Text(
'Your Preferences',
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w600,
color: Color(0xFF6A4C93),
),
),
SizedBox(height: 16),
Container(
width: double.infinity,
height: 56,
child: ElevatedButton.icon(
onPressed: () => Navigator.of(context).push(
MaterialPageRoute(
builder: (context) => EditProfileScreen(userData: userData),
),
),
icon: Icon(Icons.edit, size: 20),
label: Text('Profile'),
style: ElevatedButton.styleFrom(
backgroundColor: Color(0xFF6A4C93),
foregroundColor: Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12),
),
padding: EdgeInsets.symmetric(horizontal: 16),
),
),
),
SizedBox(height: 16),
Container(
width: double.infinity,
height: 56,
child: ElevatedButton.icon(
onPressed: () => Navigator.of(context).push(
MaterialPageRoute(
builder: (context) => NotificationsSettingsScreen(),
),
),
icon: Icon(Icons.notifications_outlined, size: 20),
label: Text('Notifications'),
style: ElevatedButton.styleFrom(
backgroundColor: Color(0xFF6A4C93),
foregroundColor: Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12),
),
padding: EdgeInsets.symmetric(horizontal: 16),
),
),
),
SizedBox(height: 32),
if (!isLoadingUser && _isAdmin) ...[ if (!isLoadingUser && _isAdmin) ...[
Text( Text(
'Admin Tools', 'Admin Tools',
@ -730,28 +788,6 @@ class _SettingsPageState extends State<SettingsPage> {
), ),
SizedBox(height: 16), SizedBox(height: 16),
Container(
width: double.infinity,
height: 56,
child: ElevatedButton.icon(
onPressed: () => Navigator.of(context).push(
MaterialPageRoute(builder: (context) => SupportScreen()),
),
icon: Icon(Icons.help_outline, size: 20),
label: Text('Support'),
style: ElevatedButton.styleFrom(
backgroundColor: Color(0xFF6A4C93),
foregroundColor: Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12),
),
padding: EdgeInsets.symmetric(horizontal: 16),
),
),
),
SizedBox(height: 16),
Container( Container(
width: double.infinity, width: double.infinity,
height: 56, height: 56,
@ -779,12 +815,10 @@ class _SettingsPageState extends State<SettingsPage> {
height: 56, height: 56,
child: ElevatedButton.icon( child: ElevatedButton.icon(
onPressed: () => Navigator.of(context).push( onPressed: () => Navigator.of(context).push(
MaterialPageRoute( MaterialPageRoute(builder: (context) => SupportScreen()),
builder: (context) => NotificationsSettingsScreen(),
),
), ),
icon: Icon(Icons.notifications_outlined, size: 20), icon: Icon(Icons.help_outline, size: 20),
label: Text('Notifications'), label: Text('Support'),
style: ElevatedButton.styleFrom( style: ElevatedButton.styleFrom(
backgroundColor: Color(0xFF6A4C93), backgroundColor: Color(0xFF6A4C93),
foregroundColor: Colors.white, foregroundColor: Colors.white,
@ -798,30 +832,6 @@ class _SettingsPageState extends State<SettingsPage> {
SizedBox(height: 32), SizedBox(height: 32),
Container(
width: double.infinity,
height: 56,
child: ElevatedButton.icon(
onPressed: () => Navigator.of(context).push(
MaterialPageRoute(
builder: (context) => EditProfileScreen(userData: userData),
),
),
icon: Icon(Icons.edit, size: 20),
label: Text('Update your Profile'),
style: ElevatedButton.styleFrom(
backgroundColor: Color(0xFF6A4C93),
foregroundColor: Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12),
),
padding: EdgeInsets.symmetric(horizontal: 16),
),
),
),
SizedBox(height: 16),
Container( Container(
width: double.infinity, width: double.infinity,
height: 56, height: 56,