Observation.fromJson constructor

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

Implementation

factory Observation.fromJson(Map<String, dynamic> data) =>
    switch (data[Task.keyType]) {
      QuestionnaireTask.taskType => QuestionnaireTask.fromJson(data),
      _ => throw UnknownJsonTypeError(data[Task.keyType]),
    };