CKT 1.0.1
This commit is contained in:
@@ -84,9 +84,6 @@ class Quiz1Screen extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
return QuizQuestionScreen(
|
||||
title: 'Quiz 1/28',
|
||||
category: 'Saúde respiratória',
|
||||
categoryIcon: Icons.medical_information_rounded,
|
||||
fallbackIcon: Icons.medical_information_rounded,
|
||||
fallbackColor: const Color(0xFFFF55A7),
|
||||
question: 'O seu filho/a tem problemas respiratórios diagnosticados?',
|
||||
answers: const [
|
||||
@@ -131,9 +128,6 @@ class Quiz2Screen extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
return QuizQuestionScreen(
|
||||
title: 'Quiz 2/28',
|
||||
category: 'Respiração',
|
||||
categoryIcon: Icons.air_rounded,
|
||||
fallbackIcon: Icons.air_rounded,
|
||||
fallbackColor: const Color(0xFF2F9E94),
|
||||
question: 'O seu filho/a respira habitualmente pela boca?',
|
||||
answers: const [
|
||||
@@ -178,10 +172,7 @@ class Quiz3Screen extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
return QuizQuestionScreen(
|
||||
title: 'Quiz 3/28',
|
||||
category: 'Sono',
|
||||
categoryIcon: Icons.bedtime_rounded,
|
||||
fallbackIcon: Icons.bedtime_rounded,
|
||||
fallbackColor: const Color(0xFF8E7CC3),
|
||||
fallbackColor: const Color(0xFFFF55A7),
|
||||
question: 'O seu filho/a ressona habitualmente durante a noite?',
|
||||
answers: const [
|
||||
QuizAnswer(
|
||||
@@ -225,9 +216,6 @@ class Quiz4Screen extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
return QuizQuestionScreen(
|
||||
title: 'Quiz 4/28',
|
||||
category: 'Respiração',
|
||||
categoryIcon: Icons.sick_rounded,
|
||||
fallbackIcon: Icons.sick_rounded,
|
||||
fallbackColor: const Color(0xFFFF55A7),
|
||||
question: 'O seu filho/a sente habitualmente o nariz "tapado"?',
|
||||
answers: const [
|
||||
@@ -272,10 +260,7 @@ class Quiz5Screen extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
return QuizQuestionScreen(
|
||||
title: 'Quiz 5/28',
|
||||
category: 'Sono',
|
||||
categoryIcon: Icons.nights_stay_rounded,
|
||||
fallbackIcon: Icons.nights_stay_rounded,
|
||||
fallbackColor: const Color(0xFF8E7CC3),
|
||||
fallbackColor: const Color(0xFFFF55A7),
|
||||
question:
|
||||
'Durante o sono, o seu filho/a tem habitualmente interrupções da respiração?',
|
||||
answers: const [
|
||||
@@ -321,9 +306,6 @@ class Quiz6Screen extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
return QuizQuestionScreen(
|
||||
title: 'Quiz 6/28',
|
||||
category: 'Hábitos noturnos',
|
||||
categoryIcon: Icons.nights_stay_rounded,
|
||||
fallbackIcon: Icons.nights_stay_rounded,
|
||||
fallbackColor: const Color(0xFF2F9E94),
|
||||
question: 'O seu filho/a range os dentes com frequência?',
|
||||
answers: const [
|
||||
@@ -361,9 +343,6 @@ class Quiz7Screen extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
return QuizQuestionScreen(
|
||||
title: 'Quiz 7/28',
|
||||
category: 'Saúde geral',
|
||||
categoryIcon: Icons.local_florist_rounded,
|
||||
fallbackIcon: Icons.local_florist_rounded,
|
||||
fallbackColor: const Color(0xFFFF55A7),
|
||||
question: 'O seu filho/a habitualmente tem alergias sazonais?',
|
||||
answers: const [
|
||||
@@ -408,10 +387,7 @@ class Quiz8Screen extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
return QuizQuestionScreen(
|
||||
title: 'Quiz 8/28',
|
||||
category: 'Sono',
|
||||
categoryIcon: Icons.water_drop_rounded,
|
||||
fallbackIcon: Icons.water_drop_rounded,
|
||||
fallbackColor: const Color(0xFF8E7CC3),
|
||||
fallbackColor: const Color(0xFFFF55A7),
|
||||
question: 'O seu filho/a acorda com saliva seca na cara ou na almofada?',
|
||||
answers: const [
|
||||
QuizAnswer(
|
||||
@@ -455,9 +431,6 @@ class Quiz9Screen extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
return QuizQuestionScreen(
|
||||
title: 'Quiz 9/28',
|
||||
category: 'Saúde geral',
|
||||
categoryIcon: Icons.hearing_rounded,
|
||||
fallbackIcon: Icons.hearing_rounded,
|
||||
fallbackColor: const Color(0xFF2F9E94),
|
||||
question: 'O seu filho/a teve ou costuma ter com frequência otites?',
|
||||
answers: const [
|
||||
@@ -502,9 +475,6 @@ class Quiz10Screen extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
return QuizQuestionScreen(
|
||||
title: 'Quiz 10/28',
|
||||
category: 'Saúde geral',
|
||||
categoryIcon: Icons.healing_rounded,
|
||||
fallbackIcon: Icons.healing_rounded,
|
||||
fallbackColor: const Color(0xFFFF55A7),
|
||||
question: 'O seu filho/a teve ou costuma ter com frequência amigdalites?',
|
||||
answers: const [
|
||||
@@ -549,9 +519,6 @@ class Quiz11Screen extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
return QuizQuestionScreen(
|
||||
title: 'Quiz 11/28',
|
||||
category: 'Saúde respiratória',
|
||||
categoryIcon: Icons.air_rounded,
|
||||
fallbackIcon: Icons.air_rounded,
|
||||
fallbackColor: const Color(0xFF2F9E94),
|
||||
question:
|
||||
'O seu filho/a teve ou costuma ter com frequência bronquiolites?',
|
||||
@@ -597,9 +564,6 @@ class Quiz12Screen extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
return QuizQuestionScreen(
|
||||
title: 'Quiz 12/28',
|
||||
category: 'Hábitos alimentares',
|
||||
categoryIcon: Icons.restaurant_rounded,
|
||||
fallbackIcon: Icons.restaurant_rounded,
|
||||
fallbackColor: const Color(0xFFFF55A7),
|
||||
question: 'O seu filho/a apresenta dificuldades a mastigar?',
|
||||
answers: const [
|
||||
@@ -637,9 +601,6 @@ class Quiz13Screen extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
return QuizQuestionScreen(
|
||||
title: 'Quiz 13/28',
|
||||
category: 'Hábitos alimentares',
|
||||
categoryIcon: Icons.schedule_rounded,
|
||||
fallbackIcon: Icons.schedule_rounded,
|
||||
fallbackColor: const Color(0xFF2F9E94),
|
||||
question: 'O seu filho/a habitualmente é lento a comer?',
|
||||
answers: const [
|
||||
@@ -677,10 +638,7 @@ class Quiz14Screen extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
return QuizQuestionScreen(
|
||||
title: 'Quiz 14/28',
|
||||
category: 'Hábitos alimentares',
|
||||
categoryIcon: Icons.restaurant_menu_rounded,
|
||||
fallbackIcon: Icons.restaurant_menu_rounded,
|
||||
fallbackColor: const Color(0xFF8E7CC3),
|
||||
fallbackColor: const Color(0xFFFF55A7),
|
||||
question: 'O seu filho/a habitualmente prefere comer alimentos moles?',
|
||||
answers: const [
|
||||
QuizAnswer(
|
||||
@@ -717,9 +675,6 @@ class Quiz15Screen extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
return QuizQuestionScreen(
|
||||
title: 'Quiz 15/28',
|
||||
category: 'Hábitos alimentares',
|
||||
categoryIcon: Icons.local_drink_rounded,
|
||||
fallbackIcon: Icons.local_drink_rounded,
|
||||
fallbackColor: const Color(0xFFFF55A7),
|
||||
question: 'Em bebé apenas foi alimentado por biberão?',
|
||||
answers: const [
|
||||
@@ -764,9 +719,6 @@ class Quiz16Screen extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
return QuizQuestionScreen(
|
||||
title: 'Quiz 16/28',
|
||||
category: 'Hábitos orais',
|
||||
categoryIcon: Icons.child_care_rounded,
|
||||
fallbackIcon: Icons.child_care_rounded,
|
||||
fallbackColor: const Color(0xFF2F9E94),
|
||||
question: 'O seu filho/a usa ou usou chupeta com frequência?',
|
||||
answers: const [
|
||||
@@ -811,10 +763,7 @@ class Quiz17Screen extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
return QuizQuestionScreen(
|
||||
title: 'Quiz 17/28',
|
||||
category: 'Hábitos orais',
|
||||
categoryIcon: Icons.back_hand_rounded,
|
||||
fallbackIcon: Icons.back_hand_rounded,
|
||||
fallbackColor: const Color(0xFF8E7CC3),
|
||||
fallbackColor: const Color(0xFFFF55A7),
|
||||
question: 'O seu filho/a chucha ou já chuchou o dedo com frequência?',
|
||||
answers: const [
|
||||
QuizAnswer(
|
||||
@@ -866,10 +815,7 @@ class Quiz18Screen extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
return QuizQuestionScreen(
|
||||
title: 'Quiz 18/28',
|
||||
category: 'Avaliação postural',
|
||||
categoryIcon: Icons.accessibility_new_rounded,
|
||||
fallbackIcon: Icons.accessibility_new_rounded,
|
||||
fallbackColor: const Color(0xFF8E7CC3),
|
||||
fallbackColor: const Color(0xFFFF55A7),
|
||||
answerImageAspectRatio: 1.5,
|
||||
question:
|
||||
'Qual das seguintes imagens é mais parecida com a postura do seu filho/a?',
|
||||
@@ -912,9 +858,6 @@ class Quiz19Screen extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
return QuizQuestionScreen(
|
||||
title: 'Quiz 19/28',
|
||||
category: 'Avaliação facial',
|
||||
categoryIcon: Icons.face_rounded,
|
||||
fallbackIcon: Icons.face_rounded,
|
||||
fallbackColor: const Color(0xFFFF55A7),
|
||||
question:
|
||||
'Qual das seguintes imagens é mais parecida com o perfil do seu filho/a?',
|
||||
@@ -977,9 +920,6 @@ class Quiz20Screen extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
return QuizQuestionScreen(
|
||||
title: 'Quiz 20/28',
|
||||
category: 'Avaliação facial',
|
||||
categoryIcon: Icons.sentiment_neutral_rounded,
|
||||
fallbackIcon: Icons.sentiment_neutral_rounded,
|
||||
fallbackColor: const Color(0xFF2F9E94),
|
||||
question: 'Qual é a posição da boca do seu filho/a habitualmente?',
|
||||
answers: [
|
||||
@@ -1006,15 +946,7 @@ class Quiz20Screen extends StatelessWidget {
|
||||
],
|
||||
currentScore: currentScore,
|
||||
nextRoute: (context, nextScore) => quizPageRoute(
|
||||
builder: (_) => QuizVideoGuideScreen(
|
||||
youtubeId: 'msKYr7nPxcw',
|
||||
onAdvance: (ctx) => Navigator.of(ctx).pushReplacement(
|
||||
quizPageRoute(
|
||||
builder: (_) =>
|
||||
Quiz21Screen(currentScore: nextScore, scopeId: scopeId),
|
||||
),
|
||||
),
|
||||
),
|
||||
builder: (_) => Quiz21Screen(currentScore: nextScore, scopeId: scopeId),
|
||||
),
|
||||
answerType: QuizAnswerType.image,
|
||||
showBackButton: true,
|
||||
@@ -1033,9 +965,6 @@ class Quiz21Screen extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
return QuizQuestionScreen(
|
||||
title: 'Quiz 21/28',
|
||||
category: 'Avaliação facial',
|
||||
categoryIcon: Icons.visibility_rounded,
|
||||
fallbackIcon: Icons.visibility_rounded,
|
||||
fallbackColor: const Color(0xFFFF55A7),
|
||||
question:
|
||||
'Qual das imagens, na zona abaixo dos olhos, se assemelha mais ao seu filho/a?',
|
||||
@@ -1086,10 +1015,7 @@ class Quiz22Screen extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
return QuizQuestionScreen(
|
||||
title: 'Quiz 22/28',
|
||||
category: 'Avaliação facial',
|
||||
categoryIcon: Icons.face_rounded,
|
||||
fallbackIcon: Icons.face_rounded,
|
||||
fallbackColor: const Color(0xFF8E7CC3),
|
||||
fallbackColor: const Color(0xFFFF55A7),
|
||||
isSignQuestion: true,
|
||||
question:
|
||||
'Qual das imagens é mais parecida com o queixo do seu filho/a com a boca fechada?',
|
||||
@@ -1118,7 +1044,15 @@ class Quiz22Screen extends StatelessWidget {
|
||||
],
|
||||
currentScore: currentScore,
|
||||
nextRoute: (context, nextScore) => quizPageRoute(
|
||||
builder: (_) => Quiz23Screen(currentScore: nextScore, scopeId: scopeId),
|
||||
builder: (_) => QuizVideoGuideScreen(
|
||||
youtubeId: 'msKYr7nPxcw',
|
||||
onAdvance: (ctx) => Navigator.of(ctx).pushReplacement(
|
||||
quizPageRoute(
|
||||
builder: (_) =>
|
||||
Quiz23Screen(currentScore: nextScore, scopeId: scopeId),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
answerType: QuizAnswerType.image,
|
||||
showBackButton: true,
|
||||
@@ -1137,9 +1071,6 @@ class Quiz23Screen extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
return QuizQuestionScreen(
|
||||
title: 'Quiz 23/28',
|
||||
category: 'Avaliação facial',
|
||||
categoryIcon: Icons.sentiment_neutral_rounded,
|
||||
fallbackIcon: Icons.sentiment_neutral_rounded,
|
||||
fallbackColor: const Color(0xFF2F9E94),
|
||||
isSignQuestion: true,
|
||||
question:
|
||||
@@ -1191,9 +1122,6 @@ class Quiz24Screen extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
return QuizQuestionScreen(
|
||||
title: 'Quiz 24/28',
|
||||
category: 'Avaliação facial',
|
||||
categoryIcon: Icons.zoom_in_rounded,
|
||||
fallbackIcon: Icons.zoom_in_rounded,
|
||||
fallbackColor: const Color(0xFF2F9E94),
|
||||
isSignQuestion: true,
|
||||
question:
|
||||
@@ -1245,9 +1173,6 @@ class Quiz25Screen extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
return QuizQuestionScreen(
|
||||
title: 'Quiz 25/28',
|
||||
category: 'Avaliação facial',
|
||||
categoryIcon: Icons.record_voice_over_rounded,
|
||||
fallbackIcon: Icons.record_voice_over_rounded,
|
||||
fallbackColor: const Color(0xFFFF55A7),
|
||||
question:
|
||||
'Qual das seguintes imagens se assemelha ao freio labial do seu filho/a?',
|
||||
@@ -1290,10 +1215,7 @@ class Quiz26Screen extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
return QuizQuestionScreen(
|
||||
title: 'Quiz 26/28',
|
||||
category: 'Avaliação facial',
|
||||
categoryIcon: Icons.record_voice_over_rounded,
|
||||
fallbackIcon: Icons.record_voice_over_rounded,
|
||||
fallbackColor: const Color(0xFF8E7CC3),
|
||||
fallbackColor: const Color(0xFFFF55A7),
|
||||
question:
|
||||
'Qual das seguintes imagens se assemelha ao freio lingual do seu filho/a?',
|
||||
answers: const [
|
||||
@@ -1335,9 +1257,6 @@ class Quiz27Screen extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
return QuizQuestionScreen(
|
||||
title: 'Quiz 27/28',
|
||||
category: 'Avaliação facial',
|
||||
categoryIcon: Icons.sentiment_neutral_rounded,
|
||||
fallbackIcon: Icons.sentiment_neutral_rounded,
|
||||
fallbackColor: const Color(0xFF2F9E94),
|
||||
isSignQuestion: true,
|
||||
question:
|
||||
@@ -1381,9 +1300,6 @@ class Quiz28Screen extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
return QuizQuestionScreen(
|
||||
title: 'Quiz 28/28',
|
||||
category: 'Avaliação facial',
|
||||
categoryIcon: Icons.architecture_rounded,
|
||||
fallbackIcon: Icons.architecture_rounded,
|
||||
fallbackColor: const Color(0xFFFF55A7),
|
||||
isSignQuestion: true,
|
||||
question:
|
||||
|
||||
@@ -80,9 +80,6 @@ class QuizQuestionScreen extends StatefulWidget {
|
||||
this.suggestedVideoPath,
|
||||
this.suggestedYoutubeId,
|
||||
this.suggestedVideoTitle,
|
||||
this.category,
|
||||
this.categoryIcon,
|
||||
this.fallbackIcon,
|
||||
this.fallbackColor,
|
||||
this.answerImageAspectRatio,
|
||||
});
|
||||
@@ -114,14 +111,8 @@ class QuizQuestionScreen extends StatefulWidget {
|
||||
/// retrato, para a postura).
|
||||
final double? answerImageAspectRatio;
|
||||
|
||||
/// Rótulo pequeno do tema da pergunta (ex.: "Avaliação facial"), mostrado
|
||||
/// num badge acima da imagem/pergunta.
|
||||
final String? category;
|
||||
final IconData? categoryIcon;
|
||||
|
||||
/// Usados só quando [questionImagePaths] está vazio: em vez de o bloco de
|
||||
/// imagem colapsar, mostra-se um bloco colorido com este ícone.
|
||||
final IconData? fallbackIcon;
|
||||
/// Usado só quando [questionImagePaths] está vazio: em vez de o bloco de
|
||||
/// imagem colapsar, mostra-se um bloco colorido com o ícone da app.
|
||||
final Color? fallbackColor;
|
||||
|
||||
@override
|
||||
@@ -265,44 +256,6 @@ class _QuizQuestionScreenState extends State<QuizQuestionScreen> {
|
||||
],
|
||||
),
|
||||
),
|
||||
if ((widget.category ?? '').isNotEmpty)
|
||||
Padding(
|
||||
padding: const EdgeInsets.fromLTRB(16, 8, 16, 0),
|
||||
child: Align(
|
||||
alignment: Alignment.centerLeft,
|
||||
child: Container(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 12,
|
||||
vertical: 6,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white.withValues(alpha: 0.75),
|
||||
borderRadius: BorderRadius.circular(999),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
if (widget.categoryIcon != null) ...[
|
||||
Icon(
|
||||
widget.categoryIcon,
|
||||
size: 15,
|
||||
color: const Color(0xFF2F9E94),
|
||||
),
|
||||
const SizedBox(width: 6),
|
||||
],
|
||||
Text(
|
||||
widget.category!,
|
||||
style: const TextStyle(
|
||||
fontWeight: FontWeight.w800,
|
||||
fontSize: 12,
|
||||
color: Color(0xFF2F9E94),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: LayoutBuilder(
|
||||
builder: (context, constraints) {
|
||||
@@ -343,10 +296,6 @@ class _QuizQuestionScreenState extends State<QuizQuestionScreen> {
|
||||
.questionImagePaths,
|
||||
)
|
||||
: _FallbackIconBlock(
|
||||
icon:
|
||||
widget.fallbackIcon ??
|
||||
Icons
|
||||
.info_outline_rounded,
|
||||
color:
|
||||
widget.fallbackColor ??
|
||||
const Color(0xFF2F9E94),
|
||||
@@ -1148,22 +1097,22 @@ class _QuestionReferenceImages extends StatelessWidget {
|
||||
/// relevante ao tema, sem ocupar a largura toda (esse destaque é reservado
|
||||
/// para as perguntas que realmente têm imagem).
|
||||
class _FallbackIconBlock extends StatelessWidget {
|
||||
const _FallbackIconBlock({required this.icon, required this.color});
|
||||
const _FallbackIconBlock({required this.color});
|
||||
|
||||
final IconData icon;
|
||||
final Color color;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Center(
|
||||
child: Container(
|
||||
width: 52,
|
||||
height: 52,
|
||||
width: 72,
|
||||
height: 72,
|
||||
padding: const EdgeInsets.all(11),
|
||||
decoration: BoxDecoration(
|
||||
color: color,
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
),
|
||||
child: Icon(icon, size: 26, color: Colors.white),
|
||||
child: Image.asset('assets/quiz-icon.png', fit: BoxFit.contain),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../main.dart' show supabase;
|
||||
import '../widgets/app_gradients.dart';
|
||||
import '../widgets/entrance.dart';
|
||||
@@ -97,9 +98,33 @@ class _QuizResultScreenState extends State<QuizResultScreen> {
|
||||
}
|
||||
}
|
||||
|
||||
void _goToVideo() {
|
||||
Navigator.of(context).pushReplacement(
|
||||
MaterialPageRoute<void>(
|
||||
builder: (_) => QuizVideoGuideScreen(
|
||||
youtubeId: _resultGuideYoutubeId,
|
||||
heading: 'Visualize o seguinte vídeo',
|
||||
caption:
|
||||
'Assista para compreender a importância de um diagnóstico '
|
||||
'precoce e de realizar tratamento ortodôntico intercetivo, '
|
||||
'ou seja, uma intervenção realizada na infância, tipicamente '
|
||||
'durante a fase de dentição mista (presença tanto de dentes '
|
||||
'de leite como de permanentes).\n\nO seu propósito é '
|
||||
'identificar, prevenir ou reduzir a gravidade de maloclusões '
|
||||
'e problemas no desenvolvimento dos maxilares enquanto os '
|
||||
'ossos e dentes ainda estão em crescimento.',
|
||||
onAdvance: (context) =>
|
||||
Navigator.of(context).popUntil((r) => r.isFirst),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final recommend = _recommendsEvaluation(widget.finalScore);
|
||||
final signs = widget.finalScore.signs;
|
||||
final factors = widget.finalScore.factors;
|
||||
|
||||
return Scaffold(
|
||||
body: Stack(
|
||||
@@ -116,31 +141,16 @@ class _QuizResultScreenState extends State<QuizResultScreen> {
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
Align(
|
||||
alignment: Alignment.centerRight,
|
||||
child: TextButton(
|
||||
onPressed: () =>
|
||||
Navigator.of(context).popUntil((r) => r.isFirst),
|
||||
child: const Text(''),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: Center(
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
const SizedBox(height: 6),
|
||||
const SizedBox(height: 10),
|
||||
FadeSlideIn(
|
||||
child: const QuizGuideVideoCard(
|
||||
youtubeId: _resultGuideYoutubeId,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 22),
|
||||
FadeSlideIn(
|
||||
delay: const Duration(milliseconds: 60),
|
||||
child: const Text(
|
||||
'Resultado da avaliação',
|
||||
'O resultado avaliado é de:',
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontSize: 18,
|
||||
@@ -152,20 +162,20 @@ class _QuizResultScreenState extends State<QuizResultScreen> {
|
||||
),
|
||||
const SizedBox(height: 18),
|
||||
FadeSlideIn(
|
||||
delay: const Duration(milliseconds: 100),
|
||||
delay: const Duration(milliseconds: 60),
|
||||
child: Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
_ResultRing(
|
||||
value: widget.finalScore.signs,
|
||||
value: signs,
|
||||
max: kSignsMax,
|
||||
color: const Color(0xFF2F9E94),
|
||||
label:
|
||||
'Sinais de má\noclusão instalados',
|
||||
),
|
||||
_ResultRing(
|
||||
value: widget.finalScore.factors,
|
||||
value: factors,
|
||||
max: kFactorsMax,
|
||||
color: const Color(0xFFFF55A7),
|
||||
label: 'Fatores de\nrisco associados',
|
||||
@@ -173,35 +183,38 @@ class _QuizResultScreenState extends State<QuizResultScreen> {
|
||||
],
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
const SizedBox(height: 22),
|
||||
FadeSlideIn(
|
||||
delay: const Duration(milliseconds: 120),
|
||||
child: Text(
|
||||
'Conclusões:',
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: Colors.black.withValues(
|
||||
alpha: 0.75,
|
||||
),
|
||||
fontWeight: FontWeight.w900,
|
||||
),
|
||||
delay: const Duration(milliseconds: 100),
|
||||
child: _ResultSection(
|
||||
heading: 'Conclusões:',
|
||||
body:
|
||||
'Foram identificados $signs de $kSignsMax '
|
||||
'sinais de má oclusão já instalada e '
|
||||
'$factors de $kFactorsMax fatores de '
|
||||
'risco frequentemente associados a '
|
||||
'má oclusão.',
|
||||
bodyColor: const Color(0xFFFF55A7),
|
||||
bodyWeight: FontWeight.w800,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
const SizedBox(height: 16),
|
||||
FadeSlideIn(
|
||||
delay: const Duration(milliseconds: 160),
|
||||
child: Text(
|
||||
recommend
|
||||
? 'Recomenda-se o agendamento de uma consulta com um dentista/ortodontista.\nEsta avaliação é apenas educativa.'
|
||||
: 'Não foram encontrados sinais ou fatores de risco relevantes.\nEsta avaliação é apenas educativa.',
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: Colors.black.withValues(
|
||||
alpha: 0.70,
|
||||
),
|
||||
fontWeight: FontWeight.w600,
|
||||
height: 1.25,
|
||||
),
|
||||
delay: const Duration(milliseconds: 140),
|
||||
child: _ResultSection(
|
||||
heading: 'O que deve fazer agora',
|
||||
body: recommend
|
||||
? 'Com base neste resultado, recomendamos a marcação de uma consulta com Odontopediatra ou Ortodontista para uma avaliação presencial.'
|
||||
: 'Não foram encontrados sinais ou fatores de risco relevantes. Continue a acompanhar a saúde oral do seu filho/a com as consultas de rotina habituais.',
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
FadeSlideIn(
|
||||
delay: const Duration(milliseconds: 180),
|
||||
child: _ResultSection(
|
||||
heading: 'Importante saber',
|
||||
body:
|
||||
'Este resultado não substitui uma avaliação presencial, nem tem função de diagnóstico. O objetivo é ajudá-lo a estar mais atento aos sinais identificados e a não adiar uma consulta que pode fazer a diferença no desenvolvimento oral do seu filho/a.',
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -232,9 +245,7 @@ class _QuizResultScreenState extends State<QuizResultScreen> {
|
||||
onPressed: () async {
|
||||
await _saveResultFuture;
|
||||
if (!context.mounted) return;
|
||||
Navigator.of(
|
||||
context,
|
||||
).popUntil((r) => r.isFirst);
|
||||
_goToVideo();
|
||||
},
|
||||
child: const Text('Avançar'),
|
||||
),
|
||||
@@ -255,6 +266,52 @@ class _QuizResultScreenState extends State<QuizResultScreen> {
|
||||
}
|
||||
}
|
||||
|
||||
/// Bloco de texto "título + parágrafo" reutilizado nas secções de
|
||||
/// conclusão do resultado ("Conclusões:", "O que deve fazer agora",
|
||||
/// "Importante saber").
|
||||
class _ResultSection extends StatelessWidget {
|
||||
const _ResultSection({
|
||||
required this.heading,
|
||||
required this.body,
|
||||
this.bodyColor,
|
||||
this.bodyWeight = FontWeight.w600,
|
||||
});
|
||||
|
||||
final String heading;
|
||||
final String body;
|
||||
final Color? bodyColor;
|
||||
final FontWeight bodyWeight;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Column(
|
||||
children: [
|
||||
Text(
|
||||
heading,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: Colors.black.withValues(alpha: 0.75),
|
||||
fontWeight: FontWeight.w900,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
Text(
|
||||
body,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: bodyColor ?? Colors.black.withValues(alpha: 0.70),
|
||||
fontWeight: bodyWeight,
|
||||
height: 1.35,
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// Anel de progresso — usado para os dois indicadores do resultado
|
||||
/// (sinais / fatores de risco), com o valor no centro e a legenda por
|
||||
/// baixo.
|
||||
class _ResultRing extends StatelessWidget {
|
||||
const _ResultRing({
|
||||
required this.value,
|
||||
@@ -280,14 +337,14 @@ class _ResultRing extends StatelessWidget {
|
||||
tween: Tween<double>(begin: 0, end: progress),
|
||||
builder: (context, animatedProgress, _) {
|
||||
return SizedBox(
|
||||
width: 150,
|
||||
height: 150,
|
||||
width: 130,
|
||||
height: 130,
|
||||
child: Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
SizedBox(
|
||||
width: 132,
|
||||
height: 132,
|
||||
width: 130,
|
||||
height: 130,
|
||||
child: CircularProgressIndicator(
|
||||
value: animatedProgress,
|
||||
strokeWidth: 12,
|
||||
|
||||
@@ -78,6 +78,7 @@ class QuizVideoGuideScreen extends StatefulWidget {
|
||||
super.key,
|
||||
required this.youtubeId,
|
||||
required this.onAdvance,
|
||||
this.heading = 'Antes de continuar, veja o vídeo educativo...',
|
||||
this.caption =
|
||||
'Veja o vídeo para compreender melhor as próximas perguntas do questionário.',
|
||||
this.extraHeading,
|
||||
@@ -86,6 +87,7 @@ class QuizVideoGuideScreen extends StatefulWidget {
|
||||
|
||||
final String youtubeId;
|
||||
final void Function(BuildContext context) onAdvance;
|
||||
final String heading;
|
||||
final String caption;
|
||||
|
||||
/// Quando definidos, mostram um bloco de destaque extra por baixo da
|
||||
@@ -142,10 +144,10 @@ class _QuizVideoGuideScreenState extends State<QuizVideoGuideScreen> {
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 4),
|
||||
const FadeSlideIn(
|
||||
FadeSlideIn(
|
||||
child: Text(
|
||||
'Antes de continuar, veja o vídeo educativo...',
|
||||
style: TextStyle(
|
||||
widget.heading,
|
||||
style: const TextStyle(
|
||||
fontSize: 21,
|
||||
fontWeight: FontWeight.w900,
|
||||
color: Colors.black87,
|
||||
|
||||
Reference in New Issue
Block a user