mirror of
https://github.com/wger-project/flutter.git
synced 2026-12-02 10:09:11 +01:00
This allows the user to use the system settings as well, and not always force light or dark mode in the app. Also move the logic to the UserProvider and do some light refactoring.
28 lines
895 B
Dart
28 lines
895 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', 'name', 'description'],
|
|
);
|
|
return WorkoutPlan(
|
|
id: (json['id'] as num?)?.toInt(),
|
|
creationDate: DateTime.parse(json['creation_date'] as String),
|
|
name: json['name'] as String,
|
|
description: json['description'] as String?,
|
|
);
|
|
}
|
|
|
|
Map<String, dynamic> _$WorkoutPlanToJson(WorkoutPlan instance) => <String, dynamic>{
|
|
'id': instance.id,
|
|
'creation_date': instance.creationDate.toIso8601String(),
|
|
'name': instance.name,
|
|
'description': instance.description,
|
|
};
|