initRecorder method

Future<void> initRecorder()

Implementation

Future<void> initRecorder() async {
  await _audioRecorder.openAudioSession();
  final directory = await getApplicationDocumentsDirectory();
  final filePath = '${directory.path}/recorded_audio.m4a';
  await _audioRecorder.startRecorder(toFile: filePath);
}