switchCamera method

Future<void> switchCamera()

Function to switch between front and rear camera

Implementation

Future<void> switchCamera() async {
  var status = await Permission.camera.status;
  if (status.isDenied) {
    await Permission.camera.request();
  }
  await value.engine?.switchCamera();
}