From 5f7b63d9b5197d0c498414aef892af51bc8e2c05 Mon Sep 17 00:00:00 2001 From: Crondung <1922635@stud.hs-mannheim.de> Date: Sun, 26 Feb 2023 14:08:05 +0100 Subject: [PATCH] use getter --- lib/widgets/mood_form.dart | 3 +-- lib/widgets/sleep_form.dart | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/widgets/mood_form.dart b/lib/widgets/mood_form.dart index 20031df..f6fd0e0 100644 --- a/lib/widgets/mood_form.dart +++ b/lib/widgets/mood_form.dart @@ -22,8 +22,7 @@ class _MoodFormState extends State { void submitForm() { if (_moodFormKey.currentState!.validate()) { _moodFormKey.currentState?.save(); //call every onSave Method - Mood mood = - Mood(slider.getSliderValue().toInt(), _textInput, DateTime.now()); + Mood mood = Mood(slider.sliderValue.toInt(), _textInput, DateTime.now()); DatabaseService.instance.addMood(mood); _moodFormKey.currentState?.reset(); } diff --git a/lib/widgets/sleep_form.dart b/lib/widgets/sleep_form.dart index 732a27a..eb86e89 100644 --- a/lib/widgets/sleep_form.dart +++ b/lib/widgets/sleep_form.dart @@ -29,7 +29,7 @@ class _SleepFormState extends State { if (_sleepFormKey.currentState!.validate()) { _sleepFormKey.currentState?.save(); //call every onSave Method Sleep sleep = Sleep( - slider.getSliderValue().toInt(), + slider.sliderValue.toInt(), _textInput, DateTime.now(), sleepTimePicker.getCurrentTime,