recordAudio method

void recordAudio()

function used to record audio

Implementation

void recordAudio() async {
  if (await record.isRecording()) {
    record.stop();
  }

  await record.start(
    // path: 'aFullPath/myFile.m4a', // required
    encoder: AudioEncoder.AAC, // by default
    bitRate: 128000, // by default
    // sampleRate: 44100, // by default
  );
}