Skip to content

Commit

Permalink
fix: passing taskId to fitbit_question_widget.dart
Browse files Browse the repository at this point in the history
  • Loading branch information
ibrahimozkn committed Jan 4, 2025
1 parent e297a36 commit 7908a89
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ class _QuestionnaireTaskWidgetState extends State<QuestionnaireTaskWidget> {
key: formKey,
child: QuestionnaireWidget(
widget.task.questions.questions,
taskId: widget.task.id,
header: widget.task.header,
footer: widget.task.footer,
onChange: _responseValidator,
Expand Down
6 changes: 3 additions & 3 deletions app/lib/widgets/questionnaire/question_container.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ class QuestionContainer extends StatefulWidget {
final Function(Answer, int) onDone;
final Question question;
final int index;
final String taskId;
final String? taskId;

const QuestionContainer({
required this.onDone,
required this.question,
required this.index,
required this.taskId,
this.taskId,
super.key,
});

Expand Down Expand Up @@ -87,7 +87,7 @@ class _QuestionContainerState extends State<QuestionContainer>
return FitbitQuestionWidget(
question: fitbitQuestion,
onDone: _onDone,
taskId: widget.taskId,
taskId: widget.taskId!,
);
default:
throw ArgumentError(
Expand Down
6 changes: 3 additions & 3 deletions app/lib/widgets/questionnaire/questionnaire_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ class QuestionnaireWidget extends StatefulWidget {
final String? header;
final String? footer;
final List<Question> questions;
final String taskId;
final String? taskId;
final StateHandler? onChange;
final StateHandler? onComplete;
final ContinuationPredicate? shouldContinue;

const QuestionnaireWidget(
this.questions,
this.taskId, {
this.questions, {
this.taskId,
this.title,
this.header,
this.footer,
Expand Down

0 comments on commit 7908a89

Please sign in to comment.