908 lines
26 KiB
Dart
908 lines
26 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/25',
|
|
question: 'O rosto do seu filho/a se parece com o desta imagem?',
|
|
questionImagePaths: const ['assets/mockup_images/2.jpeg'],
|
|
suggestedYoutubeId: '', // TODO: colar o ID do YouTube do Episódio 1
|
|
suggestedVideoTitle: 'Ver vídeo: Episódio 1',
|
|
answers: const [
|
|
QuizAnswer(
|
|
title: 'Sim',
|
|
description: 'O rosto se assemelha à imagem',
|
|
weight: 2,
|
|
value: 'sim',
|
|
),
|
|
QuizAnswer(
|
|
title: 'Não',
|
|
description: 'O rosto não se assemelha à imagem',
|
|
weight: 1,
|
|
value: 'nao',
|
|
),
|
|
],
|
|
currentScore: currentScore,
|
|
nextRoute: (context, nextScore) => MaterialPageRoute<void>(
|
|
builder: (_) => Quiz2Screen(currentScore: nextScore, scopeId: scopeId),
|
|
),
|
|
answerType: QuizAnswerType.yesNo,
|
|
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/25',
|
|
question:
|
|
'A boca do seu filho/a fica habitualmente na posição desta imagem (entreaberta)?',
|
|
questionImagePaths: const ['assets/mockup_images/4.jpeg'],
|
|
suggestedYoutubeId: '', // TODO: colar o ID do YouTube do Episódio 2
|
|
suggestedVideoTitle: 'Ver vídeo: Episódio 2',
|
|
answers: const [
|
|
QuizAnswer(
|
|
title: 'Sim',
|
|
description: 'A boca fica habitualmente entreaberta',
|
|
weight: 2,
|
|
value: 'sim',
|
|
),
|
|
QuizAnswer(
|
|
title: 'Não',
|
|
description: 'A boca fica habitualmente fechada',
|
|
weight: 1,
|
|
value: 'nao',
|
|
),
|
|
],
|
|
currentScore: currentScore,
|
|
nextRoute: (context, nextScore) => MaterialPageRoute<void>(
|
|
builder: (_) => Quiz3Screen(currentScore: nextScore, scopeId: scopeId),
|
|
),
|
|
answerType: QuizAnswerType.yesNo,
|
|
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/25',
|
|
question: 'O seu filho/a tem olheiras semelhantes às desta imagem?',
|
|
questionImagePaths: const ['assets/mockup_images/8.jpeg'],
|
|
suggestedYoutubeId: '', // TODO: colar o ID do YouTube do Episódio 3
|
|
suggestedVideoTitle: 'Ver vídeo: Episódio 3',
|
|
answers: const [
|
|
QuizAnswer(
|
|
title: 'Sim',
|
|
description: 'Tem olheiras semelhantes à imagem',
|
|
weight: 2,
|
|
value: 'sim',
|
|
),
|
|
QuizAnswer(
|
|
title: 'Não',
|
|
description: 'Não tem olheiras semelhantes à imagem',
|
|
weight: 1,
|
|
value: 'nao',
|
|
),
|
|
],
|
|
currentScore: currentScore,
|
|
nextRoute: (context, nextScore) => MaterialPageRoute<void>(
|
|
builder: (_) => Quiz4Screen(currentScore: nextScore, scopeId: scopeId),
|
|
),
|
|
answerType: QuizAnswerType.yesNo,
|
|
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/25',
|
|
question:
|
|
'Com a boca fechada, o queixo do seu filho/a se parece com o desta imagem?',
|
|
questionImagePaths: const ['assets/mockup_images/6.jpeg'],
|
|
suggestedYoutubeId: '', // TODO: colar o ID do YouTube do Episódio 4
|
|
suggestedVideoTitle: 'Ver vídeo: Episódio 4',
|
|
answers: const [
|
|
QuizAnswer(
|
|
title: 'Sim',
|
|
description: 'O queixo se assemelha à imagem',
|
|
weight: 2,
|
|
value: 'sim',
|
|
),
|
|
QuizAnswer(
|
|
title: 'Não',
|
|
description: 'O queixo não se assemelha à imagem',
|
|
weight: 1,
|
|
value: 'nao',
|
|
),
|
|
],
|
|
currentScore: currentScore,
|
|
nextRoute: (context, nextScore) => MaterialPageRoute<void>(
|
|
builder: (_) => Quiz5Screen(currentScore: nextScore, scopeId: scopeId),
|
|
),
|
|
answerType: QuizAnswerType.yesNo,
|
|
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/25',
|
|
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/25',
|
|
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/25',
|
|
question: 'A boca do seu filho/a se parece com a desta imagem?',
|
|
questionImagePaths: const ['assets/mockup_images/14.jpeg'],
|
|
suggestedYoutubeId: '', // TODO: colar o ID do YouTube do Episódio 5
|
|
suggestedVideoTitle: 'Ver vídeo: Episódio 5',
|
|
answers: const [
|
|
QuizAnswer(
|
|
title: 'Sim',
|
|
description: 'A boca se assemelha à imagem',
|
|
weight: 2,
|
|
value: 'sim',
|
|
),
|
|
QuizAnswer(
|
|
title: 'Não',
|
|
description: 'A boca não se assemelha à imagem',
|
|
weight: 1,
|
|
value: 'nao',
|
|
),
|
|
],
|
|
currentScore: currentScore,
|
|
nextRoute: (context, nextScore) => MaterialPageRoute<void>(
|
|
builder: (_) => Quiz8Screen(currentScore: nextScore, scopeId: scopeId),
|
|
),
|
|
answerType: QuizAnswerType.yesNo,
|
|
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/25',
|
|
question:
|
|
'O frénulo (freio) da língua do seu filho/a se parece com o desta imagem?',
|
|
questionImagePaths: const ['assets/mockup_images/17.png'],
|
|
suggestedYoutubeId: '', // TODO: colar o ID do YouTube do Episódio 6
|
|
suggestedVideoTitle: 'Ver vídeo: Episódio 6',
|
|
answers: const [
|
|
QuizAnswer(
|
|
title: 'Sim',
|
|
description: 'O frénulo se assemelha à imagem',
|
|
weight: 2,
|
|
value: 'sim',
|
|
),
|
|
QuizAnswer(
|
|
title: 'Não',
|
|
description: 'O frénulo não se assemelha à imagem',
|
|
weight: 1,
|
|
value: 'nao',
|
|
),
|
|
],
|
|
currentScore: currentScore,
|
|
nextRoute: (context, nextScore) => MaterialPageRoute<void>(
|
|
builder: (_) => Quiz9Screen(currentScore: nextScore, scopeId: scopeId),
|
|
),
|
|
answerType: QuizAnswerType.yesNo,
|
|
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/25',
|
|
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/25',
|
|
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/25',
|
|
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/25',
|
|
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/25',
|
|
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/25',
|
|
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/25',
|
|
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/25',
|
|
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/25',
|
|
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/25',
|
|
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/25',
|
|
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/25',
|
|
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/25',
|
|
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/25',
|
|
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/25',
|
|
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/25',
|
|
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/25',
|
|
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: (_) => QuizResultScreen(
|
|
finalScore: nextScore,
|
|
maxScore: 130,
|
|
scopeId: scopeId,
|
|
),
|
|
),
|
|
answerType: QuizAnswerType.yesNo,
|
|
isFinal: true,
|
|
showBackButton: true,
|
|
);
|
|
}
|
|
}
|