Skip to main content Link Menu Expand (external link) Document Search Copy Copied
onProgress property - FlutterSoundRecorder class - recorder library - Dart API
menu
onProgress

onProgress property

Stream<RecordingDisposition>? get onProgress

A stream on which FlutterSound will post the recorder progression.


You may listen to this Stream to have feedback on the current recording. Don't forget to call also setSubscriptionDuration()!

Example

        _recorderSubscription = myRecorder.onProgress.listen((e)
        {
                Duration maxDuration = e.duration;
                double decibels = e.decibels
                ...
        }
        await myRecorder.setSubscriptionDuration(
            Duration(milliseconds: 100), // 100 ms
        );

See also


Implementation

Stream<RecordingDisposition>? get onProgress =>
    (_recorderController != null) ? _recorderController!.stream : null;
flutter_sound 9.25.3