getVolume method

Future<TTVolume?> getVolume()

get volume

Implementation

Future<TTVolume?> getVolume() async {
  Map? volumeMap = await engineInstanceMethodChannel.invokeMapMethod('getVolume');
  if (volumeMap == null) {
    return null;
  }
  double left = volumeMap['left'] ?? -1.0;
  double right = volumeMap['right'] ?? -1.0;
  return TTVolume(left: left, right: right);
}