AudioRecorder class

Audio recorder

Constructors

AudioRecorder()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

cancel() Future<void>
Stops and discards/deletes the file/blob.
convertBytesToInt16(Uint8List bytes, [dynamic endian = Endian.little]) List<int>
Utility method to get PCM data as signed 16 bits integers.
dispose() Future<void>
Dispose the recorder
getAmplitude() Future<Amplitude>
Gets current average & max amplitudes (dBFS) Always returns zeros on unsupported platforms
hasPermission() Future<bool>
Checks and requests for audio record permission.
isEncoderSupported(AudioEncoder encoder) Future<bool>
Checks if the given encoder is supported on the current platform.
isPaused() Future<bool>
Checks if recording session is paused.
isRecording() Future<bool>
Checks if there's valid recording session. So if session is paused, this method will still return true.
listInputDevices() Future<List<InputDevice>>
Lists capture/input devices available on the platform.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onAmplitudeChanged(Duration interval) Stream<Amplitude>
Request for amplitude at given interval.
onStateChanged() Stream<RecordState>
Listen to recorder states RecordState.
pause() Future<void>
Pauses recording session.
resume() Future<void>
Resumes recording session after pause.
start(RecordConfig config, {required String path}) Future<void>
Starts new recording session.
startStream(RecordConfig config) Future<Stream<Uint8List>>
Same as start with output stream instead of a path.
stop() Future<String?>
Stops recording session and release internal recorder resource.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited