switchCamera method

Future<bool> switchCamera(
  1. CameraInfo camera
)

切换摄像头 Switch Camera

Implementation

Future<bool> switchCamera(CameraInfo camera) async {
  await stopPreview();
  final options = await startPreview(camera);
  return options != null;
}