prepareForVideoRecording method Null safety

Future<void> prepareForVideoRecording()

Prepare the capture session for video recording.

Use of this method is optional, but it may be called for performance reasons on iOS.

Preparing audio can cause a minor delay in the CameraPreview view on iOS. If video recording is intended, calling this early eliminates this delay that would otherwise be experienced when video recording is started. This operation is a no-op on Android and Web.

Throws a CameraException if the prepare fails.


Future<void> prepareForVideoRecording() async {
  await CameraPlatform.instance.prepareForVideoRecording();