- Dark / light mode a funcionar no lado do aluno

- Atualização dos ficheiros markdown.
This commit is contained in:
2026-05-14 22:07:03 +01:00
parent 55ec2521cf
commit 62b9a107bc
30 changed files with 2582 additions and 1839 deletions

View File

@@ -17,12 +17,14 @@ class ProfileSectionWidget extends StatelessWidget {
margin: const EdgeInsets.only(top: 24),
padding: const EdgeInsets.all(20),
decoration: BoxDecoration(
color: Colors.white,
color: Theme.of(context).colorScheme.surface,
borderRadius: BorderRadius.circular(16),
border: Border.all(color: const Color(0xFFE2E8F0)),
border: Border.all(
color: Theme.of(context).colorScheme.outline.withOpacity(0.2),
),
boxShadow: [
BoxShadow(
color: Colors.black.withOpacity(0.05),
color: Theme.of(context).colorScheme.shadow.withOpacity(0.05),
blurRadius: 10,
offset: const Offset(0, 4),
),
@@ -38,8 +40,13 @@ class ProfileSectionWidget extends StatelessWidget {
width: 48,
height: 48,
decoration: BoxDecoration(
gradient: const LinearGradient(
colors: [Color(0xFF82C9BD), Color(0xFF6BA8A0)],
gradient: LinearGradient(
colors: [
Theme.of(context).colorScheme.primary,
Theme.of(
context,
).colorScheme.primary.withOpacity(0.8),
],
),
borderRadius: BorderRadius.circular(24),
),
@@ -56,8 +63,8 @@ class ProfileSectionWidget extends StatelessWidget {
children: [
Text(
userName,
style: const TextStyle(
color: Color(0xFF2D3748),
style: TextStyle(
color: Theme.of(context).colorScheme.onSurface,
fontSize: 18,
fontWeight: FontWeight.bold,
),
@@ -70,16 +77,20 @@ class ProfileSectionWidget extends StatelessWidget {
children: [
Text(
userEmail,
style: const TextStyle(
color: Color(0xFF718096),
style: TextStyle(
color: Theme.of(
context,
).colorScheme.onSurfaceVariant,
fontSize: 14,
),
),
if (userEmail.length > 20) ...[
const SizedBox(width: 8),
const Icon(
Icon(
Icons.more_horiz,
color: Color(0xFF718096),
color: Theme.of(
context,
).colorScheme.onSurfaceVariant,
size: 16,
),
],
@@ -96,12 +107,14 @@ class ProfileSectionWidget extends StatelessWidget {
child: Container(
padding: const EdgeInsets.all(8),
decoration: BoxDecoration(
color: const Color(0xFFF68D2D).withOpacity(0.1),
color: Theme.of(
context,
).colorScheme.secondary.withOpacity(0.1),
borderRadius: BorderRadius.circular(8),
),
child: const Icon(
child: Icon(
Icons.settings,
color: Color(0xFFF68D2D),
color: Theme.of(context).colorScheme.secondary,
size: 20,
),
),
@@ -113,16 +126,16 @@ class ProfileSectionWidget extends StatelessWidget {
// Achievements
Row(
children: [
const Icon(
Icon(
Icons.emoji_events,
color: Color(0xFFF68D2D),
color: Theme.of(context).colorScheme.secondary,
size: 20,
),
const SizedBox(width: 8),
const Text(
Text(
'Conquistas',
style: TextStyle(
color: Color(0xFF2D3748),
color: Theme.of(context).colorScheme.onSurface,
fontSize: 16,
fontWeight: FontWeight.bold,
),
@@ -137,25 +150,27 @@ class ProfileSectionWidget extends StatelessWidget {
_buildAchievementBadge(
icon: Icons.local_fire_department,
label: '7 dias',
color: const Color(0xFFF68D2D),
color: Theme.of(context).colorScheme.secondary,
),
const SizedBox(width: 12),
_buildAchievementBadge(
icon: Icons.school,
label: '3 conceitos',
color: const Color(0xFF82C9BD),
color: Theme.of(context).colorScheme.primary,
),
const SizedBox(width: 12),
_buildAchievementBadge(
icon: Icons.speed,
label: 'Rápido',
color: const Color(0xFF6BA8A0),
color: Theme.of(
context,
).colorScheme.primary.withOpacity(0.8),
),
const SizedBox(width: 12),
_buildAchievementBadge(
icon: Icons.star,
label: '100%',
color: const Color(0xFF4CAF50),
color: Theme.of(context).colorScheme.tertiary,
),
],
),
@@ -165,15 +180,21 @@ class ProfileSectionWidget extends StatelessWidget {
Container(
padding: const EdgeInsets.all(16),
decoration: BoxDecoration(
color: const Color(0xFFF8F9FA),
color: Theme.of(context).brightness == Brightness.dark
? Theme.of(context).colorScheme.surfaceContainerHighest
: Theme.of(context).colorScheme.surface,
borderRadius: BorderRadius.circular(12),
border: Border.all(color: const Color(0xFFE2E8F0)),
border: Border.all(
color: Theme.of(
context,
).colorScheme.outline.withOpacity(0.2),
),
),
child: Row(
children: [
const Icon(
Icon(
Icons.trending_up,
color: Color(0xFF82C9BD),
color: Theme.of(context).colorScheme.primary,
size: 20,
),
const SizedBox(width: 12),
@@ -181,10 +202,10 @@ class ProfileSectionWidget extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const Text(
Text(
'Ótimo progresso!',
style: TextStyle(
color: Color(0xFF2D3748),
color: Theme.of(context).colorScheme.onSurface,
fontSize: 14,
fontWeight: FontWeight.bold,
),
@@ -192,8 +213,10 @@ class ProfileSectionWidget extends StatelessWidget {
const SizedBox(height: 2),
Text(
'Você está 15% acima da média esta semana',
style: const TextStyle(
color: Color(0xFF718096),
style: TextStyle(
color: Theme.of(
context,
).colorScheme.onSurfaceVariant,
fontSize: 12,
),
),