mirror of
https://github.com/wger-project/flutter.git
synced 2026-12-03 10:33:54 +01:00
While this results in way more requests needed, it has the great benefit of using the same data structure for reading and writing. This saves us a lot of headaches in the data modelling and we don't have to care that the info endpoints looked a bit different.
21 lines
607 B
Dart
21 lines
607 B
Dart
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
|
|
part of 'meal.dart';
|
|
|
|
// **************************************************************************
|
|
// JsonSerializableGenerator
|
|
// **************************************************************************
|
|
|
|
Meal _$MealFromJson(Map<String, dynamic> json) {
|
|
return Meal(
|
|
id: json['id'] as int?,
|
|
time: stringToTime(json['time'] as String?),
|
|
)..planId = json['plan'] as int;
|
|
}
|
|
|
|
Map<String, dynamic> _$MealToJson(Meal instance) => <String, dynamic>{
|
|
'id': instance.id,
|
|
'plan': instance.planId,
|
|
'time': timeToString(instance.time),
|
|
};
|