fromJson static method

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

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),
  );
}