DailySketchConfiguration.fromMap constructor

DailySketchConfiguration.fromMap(
  1. Map<String, dynamic> json
)

Implementation

factory DailySketchConfiguration.fromMap(Map<String, dynamic> json) {
  final DailySketchConfiguration tempDailySketch = DailySketchConfiguration();
  tempDailySketch.weightsOfReportType = json["weightsOfReportType"] == null
      ? null
      : List<double>.from(json["weightsOfReportType"].map((x) => x));
  tempDailySketch.weightsOfContagiousness =
      json["weightsOfContagiousness"] == null
          ? null
          : List<double>.from(json["weightsOfContagiousness"].map((x) => x));
  tempDailySketch.thresholdOfAttenuationInDb =
      json["thresholdOfAttenuationInDb"] == null
          ? null
          : List<int>.from(json["thresholdOfAttenuationInDb"].map((x) => x));
  tempDailySketch
      .weightsOfAttenuationBucket = json["weightsOfAttenuationBucket"] ==
          null
      ? null
      : List<double>.from(json["weightsOfAttenuationBucket"].map((x) => x));
  tempDailySketch.thresholdOfDaysSinceHit =
      json["thresholdOfDaysSinceHit"] == null
          ? null
          : json["thresholdOfDaysSinceHit"];
  tempDailySketch.minWindowScore =
      json["minWindowScore"] == null ? null : json["minWindowScore"];

  return tempDailySketch;
}