InterventionTask.fromJson constructor

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

Implementation

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