mirror of
https://github.com/wger-project/flutter.git
synced 2026-12-05 23:44:02 +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.
24 lines
791 B
Dart
24 lines
791 B
Dart
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
|
|
part of 'workout_plan.dart';
|
|
|
|
// **************************************************************************
|
|
// JsonSerializableGenerator
|
|
// **************************************************************************
|
|
|
|
WorkoutPlan _$WorkoutPlanFromJson(Map<String, dynamic> json) {
|
|
$checkKeys(json, requiredKeys: const ['id', 'creation_date', 'comment']);
|
|
return WorkoutPlan(
|
|
id: json['id'] as int?,
|
|
creationDate: DateTime.parse(json['creation_date'] as String),
|
|
description: json['comment'] as String,
|
|
);
|
|
}
|
|
|
|
Map<String, dynamic> _$WorkoutPlanToJson(WorkoutPlan instance) =>
|
|
<String, dynamic>{
|
|
'id': instance.id,
|
|
'creation_date': instance.creationDate.toIso8601String(),
|
|
'comment': instance.description,
|
|
};
|