fromJson static method
Creates a new power threshold alert from a JSON object
Implementation
static PowerThresholdAlert fromJson(Map<String, dynamic> json) {
return PowerThresholdAlert(
threshold: json['threshold'] as double,
metric: WorkoutAlertMetric.fromString(json['metric'] as String),
);
}