Waveform.fromMap constructor

Waveform.fromMap(
  1. Map<String, dynamic> map
)

Implementation

factory Waveform.fromMap(Map<String, dynamic> map) {
  return Waveform(
    waveformData: List<int>.from(map["amplitudesData"] ?? <int>[]),
    amplitudesForFirstSecond:
        List<int>.from(map["amplitudesForFirstSecond"] ?? <int>[]),
    duration: Duration(milliseconds: map["duration"] as int? ?? 0),
    source: map["source"] as String? ?? '',
  );
}