ahapToWaveform function

Waveform ahapToWaveform(
  1. String ahap
)

Implementation

Waveform ahapToWaveform(String ahap) {
  try {
    List<AhapEvent> ahapEvents = parseAhapEventsFromJson(ahap);
    return createWaveformFromAhapEvents(ahapEvents);
  } catch (e) {
    throw Exception('Invalid AHAP JSON');
  }
}