Muitas coisas e já me esqueci delas todas, cenas principalmente no dashboard do aluno bug fixes e etc

This commit is contained in:
2026-05-17 19:42:49 +01:00
parent 7a26223a01
commit e388ca3b67
20 changed files with 1989 additions and 1224 deletions

View File

@@ -39,9 +39,9 @@ class _ProfileSectionWidgetState extends State<ProfileSectionWidget> {
final achievements = results[1] as List<Achievement>;
// Obter conquistas desbloqueadas recentemente
final unlockedAchievementIds = stats?.unlockedAchievements
.map((ua) => ua.achievementId)
.toSet() ?? {};
final unlockedAchievementIds =
stats?.unlockedAchievements.map((ua) => ua.achievementId).toSet() ??
{};
final recentUnlocked = achievements
.where((a) => unlockedAchievementIds.contains(a.id))
@@ -291,11 +291,11 @@ class _ProfileSectionWidgetState extends State<ProfileSectionWidget> {
),
)
.animate()
.slideY(
duration: const Duration(milliseconds: 800),
.fadeIn(
duration: const Duration(milliseconds: 300),
curve: Curves.easeOut,
)
.then(delay: const Duration(milliseconds: 400));
.then(delay: const Duration(milliseconds: 200));
}
Widget _buildAchievementItem(
@@ -314,9 +314,7 @@ class _ProfileSectionWidgetState extends State<ProfileSectionWidget> {
color: color.withValues(alpha: 0.1),
borderRadius: BorderRadius.circular(16),
),
child: Center(
child: Icon(icon, color: color, size: 16),
),
child: Center(child: Icon(icon, color: color, size: 16)),
),
const SizedBox(width: 12),
Expanded(
@@ -349,37 +347,54 @@ class _ProfileSectionWidgetState extends State<ProfileSectionWidget> {
IconData _getIconData(String iconName) {
switch (iconName) {
case 'emoji_events': return Icons.emoji_events;
case 'school': return Icons.school;
case 'local_fire_department': return Icons.local_fire_department;
case 'schedule': return Icons.schedule;
case 'trending_up': return Icons.trending_up;
case 'military_tech': return Icons.military_tech;
case 'workspace_premium': return Icons.workspace_premium;
case 'psychology': return Icons.psychology;
case 'lightbulb': return Icons.lightbulb;
case 'star': return Icons.star;
case 'speed': return Icons.speed;
default: return Icons.star;
case 'emoji_events':
return Icons.emoji_events;
case 'school':
return Icons.school;
case 'local_fire_department':
return Icons.local_fire_department;
case 'schedule':
return Icons.schedule;
case 'trending_up':
return Icons.trending_up;
case 'military_tech':
return Icons.military_tech;
case 'workspace_premium':
return Icons.workspace_premium;
case 'psychology':
return Icons.psychology;
case 'lightbulb':
return Icons.lightbulb;
case 'star':
return Icons.star;
case 'speed':
return Icons.speed;
default:
return Icons.star;
}
}
Color _getRarityColor(String rarity) {
switch (rarity) {
case 'common': return Colors.grey;
case 'rare': return Colors.blue;
case 'epic': return Colors.purple;
case 'legendary': return Colors.orange;
default: return Colors.grey;
case 'common':
return Colors.grey;
case 'rare':
return Colors.blue;
case 'epic':
return Colors.purple;
case 'legendary':
return Colors.orange;
default:
return Colors.grey;
}
}
String _getProgressMessage() {
if (_userStats == null) return 'Continue estudando!';
final streak = _userStats!.currentStreak;
final studyTime = _userStats!.totalStudyTime;
if (streak >= 7) return 'Incrível streak! 🔥';
if (studyTime >= 300) return 'Dedicação exemplar! 📚';
if (streak >= 3) return 'Bom progresso! 📈';
@@ -388,10 +403,10 @@ class _ProfileSectionWidgetState extends State<ProfileSectionWidget> {
String _getProgressComparison() {
if (_userStats == null) return 'Comece sua jornada de estudos';
final weeklyTime = _userStats!.weeklyStudyTime;
final concepts = _userStats!.masteredConcepts.length;
if (weeklyTime >= 180) return 'Você está 15% acima da média esta semana';
if (concepts >= 3) return 'Domine $concepts conceitos esta semana';
if (weeklyTime >= 60) return 'Bom tempo de estudo esta semana';