MethodChannelSystemAudioMeter class

An implementation of SystemAudioMeterPlatform that uses method channels.

This class is the default runtime backend used by Flutter code. Forks that add new desktop platforms can use it as a reference for channel naming, payload shapes, and Dart-side parsing conventions.

Inheritance

Properties

deviceEventChannel EventChannel
Event channel used for device lifecycle events.
final
deviceEvents Stream<AudioDeviceEvent>
Broadcast stream of device connection and disconnection events.
no setteroverride
eventChannel EventChannel
Event channel used for output peak updates.
final
hashCode int
The hash code for this object.
no setterinherited
inputEventChannel EventChannel
Event channel used for input peak updates.
final
inputLevels Stream<AudioLevels>
Broadcast stream of input peak updates.
no setteroverride
isInputRunning Future<bool>
Whether input metering is currently active.
no setteroverride
isRunning Future<bool>
Whether output metering is currently active.
no setteroverride
levels Stream<AudioLevels>
Backward-compatible alias for outputLevels.
no setteroverride
methodChannel MethodChannel
Method channel used for command-style requests.
final
outputLevels Stream<AudioLevels>
Broadcast stream of output peak updates.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
silenceEventChannel EventChannel
Event channel used for low-level silence transition events.
final
silenceEvents Stream<AudioSilenceEvent>
Broadcast stream of low-level silence transition events.
no setteroverride

Methods

createSilenceTracker({required List<AudioSilenceStage> stages}) AudioSilenceTracker
Creates a tracker that derives silence stages in Dart from silenceEvents.
override
disableSilenceDetection({required AudioDeviceFlow flow}) Future<void>
Disables native silence detection for the given flow.
override
enableSilenceDetection({required AudioDeviceFlow flow, required double threshold, required Duration duration}) Future<void>
Enables native silence detection for the given flow.
override
getCurrentInputDevice() Future<AudioInputDevice?>
Returns the current input device used by the plugin, if known.
override
getCurrentOutputDevice() Future<AudioOutputDevice?>
Returns the current output device used by the plugin, if known.
override
getInputDevices() Future<List<AudioInputDevice>>
Returns the currently available input devices.
override
getOutputDevices() Future<List<AudioOutputDevice>>
Returns the currently available output devices.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setInputDevice(String? deviceId) Future<void>
Selects the input device to monitor.
override
setOutputDevice(String? deviceId) Future<void>
Selects the output device to monitor.
override
start() Future<void>
Starts output metering.
override
startInput() Future<void>
Starts input metering.
override
stop() Future<void>
Stops output metering.
override
stopInput() Future<void>
Stops input metering.
override
toString() String
A string representation of this object.
inherited

Operators

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