setAudioProfile method Null safety

Future<void> setAudioProfile(
  1. AudioProfile profile,
  2. AudioScenario scenario

Sets the audio parameters and application scenarios.


Parameter profile Sets the sample rate, bitrate, encoding mode, and the number of channels. See AudioProfile.

Parameter scenario Sets the audio application scenarios. Under different audio scenarios, the device uses different volume tracks, i.e. either the in-call volume or the media volume. See AudioScenario.


Future<void> setAudioProfile(AudioProfile profile, AudioScenario scenario) {
  return _invokeMethod('setAudioProfile', {
    'profile': AudioProfileConverter(profile).value(),
    'scenario': AudioScenarioConverter(scenario).value(),