diff --git a/lib/widgets/sleep_form.dart b/lib/widgets/sleep_form.dart index e11dba7..cc39a4d 100644 --- a/lib/widgets/sleep_form.dart +++ b/lib/widgets/sleep_form.dart @@ -29,9 +29,12 @@ class _SleepFormState extends State { if (_sleepFormKey.currentState!.validate()) { _sleepFormKey.currentState?.save(); //call every onSave Method //TODO Businesslogik aufrufen! - print(_textInput); - print(slider.getSliderValue()); - print('Eingeschlafen um: ${sleepTimePicker.getCurrentTime}'); + String sleepComment = _textInput; + int sleepQuality = slider.getSliderValue().round(); + TimeOfDay sleepedAt = sleepTimePicker.getCurrentTime; + TimeOfDay wokeUpAt = wakeUpTimePicker.getCurrentTime; + print( + 'Eingeschlafen um: $sleepedAt, aufgewacht um: $wokeUpAt. \nKommentar zum Schlaf: $sleepComment\nSchlafqualität: $sleepQuality'); _sleepFormKey.currentState?.reset(); } }