getUserPlaybackVolume method

Future<num> getUserPlaybackVolume(
  1. String userId,
  2. bool isSharingAudio
)

Get the user's local playback volume.
userId the identify of the user
isSharingAudio true to get the volume of shared audio; false to get the microphone volume.
Return the volume, or -1 if it could not be read.

Implementation

Future<num> getUserPlaybackVolume(
    String userId, bool isSharingAudio) async {
  var params = <String, dynamic>{};
  params.putIfAbsent("userId", () => userId);
  params.putIfAbsent("isSharingAudio", () => isSharingAudio);

  return await methodChannel
      .invokeMethod<num>('getUserPlaybackVolume', params)
      .then<num>((num? value) => value ?? -1);
}