To use this plugin, add recorder_wav
as a dependency in your pubspec.yaml file.
Make sure you add the following permissions to your Android Manifest
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
Make sure you add the following key to Info.plist for iOS
<key>NSMicrophoneUsageDescription</key>
<string>Record audio for playback</string>
// Import package
import 'package:recorder_wav/recorder_wav.dart';
//Start recorder
RecorderWav.startRecorder();
//Stop recorder & get filepath
String filePath = await RecorderWav.StopRecorder();
//Remove wav file
RecorderWav.removeRecorderFile(filePath);
Only wav.
For help getting started with Flutter, view our online documentation.
For help on editing plugin code, view the documentation.