switchCamera method

Future<void> switchCamera()

Toggles between the front and rear cameras.

Implementation

Future<void> switchCamera() async {
  final int? id = await FlutterCropCameraPlatform.instance.switchCamera();
  if (id != null) {
    textureId = id;
  }
}