ReportSection.fromJson constructor

ReportSection.fromJson(
  1. Map<String, dynamic> data
)

Implementation

factory ReportSection.fromJson(Map<String, dynamic> data) =>
    switch (data[keyType]) {
      AverageSection.sectionType => AverageSection.fromJson(data),
      LinearRegressionSection.sectionType =>
        LinearRegressionSection.fromJson(data),
      _ => throw UnknownJsonTypeError(data[keyType]),
    };