Files
CheckTheethKids/lib/quiz/quiz1.dart
2026-05-22 11:10:49 +01:00

1017 lines
29 KiB
Dart

import 'package:flutter/material.dart';
import 'quiz_question_screen.dart';
import 'quiz_result.dart';
// Quiz 1: Face (Image-based)
class Quiz1Screen extends StatelessWidget {
const Quiz1Screen({super.key, this.currentScore = 0, this.scopeId});
final int currentScore;
final String? scopeId;
@override
Widget build(BuildContext context) {
return QuizQuestionScreen(
title: 'Quiz 1/26',
question:
'Qual das seguintes imagens se assemelha à face do seu filho/a?',
answers: const [
QuizAnswer(
title: 'Opção A',
description:
'Selecione se a imagem se assemelha à face do seu filho/a',
weight: 2,
imagePath: 'assets/images/face_a.png',
),
QuizAnswer(
title: 'Opção B',
description:
'Selecione se a imagem se assemelha à face do seu filho/a',
weight: 2,
imagePath: 'assets/images/face_b.png',
),
QuizAnswer(
title: 'Opção C',
description:
'Selecione se a imagem se assemelha à face do seu filho/a',
weight: 2,
imagePath: 'assets/images/face_c.png',
),
QuizAnswer(
title: 'Opção D',
description:
'Selecione se a imagem se assemelha à face do seu filho/a',
weight: 2,
imagePath: 'assets/images/face_d.png',
),
],
currentScore: currentScore,
nextRoute: (context, nextScore) => MaterialPageRoute<void>(
builder: (_) => Quiz2Screen(currentScore: nextScore, scopeId: scopeId),
),
answerType: QuizAnswerType.image,
showBackButton: false,
);
}
}
// Quiz 2: Boca (Image-based)
class Quiz2Screen extends StatelessWidget {
const Quiz2Screen({super.key, required this.currentScore, this.scopeId});
final int currentScore;
final String? scopeId;
@override
Widget build(BuildContext context) {
return QuizQuestionScreen(
title: 'Quiz 2/26',
question:
'Qual das seguintes imagens se assemelha à boca do seu filho/a?',
answers: const [
QuizAnswer(
title: 'Opção A',
description:
'Selecione se a imagem se assemelha à boca do seu filho/a',
weight: 2,
imagePath: 'assets/images/mouth_a.png',
),
QuizAnswer(
title: 'Opção B',
description:
'Selecione se a imagem se assemelha à boca do seu filho/a',
weight: 2,
imagePath: 'assets/images/mouth_b.png',
),
QuizAnswer(
title: 'Opção C',
description:
'Selecione se a imagem se assemelha à boca do seu filho/a',
weight: 2,
imagePath: 'assets/images/mouth_c.png',
),
QuizAnswer(
title: 'Opção D',
description:
'Selecione se a imagem se assemelha à boca do seu filho/a',
weight: 2,
imagePath: 'assets/images/mouth_d.png',
),
],
currentScore: currentScore,
nextRoute: (context, nextScore) => MaterialPageRoute<void>(
builder: (_) => Quiz3Screen(currentScore: nextScore, scopeId: scopeId),
),
answerType: QuizAnswerType.image,
showBackButton: true,
);
}
}
// Quiz 3: Olheiras (Image-based)
class Quiz3Screen extends StatelessWidget {
const Quiz3Screen({super.key, required this.currentScore, this.scopeId});
final int currentScore;
final String? scopeId;
@override
Widget build(BuildContext context) {
return QuizQuestionScreen(
title: 'Quiz 3/26',
question:
'Qual das seguintes imagens se assemelha às olheiras do seu filho/a?',
answers: const [
QuizAnswer(
title: 'Opção A',
description:
'Selecione se a imagem se assemelha às olheiras do seu filho/a',
weight: 2,
imagePath: 'assets/images/dark_circles_a.png',
),
QuizAnswer(
title: 'Opção B',
description:
'Selecione se a imagem se assemelha às olheiras do seu filho/a',
weight: 2,
imagePath: 'assets/images/dark_circles_b.png',
),
QuizAnswer(
title: 'Opção C',
description:
'Selecione se a imagem se assemelha às olheiras do seu filho/a',
weight: 2,
imagePath: 'assets/images/dark_circles_c.png',
),
QuizAnswer(
title: 'Opção D',
description:
'Selecione se a imagem se assemelha às olheiras do seu filho/a',
weight: 2,
imagePath: 'assets/images/dark_circles_d.png',
),
],
currentScore: currentScore,
nextRoute: (context, nextScore) => MaterialPageRoute<void>(
builder: (_) => Quiz4Screen(currentScore: nextScore, scopeId: scopeId),
),
answerType: QuizAnswerType.image,
showBackButton: true,
);
}
}
// Quiz 4: Queixo (Image-based)
class Quiz4Screen extends StatelessWidget {
const Quiz4Screen({super.key, required this.currentScore, this.scopeId});
final int currentScore;
final String? scopeId;
@override
Widget build(BuildContext context) {
return QuizQuestionScreen(
title: 'Quiz 4/26',
question:
'Qual das seguintes imagens se assemelha ao queixo do seu filho/a com a boca fechada?',
answers: const [
QuizAnswer(
title: 'Opção A',
description:
'Selecione se a imagem se assemelha ao queixo do seu filho/a',
weight: 2,
imagePath: 'assets/images/chin_a.png',
),
QuizAnswer(
title: 'Opção B',
description:
'Selecione se a imagem se assemelha ao queixo do seu filho/a',
weight: 2,
imagePath: 'assets/images/chin_b.png',
),
QuizAnswer(
title: 'Opção C',
description:
'Selecione se a imagem se assemelha ao queixo do seu filho/a',
weight: 2,
imagePath: 'assets/images/chin_c.png',
),
QuizAnswer(
title: 'Opção D',
description:
'Selecione se a imagem se assemelha ao queixo do seu filho/a',
weight: 2,
imagePath: 'assets/images/chin_d.png',
),
],
currentScore: currentScore,
nextRoute: (context, nextScore) => MaterialPageRoute<void>(
builder: (_) => Quiz5Screen(currentScore: nextScore, scopeId: scopeId),
),
answerType: QuizAnswerType.image,
showBackButton: true,
);
}
}
// Quiz 5: Dentes em cima (Number input)
class Quiz5Screen extends StatelessWidget {
const Quiz5Screen({super.key, required this.currentScore, this.scopeId});
final int currentScore;
final String? scopeId;
@override
Widget build(BuildContext context) {
return QuizQuestionScreen(
title: 'Quiz 5/26',
question: 'Quantos dentes tem o seu filho/a em cima na boca?',
answers: const [],
currentScore: currentScore,
nextRoute: (context, nextScore) => MaterialPageRoute<void>(
builder: (_) => Quiz6Screen(currentScore: nextScore, scopeId: scopeId),
),
answerType: QuizAnswerType.number,
showBackButton: true,
);
}
}
// Quiz 6: Dentes em baixo (Number input)
class Quiz6Screen extends StatelessWidget {
const Quiz6Screen({super.key, required this.currentScore, this.scopeId});
final int currentScore;
final String? scopeId;
@override
Widget build(BuildContext context) {
return QuizQuestionScreen(
title: 'Quiz 6/26',
question: 'Quantos dentes tem o seu filho/a em baixo na boca?',
answers: const [],
currentScore: currentScore,
nextRoute: (context, nextScore) => MaterialPageRoute<void>(
builder: (_) => Quiz7Screen(currentScore: nextScore, scopeId: scopeId),
),
answerType: QuizAnswerType.number,
showBackButton: true,
);
}
}
// Quiz 7: Boca (Image-based)
class Quiz7Screen extends StatelessWidget {
const Quiz7Screen({super.key, required this.currentScore, this.scopeId});
final int currentScore;
final String? scopeId;
@override
Widget build(BuildContext context) {
return QuizQuestionScreen(
title: 'Quiz 7/26',
question:
'Qual das seguintes imagens se assemelha à boca do seu filho/a?',
answers: const [
QuizAnswer(
title: 'Opção A',
description:
'Selecione se a imagem se assemelha à boca do seu filho/a',
weight: 2,
imagePath: 'assets/images/mouth2_a.png',
),
QuizAnswer(
title: 'Opção B',
description:
'Selecione se a imagem se assemelha à boca do seu filho/a',
weight: 2,
imagePath: 'assets/images/mouth2_b.png',
),
QuizAnswer(
title: 'Opção C',
description:
'Selecione se a imagem se assemelha à boca do seu filho/a',
weight: 2,
imagePath: 'assets/images/mouth2_c.png',
),
QuizAnswer(
title: 'Opção D',
description:
'Selecione se a imagem se assemelha à boca do seu filho/a',
weight: 2,
imagePath: 'assets/images/mouth2_d.png',
),
],
currentScore: currentScore,
nextRoute: (context, nextScore) => MaterialPageRoute<void>(
builder: (_) => Quiz8Screen(currentScore: nextScore, scopeId: scopeId),
),
answerType: QuizAnswerType.image,
showBackButton: true,
);
}
}
// Quiz 8: Freio (Image-based)
class Quiz8Screen extends StatelessWidget {
const Quiz8Screen({super.key, required this.currentScore, this.scopeId});
final int currentScore;
final String? scopeId;
@override
Widget build(BuildContext context) {
return QuizQuestionScreen(
title: 'Quiz 8/26',
question:
'Qual das seguintes imagens se assemelha ao freio do seu filho/a?',
answers: const [
QuizAnswer(
title: 'Opção A',
description:
'Selecione se a imagem se assemelha ao freio do seu filho/a',
weight: 2,
imagePath: 'assets/images/frenulum_a.png',
),
QuizAnswer(
title: 'Opção B',
description:
'Selecione se a imagem se assemelha ao freio do seu filho/a',
weight: 2,
imagePath: 'assets/images/frenulum_b.png',
),
QuizAnswer(
title: 'Opção C',
description:
'Selecione se a imagem se assemelha ao freio do seu filho/a',
weight: 2,
imagePath: 'assets/images/frenulum_c.png',
),
QuizAnswer(
title: 'Opção D',
description:
'Selecione se a imagem se assemelha ao freio do seu filho/a',
weight: 2,
imagePath: 'assets/images/frenulum_d.png',
),
],
currentScore: currentScore,
nextRoute: (context, nextScore) => MaterialPageRoute<void>(
builder: (_) => Quiz9Screen(currentScore: nextScore, scopeId: scopeId),
),
answerType: QuizAnswerType.image,
showBackButton: true,
);
}
}
// Quiz 9: Problemas respiratórios (Yes/No)
class Quiz9Screen extends StatelessWidget {
const Quiz9Screen({super.key, required this.currentScore, this.scopeId});
final int currentScore;
final String? scopeId;
@override
Widget build(BuildContext context) {
return QuizQuestionScreen(
title: 'Quiz 9/26',
question: 'O seu filho/a tem problemas respiratórios diagnosticados?',
answers: const [
QuizAnswer(
title: 'Sim',
description: 'Problemas respiratórios diagnosticados',
weight: 2,
value: 'sim',
),
QuizAnswer(
title: 'Não',
description: 'Sem problemas respiratórios diagnosticados',
weight: 1,
value: 'nao',
),
],
currentScore: currentScore,
nextRoute: (context, nextScore) => MaterialPageRoute<void>(
builder: (_) => Quiz10Screen(currentScore: nextScore, scopeId: scopeId),
),
answerType: QuizAnswerType.yesNo,
showBackButton: true,
);
}
}
// Quiz 10: Respira pela boca (Yes/No)
class Quiz10Screen extends StatelessWidget {
const Quiz10Screen({super.key, required this.currentScore, this.scopeId});
final int currentScore;
final String? scopeId;
@override
Widget build(BuildContext context) {
return QuizQuestionScreen(
title: 'Quiz 10/26',
question: 'O seu filho/a respira habitualmente pela boca?',
answers: const [
QuizAnswer(
title: 'Sim',
description: 'Respira habitualmente pela boca',
weight: 2,
value: 'sim',
),
QuizAnswer(
title: 'Não',
description: 'Não respira habitualmente pela boca',
weight: 1,
value: 'nao',
),
],
currentScore: currentScore,
nextRoute: (context, nextScore) => MaterialPageRoute<void>(
builder: (_) => Quiz11Screen(currentScore: nextScore, scopeId: scopeId),
),
answerType: QuizAnswerType.yesNo,
showBackButton: true,
);
}
}
// Quiz 11: Ressonar (Yes/No)
class Quiz11Screen extends StatelessWidget {
const Quiz11Screen({super.key, required this.currentScore, this.scopeId});
final int currentScore;
final String? scopeId;
@override
Widget build(BuildContext context) {
return QuizQuestionScreen(
title: 'Quiz 11/26',
question: 'O seu filho/a ressona habitualmente durante a noite?',
answers: const [
QuizAnswer(
title: 'Sim',
description: 'Ressonar habitualmente durante a noite',
weight: 2,
value: 'sim',
),
QuizAnswer(
title: 'Não',
description: 'Não ressona habitualmente',
weight: 1,
value: 'nao',
),
],
currentScore: currentScore,
nextRoute: (context, nextScore) => MaterialPageRoute<void>(
builder: (_) => Quiz12Screen(currentScore: nextScore, scopeId: scopeId),
),
answerType: QuizAnswerType.yesNo,
showBackButton: true,
);
}
}
// Quiz 12: Nariz tapado (Yes/No)
class Quiz12Screen extends StatelessWidget {
const Quiz12Screen({super.key, required this.currentScore, this.scopeId});
final int currentScore;
final String? scopeId;
@override
Widget build(BuildContext context) {
return QuizQuestionScreen(
title: 'Quiz 12/26',
question: 'O seu filho/a sente habitualmente o nariz "tapado"?',
answers: const [
QuizAnswer(
title: 'Sim',
description: 'Sente habitualmente o nariz tapado',
weight: 2,
value: 'sim',
),
QuizAnswer(
title: 'Não',
description: 'Não sente habitualmente o nariz tapado',
weight: 1,
value: 'nao',
),
],
currentScore: currentScore,
nextRoute: (context, nextScore) => MaterialPageRoute<void>(
builder: (_) => Quiz13Screen(currentScore: nextScore, scopeId: scopeId),
),
answerType: QuizAnswerType.yesNo,
showBackButton: true,
);
}
}
// Quiz 13: Interrupções respiração (Yes/No)
class Quiz13Screen extends StatelessWidget {
const Quiz13Screen({super.key, required this.currentScore, this.scopeId});
final int currentScore;
final String? scopeId;
@override
Widget build(BuildContext context) {
return QuizQuestionScreen(
title: 'Quiz 13/26',
question:
'Durante o sono, o seu filho/a tem habitualmente interrupções da respiração?',
answers: const [
QuizAnswer(
title: 'Sim',
description:
'Tem habitualmente interrupções da respiração durante o sono',
weight: 2,
value: 'sim',
),
QuizAnswer(
title: 'Não',
description: 'Não tem interrupções da respiração durante o sono',
weight: 1,
value: 'nao',
),
],
currentScore: currentScore,
nextRoute: (context, nextScore) => MaterialPageRoute<void>(
builder: (_) => Quiz14Screen(currentScore: nextScore, scopeId: scopeId),
),
answerType: QuizAnswerType.yesNo,
showBackButton: true,
);
}
}
// Quiz 14: Range os dentes (Yes/No)
class Quiz14Screen extends StatelessWidget {
const Quiz14Screen({super.key, required this.currentScore, this.scopeId});
final int currentScore;
final String? scopeId;
@override
Widget build(BuildContext context) {
return QuizQuestionScreen(
title: 'Quiz 14/26',
question: 'O seu filho/a range os dentes com frequência?',
answers: const [
QuizAnswer(
title: 'Sim',
description: 'Range os dentes com frequência',
weight: 2,
value: 'sim',
),
QuizAnswer(
title: 'Não',
description: 'Não range os dentes com frequência',
weight: 1,
value: 'nao',
),
],
currentScore: currentScore,
nextRoute: (context, nextScore) => MaterialPageRoute<void>(
builder: (_) => Quiz15Screen(currentScore: nextScore, scopeId: scopeId),
),
answerType: QuizAnswerType.yesNo,
showBackButton: true,
);
}
}
// Quiz 15: Alergias sazonais (Yes/No)
class Quiz15Screen extends StatelessWidget {
const Quiz15Screen({super.key, required this.currentScore, this.scopeId});
final int currentScore;
final String? scopeId;
@override
Widget build(BuildContext context) {
return QuizQuestionScreen(
title: 'Quiz 15/26',
question: 'O seu filho/a habitualmente tem alergias sazonais?',
answers: const [
QuizAnswer(
title: 'Sim',
description: 'Habitualmente tem alergias sazonais',
weight: 2,
value: 'sim',
),
QuizAnswer(
title: 'Não',
description: 'Não tem alergias sazonais',
weight: 1,
value: 'nao',
),
],
currentScore: currentScore,
nextRoute: (context, nextScore) => MaterialPageRoute<void>(
builder: (_) => Quiz16Screen(currentScore: nextScore, scopeId: scopeId),
),
answerType: QuizAnswerType.yesNo,
showBackButton: true,
);
}
}
// Quiz 16: Saliva seca (Yes/No)
class Quiz16Screen extends StatelessWidget {
const Quiz16Screen({super.key, required this.currentScore, this.scopeId});
final int currentScore;
final String? scopeId;
@override
Widget build(BuildContext context) {
return QuizQuestionScreen(
title: 'Quiz 16/26',
question: 'O seu filho/a acorda com saliva seca na cara ou na almofada?',
answers: const [
QuizAnswer(
title: 'Sim',
description: 'Acorda com saliva seca na cara ou na almofada',
weight: 2,
value: 'sim',
),
QuizAnswer(
title: 'Não',
description: 'Não acorda com saliva seca',
weight: 1,
value: 'nao',
),
],
currentScore: currentScore,
nextRoute: (context, nextScore) => MaterialPageRoute<void>(
builder: (_) => Quiz17Screen(currentScore: nextScore, scopeId: scopeId),
),
answerType: QuizAnswerType.yesNo,
showBackButton: true,
);
}
}
// Quiz 17: Otites (Yes/No)
class Quiz17Screen extends StatelessWidget {
const Quiz17Screen({super.key, required this.currentScore, this.scopeId});
final int currentScore;
final String? scopeId;
@override
Widget build(BuildContext context) {
return QuizQuestionScreen(
title: 'Quiz 17/26',
question: 'O seu filho/a teve ou costuma ter com frequência otites?',
answers: const [
QuizAnswer(
title: 'Sim',
description: 'Teve ou costuma ter com frequência otites',
weight: 2,
value: 'sim',
),
QuizAnswer(
title: 'Não',
description: 'Não teve ou não costuma ter otites',
weight: 1,
value: 'nao',
),
],
currentScore: currentScore,
nextRoute: (context, nextScore) => MaterialPageRoute<void>(
builder: (_) => Quiz18Screen(currentScore: nextScore, scopeId: scopeId),
),
answerType: QuizAnswerType.yesNo,
showBackButton: true,
);
}
}
// Quiz 18: Amigdalites (Yes/No)
class Quiz18Screen extends StatelessWidget {
const Quiz18Screen({super.key, required this.currentScore, this.scopeId});
final int currentScore;
final String? scopeId;
@override
Widget build(BuildContext context) {
return QuizQuestionScreen(
title: 'Quiz 18/26',
question: 'O seu filho/a teve ou costuma ter com frequência amigdalites?',
answers: const [
QuizAnswer(
title: 'Sim',
description: 'Teve ou costuma ter com frequência amigdalites',
weight: 2,
value: 'sim',
),
QuizAnswer(
title: 'Não',
description: 'Não teve ou não costuma ter amigdalites',
weight: 1,
value: 'nao',
),
],
currentScore: currentScore,
nextRoute: (context, nextScore) => MaterialPageRoute<void>(
builder: (_) => Quiz19Screen(currentScore: nextScore, scopeId: scopeId),
),
answerType: QuizAnswerType.yesNo,
showBackButton: true,
);
}
}
// Quiz 19: Bronquiolites (Yes/No)
class Quiz19Screen extends StatelessWidget {
const Quiz19Screen({super.key, required this.currentScore, this.scopeId});
final int currentScore;
final String? scopeId;
@override
Widget build(BuildContext context) {
return QuizQuestionScreen(
title: 'Quiz 19/26',
question:
'O seu filho/a teve ou costuma ter com frequência bronquiolites?',
answers: const [
QuizAnswer(
title: 'Sim',
description: 'Teve ou costuma ter com frequência bronquiolites',
weight: 2,
value: 'sim',
),
QuizAnswer(
title: 'Não',
description: 'Não teve ou não costuma ter bronquiolites',
weight: 1,
value: 'nao',
),
],
currentScore: currentScore,
nextRoute: (context, nextScore) => MaterialPageRoute<void>(
builder: (_) => Quiz20Screen(currentScore: nextScore, scopeId: scopeId),
),
answerType: QuizAnswerType.yesNo,
showBackButton: true,
);
}
}
// Quiz 20: Dificuldades a mastigar (Yes/No)
class Quiz20Screen extends StatelessWidget {
const Quiz20Screen({super.key, required this.currentScore, this.scopeId});
final int currentScore;
final String? scopeId;
@override
Widget build(BuildContext context) {
return QuizQuestionScreen(
title: 'Quiz 20/26',
question: 'O seu filho/a apresenta dificuldades a mastigar?',
answers: const [
QuizAnswer(
title: 'Sim',
description: 'Apresenta dificuldades a mastigar',
weight: 2,
value: 'sim',
),
QuizAnswer(
title: 'Não',
description: 'Não apresenta dificuldades a mastigar',
weight: 1,
value: 'nao',
),
],
currentScore: currentScore,
nextRoute: (context, nextScore) => MaterialPageRoute<void>(
builder: (_) => Quiz21Screen(currentScore: nextScore, scopeId: scopeId),
),
answerType: QuizAnswerType.yesNo,
showBackButton: true,
);
}
}
// Quiz 21: Lento a comer (Yes/No)
class Quiz21Screen extends StatelessWidget {
const Quiz21Screen({super.key, required this.currentScore, this.scopeId});
final int currentScore;
final String? scopeId;
@override
Widget build(BuildContext context) {
return QuizQuestionScreen(
title: 'Quiz 21/26',
question: 'O seu filho/a habitualmente é lento a comer?',
answers: const [
QuizAnswer(
title: 'Sim',
description: 'Habitualmente é lento a comer',
weight: 2,
value: 'sim',
),
QuizAnswer(
title: 'Não',
description: 'Não é lento a comer',
weight: 1,
value: 'nao',
),
],
currentScore: currentScore,
nextRoute: (context, nextScore) => MaterialPageRoute<void>(
builder: (_) => Quiz22Screen(currentScore: nextScore, scopeId: scopeId),
),
answerType: QuizAnswerType.yesNo,
showBackButton: true,
);
}
}
// Quiz 22: Prefere alimentos moles (Yes/No)
class Quiz22Screen extends StatelessWidget {
const Quiz22Screen({super.key, required this.currentScore, this.scopeId});
final int currentScore;
final String? scopeId;
@override
Widget build(BuildContext context) {
return QuizQuestionScreen(
title: 'Quiz 22/26',
question: 'O seu filho/a habitualmente prefere comer alimentos moles?',
answers: const [
QuizAnswer(
title: 'Sim',
description: 'Habitualmente prefere comer alimentos moles',
weight: 2,
value: 'sim',
),
QuizAnswer(
title: 'Não',
description: 'Não prefere alimentos moles',
weight: 1,
value: 'nao',
),
],
currentScore: currentScore,
nextRoute: (context, nextScore) => MaterialPageRoute<void>(
builder: (_) => Quiz23Screen(currentScore: nextScore, scopeId: scopeId),
),
answerType: QuizAnswerType.yesNo,
showBackButton: true,
);
}
}
// Quiz 23: Alimentado por biberão (Yes/No)
class Quiz23Screen extends StatelessWidget {
const Quiz23Screen({super.key, required this.currentScore, this.scopeId});
final int currentScore;
final String? scopeId;
@override
Widget build(BuildContext context) {
return QuizQuestionScreen(
title: 'Quiz 23/26',
question: 'Em bebé apenas foi alimentado por biberão?',
answers: const [
QuizAnswer(
title: 'Sim',
description: 'Em bebé apenas foi alimentado por biberão',
weight: 2,
value: 'sim',
),
QuizAnswer(
title: 'Não',
description: 'Não foi apenas alimentado por biberão',
weight: 1,
value: 'nao',
),
],
currentScore: currentScore,
nextRoute: (context, nextScore) => MaterialPageRoute<void>(
builder: (_) => Quiz24Screen(currentScore: nextScore, scopeId: scopeId),
),
answerType: QuizAnswerType.yesNo,
showBackButton: true,
);
}
}
// Quiz 24: Chupeta (Yes/No)
class Quiz24Screen extends StatelessWidget {
const Quiz24Screen({super.key, required this.currentScore, this.scopeId});
final int currentScore;
final String? scopeId;
@override
Widget build(BuildContext context) {
return QuizQuestionScreen(
title: 'Quiz 24/26',
question: 'O seu filho/a usa ou usou chupeta com frequência?',
answers: const [
QuizAnswer(
title: 'Sim',
description: 'Usa ou usou chupeta com frequência',
weight: 2,
value: 'sim',
),
QuizAnswer(
title: 'Não',
description: 'Não usa ou não usou chupeta com frequência',
weight: 1,
value: 'nao',
),
],
currentScore: currentScore,
nextRoute: (context, nextScore) => MaterialPageRoute<void>(
builder: (_) => Quiz25Screen(currentScore: nextScore, scopeId: scopeId),
),
answerType: QuizAnswerType.yesNo,
showBackButton: true,
);
}
}
// Quiz 25: Chucha o dedo (Yes/No)
class Quiz25Screen extends StatelessWidget {
const Quiz25Screen({super.key, required this.currentScore, this.scopeId});
final int currentScore;
final String? scopeId;
@override
Widget build(BuildContext context) {
return QuizQuestionScreen(
title: 'Quiz 25/26',
question: 'O seu filho/a chucha ou já chuchou o dedo com frequência?',
answers: const [
QuizAnswer(
title: 'Sim',
description: 'Chucha ou já chuchou o dedo com frequência',
weight: 2,
value: 'sim',
),
QuizAnswer(
title: 'Não',
description: 'Não chucha ou não chuchou o dedo com frequência',
weight: 1,
value: 'nao',
),
],
currentScore: currentScore,
nextRoute: (context, nextScore) => MaterialPageRoute<void>(
builder: (_) => Quiz26Screen(currentScore: nextScore, scopeId: scopeId),
),
answerType: QuizAnswerType.yesNo,
showBackButton: true,
);
}
}
// Quiz 26: Final
class Quiz26Screen extends StatelessWidget {
const Quiz26Screen({super.key, required this.currentScore, this.scopeId});
final int currentScore;
final String? scopeId;
@override
Widget build(BuildContext context) {
return QuizQuestionScreen(
title: 'Quiz 26/26',
question: 'Obrigado por completar o questionário!',
answers: const [
QuizAnswer(
title: 'Concluir',
description: 'Clique para ver os resultados',
weight: 0,
),
],
currentScore: currentScore,
nextRoute: (context, nextScore) => MaterialPageRoute<void>(
builder: (_) => QuizResultScreen(
finalScore: nextScore,
maxScore: 130,
scopeId: scopeId,
),
),
isFinal: true,
showBackButton: true,
);
}
}