class AudioRecorder {
static DateTime now = DateTime.now();
static String timestamp = now.toString();
var recorder = FlutterAudioRecorder2("./file_path",
audioFormat: AudioFormat.AAC);
// or var recorder = FlutterAudioRecorder2("file_path.mp3");
startRecording() async {
await recorder.initialized;
await recorder.start(); // <- error here
}
stopRecording() async {
var result = await recorder.stop();
}
}
I can't find a way to fix
, mainly because I don't understand what does it means, why it says "cannot find the file" but the file needs to be created? (since it's a recording?)
Few points I noticed are
Also make sure that the file path is right
Edit This is the code to init the recorder