refactor(diary): Fix

This commit is contained in:
2024-07-12 16:49:50 +03:00
parent ed74fd99f0
commit f3a0df20b7
7 changed files with 155 additions and 163 deletions

View File

@@ -11,8 +11,8 @@ _$DiaryModelImpl _$$DiaryModelImplFromJson(Map<String, dynamic> json) =>
id: (json['id'] as num).toInt(),
date: DateTime.parse(json['date'] as String),
closed: (json['closed'] as num).toInt(),
meals: (json['meals'] as List<dynamic>?)
?.map((e) => Meal.fromJson(e as Map<String, dynamic>))
meals: (json['meals'] as List<dynamic>)
.map((e) => Meal.fromJson(e as Map<String, dynamic>))
.toList(),
comment: json['comment'] as String?,
wakeup: json['wakeup'] == null