From bf13bfd326bc0acb7a1feb0ea49453da35138b59 Mon Sep 17 00:00:00 2001 From: 240405 <240405@epvc.pt> Date: Fri, 8 May 2026 12:22:41 +0100 Subject: [PATCH] =?UTF-8?q?Corre=C3=A7=C3=B5es=20em=20dashboard=20aluno?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../widgets/quick_access_widget.dart | 356 +++++++++--------- 1 file changed, 178 insertions(+), 178 deletions(-) diff --git a/lib/features/dashboard/presentation/widgets/quick_access_widget.dart b/lib/features/dashboard/presentation/widgets/quick_access_widget.dart index 88b776f..24f4555 100644 --- a/lib/features/dashboard/presentation/widgets/quick_access_widget.dart +++ b/lib/features/dashboard/presentation/widgets/quick_access_widget.dart @@ -9,214 +9,214 @@ class QuickAccessWidget extends StatelessWidget { @override Widget build(BuildContext context) { return Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - 'Acesso Rápido', - style: TextStyle( - color: const Color(0xFF2D3748), - fontSize: 20, - fontWeight: FontWeight.bold, - ), - ), - const SizedBox(height: 16), - - Row( + crossAxisAlignment: CrossAxisAlignment.start, children: [ - // Tutor IA Card (Primary) - Expanded( - flex: 3, - child: _buildTutorIACard(context), + Text( + 'Acesso Rápido', + style: TextStyle( + color: const Color(0xFF2D3748), + fontSize: 20, + fontWeight: FontWeight.bold, + ), ), - const SizedBox(width: 16), - // Quiz Card (Secondary) - Expanded( - flex: 2, - child: _buildQuizCard(context), + const SizedBox(height: 16), + + Row( + children: [ + // Tutor IA Card (Primary) + Expanded(flex: 3, child: _buildTutorIACard(context)), + const SizedBox(width: 16), + // Quiz Card (Secondary) + Expanded(flex: 2, child: _buildQuizCard(context)), + ], ), ], - ), - ], - ).animate().slideY( - duration: const Duration(milliseconds: 800), - curve: Curves.easeOut, - ).then(delay: const Duration(milliseconds: 200)); + ) + .animate() + .slideY( + duration: const Duration(milliseconds: 800), + curve: Curves.easeOut, + ) + .then(delay: const Duration(milliseconds: 200)); } Widget _buildTutorIACard(BuildContext context) { return Container( - height: 135, - decoration: BoxDecoration( - gradient: LinearGradient( - begin: Alignment.topLeft, - end: Alignment.bottomRight, - colors: [ - const Color(0xFF82C9BD), - const Color(0xFF6BA8A0), - ], - ), - borderRadius: BorderRadius.circular(16), - boxShadow: [ - BoxShadow( - color: const Color(0xFF82C9BD).withOpacity(0.3), - blurRadius: 15, - offset: const Offset(0, 8), + height: 150, + decoration: BoxDecoration( + gradient: const LinearGradient( + begin: Alignment.topLeft, + end: Alignment.bottomRight, + colors: [Color(0xFF82C9BD), Color(0xFF6BA8A0)], + ), + borderRadius: BorderRadius.circular(16), + boxShadow: [ + BoxShadow( + color: const Color(0xFF82C9BD).withOpacity(0.3), + blurRadius: 15, + offset: const Offset(0, 8), + ), + ], ), - ], - ), - child: Material( - color: Colors.transparent, - child: InkWell( - borderRadius: BorderRadius.circular(16), - onTap: () => context.go('/tutor'), - child: Padding( - padding: const EdgeInsets.all(20), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Row( - children: [ - Container( - padding: const EdgeInsets.all(10), - decoration: BoxDecoration( - color: Colors.white.withOpacity(0.2), - borderRadius: BorderRadius.circular(10), - ), - child: const Icon( - Icons.psychology, - color: Colors.white, - size: 24, - ), - ), - const Spacer(), - Container( - padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 4), - decoration: BoxDecoration( - color: const Color(0xFFF68D2D), - borderRadius: BorderRadius.circular(12), - ), - child: const Text( - 'NOVO', - style: TextStyle( - color: Colors.white, - fontSize: 10, - fontWeight: FontWeight.bold, - ), - ), - ), - ], - ), - const SizedBox(height: 12), - const Column( + child: Material( + color: Colors.transparent, + child: InkWell( + borderRadius: BorderRadius.circular(16), + onTap: () => context.go('/tutor'), + child: Padding( + padding: const EdgeInsets.all(20), + child: Column( crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Text( - 'Tutor IA', - style: TextStyle( - color: Colors.white, - fontSize: 18, - fontWeight: FontWeight.bold, - ), + Row( + children: [ + Container( + padding: const EdgeInsets.all(7), + decoration: BoxDecoration( + color: Colors.white.withOpacity(0.2), + borderRadius: BorderRadius.circular(10), + ), + child: const Icon( + Icons.psychology, + color: Colors.white, + size: 24, + ), + ), + const Spacer(), + Container( + padding: const EdgeInsets.symmetric( + horizontal: 10, + vertical: 4, + ), + decoration: BoxDecoration( + color: const Color(0xFFF68D2D), + borderRadius: BorderRadius.circular(12), + ), + child: const Text( + 'NOVO', + style: TextStyle( + color: Colors.white, + fontSize: 10, + fontWeight: FontWeight.bold, + ), + ), + ), + ], ), - SizedBox(height: 4), - Text( - 'Assistente de estudos', - maxLines: 1, - overflow: TextOverflow.ellipsis, - style: TextStyle( - color: Colors.white, - fontSize: 12, - height: 1.2, - ), + const SizedBox(height: 12), + const Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + 'Tutor IA', + style: TextStyle( + color: Colors.white, + fontSize: 18, + fontWeight: FontWeight.bold, + ), + ), + //SizedBox(height: 4), + Text( + 'Assistente de estudos', + maxLines: 1, + overflow: TextOverflow.ellipsis, + style: TextStyle( + color: Colors.white, + fontSize: 12, + height: 1.2, + ), + ), + ], ), ], ), - ], + ), ), ), - ), - ), - ).animate().scale( - duration: const Duration(milliseconds: 600), - curve: Curves.elasticOut, - ).then(delay: const Duration(milliseconds: 100)); + ) + .animate() + .scale( + duration: const Duration(milliseconds: 600), + curve: Curves.elasticOut, + ) + .then(delay: const Duration(milliseconds: 100)); } Widget _buildQuizCard(BuildContext context) { return Container( - height: 135, - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(16), - border: Border.all( - color: const Color(0xFFE2E8F0), - width: 1, - ), - boxShadow: [ - BoxShadow( - color: Colors.black.withOpacity(0.05), - blurRadius: 10, - offset: const Offset(0, 4), + height: 150, + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(16), + border: Border.all(color: const Color(0xFFE2E8F0), width: 1), + boxShadow: [ + BoxShadow( + color: Colors.black.withOpacity(0.05), + blurRadius: 10, + offset: const Offset(0, 4), + ), + ], ), - ], - ), - child: Material( - color: Colors.transparent, - child: InkWell( - borderRadius: BorderRadius.circular(16), - onTap: () => context.go('/quiz'), - child: Padding( - padding: const EdgeInsets.all(20), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Container( - padding: const EdgeInsets.all(10), - decoration: BoxDecoration( - color: const Color(0xFFF68D2D).withOpacity(0.1), - borderRadius: BorderRadius.circular(10), - ), - child: const Icon( - Icons.quiz, - color: Color(0xFFF68D2D), - size: 24, - ), - ), - const SizedBox(height: 12), - const Column( + child: Material( + color: Colors.transparent, + child: InkWell( + borderRadius: BorderRadius.circular(16), + onTap: () => context.go('/quiz'), + child: Padding( + padding: const EdgeInsets.all(14), + child: Column( crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Text( - 'Quiz', - style: TextStyle( - color: Color(0xFF2D3748), - fontSize: 16, - fontWeight: FontWeight.bold, + Container( + padding: const EdgeInsets.all(10), + decoration: BoxDecoration( + color: const Color(0xFFF68D2D).withOpacity(0.1), + borderRadius: BorderRadius.circular(10), + ), + child: const Icon( + Icons.quiz, + color: Color(0xFFF68D2D), + size: 24, ), ), - SizedBox(height: 4), - Text( - 'Teste conhecimentos', - maxLines: 1, - overflow: TextOverflow.ellipsis, - style: TextStyle( - color: Color(0xFF718096), - fontSize: 12, - height: 1.2, - ), + const SizedBox(height: 12), + const Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + 'Quiz', + style: TextStyle( + color: Color(0xFF2D3748), + fontSize: 16, + fontWeight: FontWeight.bold, + ), + ), + SizedBox(height: 4), + Text( + 'Teste conhecimentos', + maxLines: 2, + overflow: TextOverflow.ellipsis, + style: TextStyle( + color: Color(0xFF718096), + fontSize: 12, + height: 1.2, + ), + ), + ], ), ], ), - ], + ), ), ), - ), - ), - ).animate().scale( - duration: const Duration(milliseconds: 600), - curve: Curves.elasticOut, - ).then(delay: const Duration(milliseconds: 200)); + ) + .animate() + .scale( + duration: const Duration(milliseconds: 600), + curve: Curves.elasticOut, + ) + .then(delay: const Duration(milliseconds: 200)); } }