upload_exercise.dart 520 Bytes
import 'apple_health_upload_sample.dart';
import 'health_upload_data_type.dart';

class HealthExerciseUploadData extends AppleHealthUploadSample {
  const HealthExerciseUploadData({
    required super.time,
    required super.value,
  }) : super(dataType: HealthUploadDataType.exercise);

  factory HealthExerciseUploadData.fromJson(Map<String, dynamic> json) {
    return HealthExerciseUploadData(
      time: healthUploadTimeFromJson(json['time']),
      value: healthUploadDoubleFromJson(json['value']),
    );
  }
}