- Dark / light mode a funcionar no lado do aluno
- Atualização dos ficheiros markdown.
This commit is contained in:
@@ -29,17 +29,21 @@ class _SettingsPageState extends ConsumerState<SettingsPage> {
|
||||
},
|
||||
child: Scaffold(
|
||||
body: Container(
|
||||
decoration: const BoxDecoration(
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
colors: [
|
||||
Color(0xFF82C9BD),
|
||||
Color(0xFF7BA89C),
|
||||
Color(0xFFF68D2D),
|
||||
Color(0xFFF8F9FA),
|
||||
],
|
||||
stops: [0.0, 0.2, 0.6, 1.0],
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: themeMode == ThemeMode.light
|
||||
? [
|
||||
const Color(0xFFD4E8E8),
|
||||
const Color(0xFFE8D4C0),
|
||||
const Color(0xFFD8E0E8),
|
||||
]
|
||||
: [
|
||||
Theme.of(context).colorScheme.primary.withOpacity(0.1),
|
||||
Theme.of(context).colorScheme.secondary.withOpacity(0.05),
|
||||
Theme.of(context).colorScheme.background,
|
||||
],
|
||||
),
|
||||
),
|
||||
child: SafeArea(
|
||||
@@ -54,11 +58,11 @@ class _SettingsPageState extends ConsumerState<SettingsPage> {
|
||||
icon: const Icon(Icons.arrow_back, color: Colors.white),
|
||||
onPressed: () => context.go('/student-dashboard'),
|
||||
),
|
||||
const Expanded(
|
||||
Expanded(
|
||||
child: Text(
|
||||
'Configurações',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
color: Theme.of(context).colorScheme.onSurface,
|
||||
fontSize: 24,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
@@ -187,19 +191,23 @@ class _SettingsPageState extends ConsumerState<SettingsPage> {
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: isDark ? Colors.white70 : AppColors.textSecondary,
|
||||
color: isDark
|
||||
? Colors.white70
|
||||
: Theme.of(context).colorScheme.onSurfaceVariant,
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
color: isDark ? Colors.grey[800] : AppColors.surface,
|
||||
color: Theme.of(context).colorScheme.surface,
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.black.withOpacity(0.05),
|
||||
blurRadius: 2,
|
||||
offset: const Offset(0, 1),
|
||||
color: Theme.of(
|
||||
context,
|
||||
).colorScheme.onSurfaceVariant.withOpacity(0.05),
|
||||
blurRadius: 10,
|
||||
offset: const Offset(0, 2),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -220,17 +228,17 @@ class _SettingsPageState extends ConsumerState<SettingsPage> {
|
||||
leading: const Icon(Icons.palette, color: AppColors.primaryTeal),
|
||||
title: Text(
|
||||
'Tema',
|
||||
style: TextStyle(color: isDark ? Colors.white : AppColors.textPrimary),
|
||||
style: TextStyle(
|
||||
color: isDark
|
||||
? Colors.white
|
||||
: Theme.of(context).colorScheme.onSurface,
|
||||
),
|
||||
),
|
||||
subtitle: Text(
|
||||
isDarkModeAvailable
|
||||
? 'Atual: ${_getThemeModeString(currentTheme)}'
|
||||
: 'Light Mode (padrão)',
|
||||
style: TextStyle(
|
||||
color: isDarkModeAvailable
|
||||
? (isDark ? Colors.white70 : AppColors.textSecondary)
|
||||
: AppColors.textHint,
|
||||
),
|
||||
style: TextStyle(color: Theme.of(context).colorScheme.onSurfaceVariant),
|
||||
),
|
||||
trailing: isDarkModeAvailable
|
||||
? DropdownButton<ThemeMode>(
|
||||
@@ -255,7 +263,10 @@ class _SettingsPageState extends ConsumerState<SettingsPage> {
|
||||
),
|
||||
],
|
||||
)
|
||||
: const Icon(Icons.lock, color: AppColors.textHint),
|
||||
: Icon(
|
||||
Icons.lock,
|
||||
color: Theme.of(context).colorScheme.onSurfaceVariant,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -283,12 +294,18 @@ class _SettingsPageState extends ConsumerState<SettingsPage> {
|
||||
leading: const Icon(Icons.notifications, color: AppColors.primaryTeal),
|
||||
title: Text(
|
||||
title,
|
||||
style: TextStyle(color: isDark ? Colors.white : AppColors.textPrimary),
|
||||
style: TextStyle(
|
||||
color: isDark
|
||||
? Colors.white
|
||||
: Theme.of(context).colorScheme.onSurface,
|
||||
),
|
||||
),
|
||||
subtitle: Text(
|
||||
subtitle,
|
||||
style: TextStyle(
|
||||
color: isDark ? Colors.white70 : AppColors.textSecondary,
|
||||
color: isDark
|
||||
? Colors.white70
|
||||
: Theme.of(context).colorScheme.onSurfaceVariant,
|
||||
),
|
||||
),
|
||||
trailing: Switch(
|
||||
@@ -312,15 +329,24 @@ class _SettingsPageState extends ConsumerState<SettingsPage> {
|
||||
leading: Icon(icon, color: AppColors.primaryTeal),
|
||||
title: Text(
|
||||
title,
|
||||
style: TextStyle(color: isDark ? Colors.white : AppColors.textPrimary),
|
||||
style: TextStyle(
|
||||
color: isDark
|
||||
? Colors.white
|
||||
: Theme.of(context).colorScheme.onSurface,
|
||||
),
|
||||
),
|
||||
subtitle: Text(
|
||||
subtitle,
|
||||
style: TextStyle(
|
||||
color: isDark ? Colors.white70 : AppColors.textSecondary,
|
||||
color: isDark
|
||||
? Colors.white70
|
||||
: Theme.of(context).colorScheme.onSurfaceVariant,
|
||||
),
|
||||
),
|
||||
trailing: const Icon(Icons.chevron_right, color: AppColors.iconInactive),
|
||||
trailing: Icon(
|
||||
Icons.chevron_right,
|
||||
color: Theme.of(context).colorScheme.onSurfaceVariant,
|
||||
),
|
||||
onTap: onTap,
|
||||
);
|
||||
}
|
||||
@@ -336,12 +362,18 @@ class _SettingsPageState extends ConsumerState<SettingsPage> {
|
||||
leading: Icon(icon, color: AppColors.primaryTeal),
|
||||
title: Text(
|
||||
title,
|
||||
style: TextStyle(color: isDark ? Colors.white : AppColors.textPrimary),
|
||||
style: TextStyle(
|
||||
color: isDark
|
||||
? Colors.white
|
||||
: Theme.of(context).colorScheme.onSurface,
|
||||
),
|
||||
),
|
||||
subtitle: Text(
|
||||
subtitle,
|
||||
style: TextStyle(
|
||||
color: isDark ? Colors.white70 : AppColors.textSecondary,
|
||||
color: isDark
|
||||
? Colors.white70
|
||||
: Theme.of(context).colorScheme.onSurfaceVariant,
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user