parse static method

HeartbeatDuration parse(
  1. Map<String, dynamic> json
)

Implementation

static HeartbeatDuration parse(Map<String, dynamic> json) {
  if (json.containsKey('type')) {
    return ProjectHeartbeatDuration.fromJson(json);
  } else {
    return SimpleHeartbeatDuration.fromJson(json);
  }
}