RecordInfo.fromJson constructor

RecordInfo.fromJson(
  1. Map<String, dynamic> map
)

Implementation

factory RecordInfo.fromJson(Map<String, dynamic> map) {
  AudioOutputFormat format = map["recordType"] == ".amr"
      ? AudioOutputFormat.AMR
      : AudioOutputFormat.AAC;
  return RecordInfo(
      recordState: covertState(map["recordState"]),
      filePath: map["filePath"],
      fileSize: map["fileSize"],
      recordType: format,
      duration: map["duration"],
      maxDuration: map["maxDuration"]);
}