VooWatchHealthSample.fromJson constructor
Implementation
factory VooWatchHealthSample.fromJson(Map<String, Object?> json) => VooWatchHealthSample(
metric: VooWatchHealthMetric.values.firstWhere((m) => m.name == json['metric']),
value: (json['value']! as num).toDouble(),
unit: json['unit']! as String,
timestamp: DateTime.fromMillisecondsSinceEpoch(json['timestamp']! as int, isUtc: true),
);