setCurrentDevice method Null safety

Future<int?> setCurrentDevice(
  1. int type,
  2. String deviceId
)

Specify the current device

Note: this API supports only the macOS and Windows platforms

Parameters:

type Device type, which specifies the type of devices to be obtained. For more information, please see the definition of TXMediaDeviceType. type can only be TXMediaDeviceTypeMic, TXMediaDeviceTypeSpeaker, or TXMediaDeviceTypeCamera. deviceId Device ID obtained from getDevicesList

Returned value:

0: success; negative number: failure

Implementation

Future<int?> setCurrentDevice(int type, String deviceId
    ) {
  return _channel.invokeMethod('setCurrentDevice', {
    "type": type,
    "deviceId": deviceId
  });
}