ExerciseSessionSegment.fromJson constructor

ExerciseSessionSegment.fromJson(
  1. Map<String, dynamic> json
)

General constructor from JSON payload

Implementation

ExerciseSessionSegment.fromJson(Map<String, dynamic> json)
    : startTimestamp = parseInt(json['startTimestamp']),
      endTimestamp = parseInt(json['endTimestamp']),
      segmentType = ExerciseSegmentType.from(json['segmentType']),
      repetitions = tryParseInt(json['repetitions']) ?? 0;