create variables when saving sleep form

main
Julian Gegner 2023-02-20 23:28:55 +01:00
parent c9e57b06d6
commit af5d7844e3
1 changed files with 6 additions and 3 deletions

View File

@ -29,9 +29,12 @@ class _SleepFormState extends State<SleepForm> {
if (_sleepFormKey.currentState!.validate()) { if (_sleepFormKey.currentState!.validate()) {
_sleepFormKey.currentState?.save(); //call every onSave Method _sleepFormKey.currentState?.save(); //call every onSave Method
//TODO Businesslogik aufrufen! //TODO Businesslogik aufrufen!
print(_textInput); String sleepComment = _textInput;
print(slider.getSliderValue()); int sleepQuality = slider.getSliderValue().round();
print('Eingeschlafen um: ${sleepTimePicker.getCurrentTime}'); 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(); _sleepFormKey.currentState?.reset();
} }
} }