forked from eatvio/eatvio_app
feat(diary): New way of portion send
This commit is contained in:
@@ -527,10 +527,15 @@ class DiaryEditBloc extends Bloc<DiaryEditEvent, DiaryEditState> {
|
||||
TimeOfDay? retire,
|
||||
String? comment,
|
||||
) async {
|
||||
final formatter = DateFormat('HH:mm');
|
||||
final wakeupString =
|
||||
formatter.format(DateTime(2022, 1, 1, wakeup!.hour, wakeup.minute));
|
||||
final retireString =
|
||||
formatter.format(DateTime(2022, 1, 1, retire!.hour, retire.minute));
|
||||
final Map<String, dynamic> credentials = {
|
||||
'wakeup': wakeup,
|
||||
'retire': retire,
|
||||
'comment': comment,
|
||||
'wakeup': wakeupString,
|
||||
'retire': retireString,
|
||||
'comment': comment ?? " ",
|
||||
};
|
||||
String url = dotenv.env['SERVER_ROOT']! + '/diary/$diaryID/finishDay';
|
||||
var response = await http.post(Uri.parse(url),
|
||||
|
||||
Reference in New Issue
Block a user