mirror of
https://github.com/wger-project/flutter.git
synced 2026-02-18 00:17:48 +01:00
# Conflicts: # lib/models/body_weight/weight_entry.dart # lib/models/body_weight/weight_entry.g.dart # lib/models/workouts/log.dart # lib/models/workouts/log.g.dart # lib/models/workouts/session.g.dart # pubspec.lock # pubspec.yaml # test/exercises/contribute_exercise_image_test.mocks.dart # test/exercises/contribute_exercise_test.dart # test/exercises/contribute_exercise_test.mocks.dart # test/nutrition/nutritional_meal_form_test.mocks.dart # test/nutrition/nutritional_plan_form_test.mocks.dart # test/weight/weight_model_test.dart # test/weight/weight_provider_test.dart # test_data/body_weight.dart
46 lines
1.3 KiB
Dart
46 lines
1.3 KiB
Dart
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
|
|
part of 'routine.dart';
|
|
|
|
// **************************************************************************
|
|
// JsonSerializableGenerator
|
|
// **************************************************************************
|
|
|
|
Routine _$RoutineFromJson(Map<String, dynamic> json) {
|
|
$checkKeys(
|
|
json,
|
|
requiredKeys: const [
|
|
'id',
|
|
'created',
|
|
'name',
|
|
'description',
|
|
'fit_in_week',
|
|
'start',
|
|
'end',
|
|
],
|
|
);
|
|
return Routine(
|
|
id: (json['id'] as num?)?.toInt(),
|
|
created: utcIso8601ToLocalDate(json['created'] as String),
|
|
name: json['name'] as String,
|
|
start: json['start'] == null ? null : DateTime.parse(json['start'] as String),
|
|
end: json['end'] == null ? null : DateTime.parse(json['end'] as String),
|
|
fitInWeek: json['fit_in_week'] as bool? ?? false,
|
|
description: json['description'] as String?,
|
|
days:
|
|
(json['days'] as List<dynamic>?)
|
|
?.map((e) => Day.fromJson(e as Map<String, dynamic>))
|
|
.toList() ??
|
|
const [],
|
|
);
|
|
}
|
|
|
|
Map<String, dynamic> _$RoutineToJson(Routine instance) => <String, dynamic>{
|
|
'created': dateToUtcIso8601(instance.created),
|
|
'name': instance.name,
|
|
'description': instance.description,
|
|
'fit_in_week': instance.fitInWeek,
|
|
'start': dateToYYYYMMDD(instance.start),
|
|
'end': dateToYYYYMMDD(instance.end),
|
|
};
|