FlutterSoundRecorder class Null safety

A Recorder is an object that can playback from various sources.

Using a recorder is very simple :

  1. Create a new FlutterSoundRecorder

  2. Open it with openAudioSession()

  3. Start your recording with startRecorder().

  4. Use the various verbs (optional):

  5. Stop your recorder : stopRecorder()

  6. Release your recorder when you have finished with it : closeAudioSession(). This verb will call stopRecorder() if necessary.

Implemented types


FlutterSoundRecorder({Level logLevel = Level.debug})
Instanciate a new Flutter Sound Recorder. The optional paramater Level logLevel specify the Logger Level you are interested by.


hashCode int
The hash code for this object. [...]
read-only, inherited
isPaused bool
True if recorderState.isPaused
isRecording bool
True if recorderState.isRecording
isStopped bool
True if recorderState.isStopped
logger Logger
The FlutterSoundRecorder Logger getter
onProgress Stream<RecordingDisposition>?
A stream on which FlutterSound will post the recorder progression. You may listen to this Stream to have feedback on the current recording. [...]
recorderState RecorderState
The current state of the Recorder
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited


closeAudioSession() Future<void>
Close a Recorder [...]
deleteRecord({required String fileName}) Future<bool?>
Delete a temporary file [...]
getRecordURL({required String path}) Future<String?>
Get the URI of a recorded file. [...]
isEncoderSupported(Codec codec) Future<bool>
Returns true if the specified encoder is supported by flutter_sound on this platform. [...]
log(Level logLevel, String msg) → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
openAudioSession({AudioFocus focus = AudioFocus.requestFocusTransient, SessionCategory category = SessionCategory.playAndRecord, SessionMode mode = SessionMode.modeDefault, int audioFlags = outputToSpeaker, AudioDevice device = AudioDevice.speaker}) Future<FlutterSoundRecorder?>
Open a Recorder [...]
pauseRecorder() Future<void>
Pause the recorder [...]
resumeRecorder() Future<void>
Resume a paused Recorder [...]
setAudioFocus({AudioFocus focus = AudioFocus.requestFocusTransient, SessionCategory category = SessionCategory.playAndRecord, SessionMode mode = SessionMode.modeDefault, AudioDevice device = AudioDevice.speaker}) Future<void>
Changes the audio focus in an open Recorder [...]
setLogLevel(Level aLevel) Future<void>
Used if the App wants to dynamically change the Log Level. Seldom used. Most of the time the Log Level is specified during the constructor.
setSubscriptionDuration(Duration duration) Future<void>
Sets the frequency at which duration updates are sent to duration listeners. [...]
startRecorder({Codec codec = Codec.defaultCodec, String? toFile, StreamSink<Food>? toStream, int sampleRate = 16000, int numChannels = 1, int bitRate = 16000, AudioSource audioSource = AudioSource.defaultSource}) Future<void>
startRecorder() starts recording with an open session. [...]
stopRecorder() Future<String?>
Stop a record. [...]
toString() String
A string representation of this object. [...]


operator ==(Object other) bool
The equality operator. [...]