SleepConfig.fromJson constructor

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

Implementation

factory SleepConfig.fromJson(Map<String, dynamic> json) {
  return SleepConfig(
    includeMetricTypes: (json['includeMetricTypes'] as List?)?.map((e) => MetricType.fromString(e as String)).whereType<MetricType>().toSet(),
  );
}