setSensor static method

Future<void> setSensor(
  1. Sensors sensor, {
  2. String? deviceId,
})

switch camera sensor between Sensors.back and Sensors.front on iOS, you can specify the deviceId if you have multiple cameras call getSensors to get the list of available cameras

Implementation

static Future<void> setSensor(Sensors sensor, {String? deviceId}) {
  return CameraInterface().setSensor(sensor.name.toUpperCase(), deviceId);
}