switchDefaultDevice method Null safety

Future<double> switchDefaultDevice(
  1. AudioDeviceType audioDeviceType
)

This function switches the audio device to the specified type.

Implementation

static Future<double> switchDefaultDevice(AudioDeviceType audioDeviceType) async {
  final Map<String, dynamic> arguments = {'deviceType': audioDeviceType.index};
  final result = await audioMethodChannel.invokeMethod<double>('switchDefaultDevice', arguments);
  return result as double;
}