feat: restructure the settings page
This commit is contained in:
parent
4cda9f8b59
commit
339f7e1762
@ -688,6 +688,64 @@ class _SettingsPageState extends State<SettingsPage> {
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
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) ...[
|
||||
Text(
|
||||
'Admin Tools',
|
||||
@ -730,28 +788,6 @@ class _SettingsPageState extends State<SettingsPage> {
|
||||
),
|
||||
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(
|
||||
width: double.infinity,
|
||||
height: 56,
|
||||
@ -779,12 +815,10 @@ class _SettingsPageState extends State<SettingsPage> {
|
||||
height: 56,
|
||||
child: ElevatedButton.icon(
|
||||
onPressed: () => Navigator.of(context).push(
|
||||
MaterialPageRoute(
|
||||
builder: (context) => NotificationsSettingsScreen(),
|
||||
),
|
||||
MaterialPageRoute(builder: (context) => SupportScreen()),
|
||||
),
|
||||
icon: Icon(Icons.notifications_outlined, size: 20),
|
||||
label: Text('Notifications'),
|
||||
icon: Icon(Icons.help_outline, size: 20),
|
||||
label: Text('Support'),
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: Color(0xFF6A4C93),
|
||||
foregroundColor: Colors.white,
|
||||
@ -798,30 +832,6 @@ class _SettingsPageState extends State<SettingsPage> {
|
||||
|
||||
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(
|
||||
width: double.infinity,
|
||||
height: 56,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user