Finalização de detalhes e pequenas adições em dashboards de alunos e professores

This commit is contained in:
2026-05-18 22:48:27 +01:00
parent c0ade9ef76
commit 7f12f3eb1f
58 changed files with 1347 additions and 1065 deletions

View File

@@ -2,7 +2,6 @@ import 'package:flutter/material.dart';
import 'package:flutter_animate/flutter_animate.dart';
import 'package:go_router/go_router.dart';
import '../../../../core/theme/app_theme_extension.dart';
import '../../../../l10n/app_localizations.dart';
class RoleSelectionPage extends StatefulWidget {
const RoleSelectionPage({super.key});
@@ -43,115 +42,61 @@ class _RoleSelectionPageState extends State<RoleSelectionPage> {
padding: const EdgeInsets.all(24.0),
child: Column(
children: [
const SizedBox(height: 60),
const Spacer(flex: 1),
// Logo and title
Center(
child: Column(
children: [
Container(
width: 100,
height: 100,
decoration: BoxDecoration(
gradient: LinearGradient(
colors: [
AppThemeExtras.of(context)
.actionCardGradientStart,
AppThemeExtras.of(context)
.actionCardGradientEnd,
],
begin: Alignment.topLeft,
end: Alignment.bottomRight,
),
borderRadius: BorderRadius.circular(25),
boxShadow: [
BoxShadow(
color: Theme.of(context)
.colorScheme
.primary
.withOpacity(0.3),
blurRadius: 25,
offset: const Offset(0, 10),
),
],
),
child: const Icon(
Icons.school,
size: 50,
color: Colors.white,
),
)
.animate()
.scale(
duration: const Duration(milliseconds: 800),
curve: Curves.elasticOut,
)
.then()
.shimmer(
duration: const Duration(milliseconds: 2000),
color: Colors.white.withOpacity(0.4),
),
const SizedBox(height: 32),
Text(
AppLocalizations.of(context)!.appTitle,
style: Theme.of(context).textTheme.headlineLarge
?.copyWith(
color: Theme.of(
context,
).colorScheme.onSurface,
fontWeight: FontWeight.bold,
),
)
.animate()
.fadeIn(
duration: const Duration(milliseconds: 800),
delay: const Duration(milliseconds: 200),
)
.slideY(
duration: const Duration(milliseconds: 600),
delay: const Duration(milliseconds: 200),
begin: -0.3,
),
const SizedBox(height: 12),
ShaderMask(
shaderCallback: (bounds) => LinearGradient(
colors: [
Theme.of(context).colorScheme.primary,
Theme.of(context).colorScheme.secondary,
],
begin: Alignment.centerLeft,
end: Alignment.centerRight,
).createShader(bounds),
child: Text(
AppLocalizations.of(context)!.schoolName,
style: Theme.of(context).textTheme.bodyMedium
?.copyWith(
color: Colors.white,
fontWeight: FontWeight.w600,
),
),
)
.animate()
.fadeIn(
duration: const Duration(milliseconds: 800),
delay: const Duration(milliseconds: 400),
)
.slideY(
duration: const Duration(milliseconds: 600),
delay: const Duration(milliseconds: 400),
begin: -0.2,
),
],
// Wide rectangle with image at top
Container(
width: double.infinity,
height: 84,
decoration: const BoxDecoration(
color: Color(0xFFF9EEE8),
borderRadius: BorderRadius.all(Radius.circular(20)),
),
child: Center(
child: SizedBox(
width: 140,
height: 140,
child: ClipRRect(
borderRadius: BorderRadius.circular(16),
child: Image.asset(
'assets/images/logo.png',
fit: BoxFit.cover,
),
),
),
),
).animate().fadeIn(
duration: const Duration(milliseconds: 800),
delay: const Duration(milliseconds: 200),
),
const Spacer(),
const SizedBox(height: 24),
// Role selection title
ShaderMask(
shaderCallback: (bounds) => LinearGradient(
colors: [
Theme.of(context).colorScheme.primary,
Theme.of(context).colorScheme.secondary,
],
begin: Alignment.centerLeft,
end: Alignment.centerRight,
).createShader(bounds),
child: Text(
'Assistente de estudo IA',
style: Theme.of(context).textTheme.headlineSmall
?.copyWith(
color: Colors.white,
fontWeight: FontWeight.bold,
),
),
).animate().fadeIn(
duration: const Duration(milliseconds: 800),
delay: const Duration(milliseconds: 300),
),
const SizedBox(height: 32),
// Title
Text(
'Quem é você?',
style: Theme.of(context).textTheme.headlineMedium
@@ -239,15 +184,16 @@ class _RoleSelectionPageState extends State<RoleSelectionPage> {
? _handleContinue
: null,
style: ElevatedButton.styleFrom(
backgroundColor:
Theme.of(context).colorScheme.primary,
foregroundColor:
Theme.of(context).colorScheme.onPrimary,
backgroundColor: Theme.of(
context,
).colorScheme.primary,
foregroundColor: Theme.of(
context,
).colorScheme.onPrimary,
elevation: 4,
shadowColor: Theme.of(context)
.colorScheme
.primary
.withOpacity(0.3),
shadowColor: Theme.of(
context,
).colorScheme.primary.withOpacity(0.3),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(16),
),
@@ -290,6 +236,8 @@ class _RoleSelectionPageState extends State<RoleSelectionPage> {
),
const SizedBox(height: 32),
const Spacer(flex: 1),
],
),
),
@@ -338,7 +286,9 @@ class _RoleSelectionPageState extends State<RoleSelectionPage> {
border: Border.all(
color: isSelected
? gradientColor
: Theme.of(context).colorScheme.primary.withOpacity(0.2),
: Theme.of(
context,
).colorScheme.primary.withOpacity(0.2),
width: isSelected ? 2 : 1,
),
boxShadow: [