RecordingSession.fromJson constructor

RecordingSession.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory RecordingSession.fromJson(Map<String, dynamic> json) {
  return RecordingSession(
    id: json['id'],
    filePath: json['filePath'],
    startTime: DateTime.parse(json['startTime']),
    endTime: json['endTime'] != null ? DateTime.parse(json['endTime']) : null,
    duration: Duration(milliseconds: json['duration']),
    sampleRate: json['sampleRate'],
    deviceName: json['deviceName'],
  );
}