resumePreview method

Future<void> resumePreview()

Resumes the current camera preview

Implementation

Future<void> resumePreview() async {
  if (!value.isPreviewPaused) {
    return;
  }
  try {
    await CameraPlatform.instance.resumePreview(_cameraId);
    value = value.copyWith(
        isPreviewPaused: false,
        previewPauseOrientation: const Optional<DeviceOrientation>.absent());
  } on PlatformException catch (e) {
    throw CameraException(e.code, e.message);
  }
}