ElectrocardiogramHealthValue.fromJson constructor

ElectrocardiogramHealthValue.fromJson(
  1. dynamic json
)

Implementation

factory ElectrocardiogramHealthValue.fromJson(json) =>
    ElectrocardiogramHealthValue(
      voltageValues: (json['voltageValues'] as List)
          .map((e) => ElectrocardiogramVoltageValue.fromJson(e))
          .toList(),
      averageHeartRate: json['averageHeartRate'],
      classification: ElectrocardiogramClassification.values
          .firstWhere((c) => c.value == json['classification']),
    );