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()) {
_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();
}
}