enableAudioVolumeIndication method Null safety

Future<int> enableAudioVolumeIndication(
  1. bool enable,
  2. int interval
)

Enables the volume indication. The SDK sends to the app the current speaker and the volume

enable specify whether the speaker volume is prompted. interval specifies the time interval at which volume prompt is displayed. Unit:milliseconds. The value must be the multiples of 100 milliseconds.

Implementation

Future<int> enableAudioVolumeIndication(bool enable, int interval) async {
  IntValue reply = await _api
      .enableAudioVolumeIndication(EnableAudioVolumeIndicationRequest()
        ..enable = enable
        ..interval = interval);
  return reply.value ?? -1;
}