WorkoutHarmonized.fromJson constructor

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

General constructor from JSON payload

Implementation

WorkoutHarmonized.fromJson(Map<String, dynamic> json)
    : type = WorkoutActivityTypeFactory.from(json['value']),
      totalEnergyBurned = json['totalEnergyBurned'],
      totalEnergyBurnedUnit = json['totalEnergyBurnedUnit'],
      totalDistance = json['totalDistance'],
      totalDistanceUnit = json['totalDistanceUnit'],
      totalSwimmingStrokeCount = json['totalSwimmingStrokeCount'],
      totalSwimmingStrokeCountUnit = json['totalSwimmingStrokeCountUnit'],
      totalFlightsClimbed = json['totalFlightsClimbed'],
      totalFlightsClimbedUnit = json['totalFlightsClimbedUnit'],
      metadata = json['metadata'];