From 7689de73ac39342c1c9fc7dae3bd4fd21acb7bb0 Mon Sep 17 00:00:00 2001 From: "k.mannweiler" <2012491@stud.hs-mannheim.de> Date: Thu, 2 Mar 2023 20:33:44 +0100 Subject: [PATCH] Refactor wrong method name --- lib/providers/tasks_provider.dart | 2 +- lib/widgets/mood_form.dart | 2 +- lib/widgets/relapse_form.dart | 2 +- lib/widgets/sleep_form.dart | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/providers/tasks_provider.dart b/lib/providers/tasks_provider.dart index 8ae2a04..f7cd673 100644 --- a/lib/providers/tasks_provider.dart +++ b/lib/providers/tasks_provider.dart @@ -19,7 +19,7 @@ class TasksProvider extends ChangeNotifier { initTasks(); } - void setTaksDone(Pages taskName) { + void setTaskDone(Pages taskName) { tasks[taskName] = false; notifyListeners(); } diff --git a/lib/widgets/mood_form.dart b/lib/widgets/mood_form.dart index 4661678..e43e97d 100644 --- a/lib/widgets/mood_form.dart +++ b/lib/widgets/mood_form.dart @@ -33,7 +33,7 @@ class MoodForm extends StatelessWidget { ), SubmitFormButton( submitCallback: inputModel.saveMood, - updateTasks: () => tasksModel.setTaksDone(Pages.mood), + updateTasks: () => tasksModel.setTaskDone(Pages.mood), ) ], ); diff --git a/lib/widgets/relapse_form.dart b/lib/widgets/relapse_form.dart index 38d3492..9451277 100644 --- a/lib/widgets/relapse_form.dart +++ b/lib/widgets/relapse_form.dart @@ -33,7 +33,7 @@ class RelapseForm extends StatelessWidget { ), SubmitFormButton( submitCallback: inputModel.saveRelapse, - updateTasks: () => tasksModel.setTaksDone(Pages.mood), + updateTasks: () => tasksModel.setTaskDone(Pages.mood), ) ], ); diff --git a/lib/widgets/sleep_form.dart b/lib/widgets/sleep_form.dart index b578e2c..ad033ba 100644 --- a/lib/widgets/sleep_form.dart +++ b/lib/widgets/sleep_form.dart @@ -47,7 +47,7 @@ class SleepForm extends StatelessWidget { ), SubmitFormButton( submitCallback: () => inputModel.saveSleep(wokeUpKey, sleptKey), - updateTasks: () => tasksModel.setTaksDone(Pages.mood), + updateTasks: () => tasksModel.setTaskDone(Pages.mood), ) ], );