Skip to content

Commit

Permalink
Almost everything is nullable in the Log
Browse files Browse the repository at this point in the history
  • Loading branch information
rolandgeider committed Jan 18, 2025
1 parent 9ab55a6 commit 757eb4b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
20 changes: 10 additions & 10 deletions lib/models/workouts/log.dart
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ class Log {
late int routineId;

@JsonKey(required: true)
late int iteration;
int? iteration;

@JsonKey(required: true, name: 'slot_entry')
late int slotEntryId;
int? slotEntryId;

@JsonKey(required: false)
String? rir;
Expand All @@ -52,10 +52,10 @@ class Log {
String? rirTarget;

@JsonKey(required: true, fromJson: stringToNum, name: 'repetitions')
late num? repetitions;
num? repetitions;

@JsonKey(required: true, fromJson: stringToNum, name: 'repetitions_target')
late num? repetitionsTarget;
num? repetitionsTarget;

@JsonKey(required: true, name: 'repetitions_unit')
late int repetitionsUnitId;
Expand All @@ -64,10 +64,10 @@ class Log {
late RepetitionUnit repetitionsUnitObj;

@JsonKey(required: true, fromJson: stringToNum, toJson: numToString)
late num weight;
late num? weight;

@JsonKey(required: true, fromJson: stringToNum, toJson: numToString, name: 'weight_target')
late num? weightTarget;
num? weightTarget;

@JsonKey(required: true, name: 'weight_unit')
late int weightUnitId;
Expand All @@ -81,15 +81,15 @@ class Log {
Log({
this.id,
required this.exerciseId,
required this.iteration,
required this.slotEntryId,
this.iteration,
this.slotEntryId,
required this.routineId,
required this.repetitions,
this.repetitions,
this.repetitionsTarget,
required this.repetitionsUnitId,
required this.rir,
this.rirTarget,
required this.weight,
this.weight,
this.weightTarget,
required this.weightUnitId,
required this.date,
Expand Down
4 changes: 2 additions & 2 deletions lib/models/workouts/log.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 757eb4b

Please sign in to comment.