I am using this camera plugin for taking pictures, but when I pressed the button the following exception was thrown:

Session 0: Exception while stopping repeating:
E/CameraCaptureSession(11374): android.hardware.camera2.CameraAccessException: CAMERA_ERROR (3): The camera device has encountered a serious error
E/CameraCaptureSession(11374):  at android.hardware.camera2.impl.CameraDeviceImpl.checkIfCameraClosedOrInError(CameraDeviceImpl.java:2231)
E/CameraCaptureSession(11374):  at android.hardware.camera2.impl.CameraDeviceImpl.stopRepeating(CameraDeviceImpl.java:1241)
E/CameraCaptureSession(11374):  at android.hardware.camera2.impl.CameraCaptureSessionImpl.close(CameraCaptureSessionImpl.java:578)
E/CameraCaptureSession(11374):  at io.flutter.plugins.camera.Camera.closeCaptureSession(Camera.java:471)
E/CameraCaptureSession(11374):  at io.flutter.plugins.camera.Camera.close(Camera.java:477)
E/CameraCaptureSession(11374):  at io.flutter.plugins.camera.Camera$2.onError(Camera.java:176)
E/CameraCaptureSession(11374):  at android.hardware.camera2.impl.CameraDeviceImpl.notifyError(CameraDeviceImpl.java:1629)
E/CameraCaptureSession(11374):  at android.hardware.camera2.impl.CameraDeviceImpl.lambda$oDs27OTfKFfK18rUW2nQxxkPdV0(Unknown Source:0)
E/CameraCaptureSession(11374):  at android.hardware.camera2.impl.-$$Lambda$CameraDeviceImpl$oDs27OTfKFfK18rUW2nQxxkPdV0.accept(Unknown Source:8)
E/CameraCaptureSession(11374):  at com.android.internal.util.function.pooled.PooledLambdaImpl.doInvoke(PooledLambdaImpl.java:278)
E/CameraCaptureSession(11374):  at com.android.internal.util.function.pooled.PooledLambdaImpl.invoke(PooledLambdaImpl.java:201)
E/CameraCaptureSession(11374):  at com.android.internal.util.function.pooled.OmniFunction.run(OmniFunction.java:97)
E/CameraCaptureSession(11374):  at android.os.Handler.handleCallback(Handler.java:938)
E/CameraCaptureSession(11374):  at android.os.Handler.dispatchMessage(Handler.java:99)
E/CameraCaptureSession(11374):  at android.os.Looper.loop(Looper.java:223)
E/CameraCaptureSession(11374):  at android.app.ActivityThread.main(ActivityThread.java:7656)
E/CameraCaptureSession(11374):  at java.lang.reflect.Method.invoke(Native Method)
E/CameraCaptureSession(11374):  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
E/CameraCaptureSession(11374):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)

Caution: I am getting this exception when I use API 30 emulators