getUserVolume method

Future<num> getUserVolume(
  1. String userId,
  2. bool isShareAudio
)

Get user volume.
userId the identify of the user
isShareAudio true: if the user is sharing audio, otherwise false
Return user volume.

Implementation

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

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