switchCamera method

int switchCamera(
  1. bool frontCamera
)
override

Switching to the front/rear camera (for mobile OS)

  • Parameters:
    • frontCamera(bool):
      • true front camera;
      • false rear camera.

Implementation

int switchCamera(bool frontCamera) {
  if (_only_support_mobile) {
    return _deviceFFIBindings.switch_camera(_nativePointer, frontCamera);
  } else {
    debugPrint("device-manager-api not support");
    return -1;
  }
}