Files
flutter/lib/models/workouts/slot.g.dart
Roland Geider ffa87f6db7 Refactor update logic
There are a lot of common steps that are always the same. This will specially
important once we edit all the other configs and their max siblings
2024-11-16 12:55:14 +01:00

32 lines
963 B
Dart

// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'slot.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
Slot _$SlotFromJson(Map<String, dynamic> json) {
$checkKeys(
json,
requiredKeys: const ['id', 'order', 'comment', 'config'],
);
return Slot(
id: (json['id'] as num?)?.toInt(),
day: (json['day'] as num).toInt(),
comment: json['comment'] as String? ?? '',
order: (json['order'] as num).toInt(),
config: json['config'],
)..entries = (json['entries'] as List<dynamic>?)
?.map((e) => SlotEntry.fromJson(e as Map<String, dynamic>))
.toList() ??
[];
}
Map<String, dynamic> _$SlotToJson(Slot instance) => <String, dynamic>{
'day': instance.day,
'order': instance.order,
'comment': instance.comment,
'config': instance.config,
};