CameraAwesomeBuilder.analysisOnly constructor

CameraAwesomeBuilder.analysisOnly({
  1. SensorConfig? sensorConfig,
  2. CameraAspectRatios aspectRatio = CameraAspectRatios.ratio_4_3,
  3. Widget? progressIndicator,
  4. required CameraLayoutBuilder builder,
  5. required OnImageForAnalysis onImageForAnalysis,
  6. AnalysisConfig? imageAnalysisConfig,
})

Use this constructor when you only want to do image analysis.

E.g.: QR code detection, barcode detection, face detection, etc.

You can't take pictures or record videos and the preview won't be displayed. You may still show the image from the analysis by converting it to JPEG and displaying that JPEG image.

Implementation

CameraAwesomeBuilder.analysisOnly({
  SensorConfig? sensorConfig,
  CameraAspectRatios aspectRatio = CameraAspectRatios.ratio_4_3,
  Widget? progressIndicator,
  required CameraLayoutBuilder builder,
  required OnImageForAnalysis onImageForAnalysis,
  AnalysisConfig? imageAnalysisConfig,
}) : this._(
        sensorConfig:
            sensorConfig ?? SensorConfig.single(sensor: Sensor.position(SensorPosition.back)),
        enablePhysicalButton: false,
        progressIndicator: progressIndicator,
        builder: builder,
        saveConfig: null,
        onMediaTap: null,
        defaultFilter: null,
        onImageForAnalysis: onImageForAnalysis,
        imageAnalysisConfig: imageAnalysisConfig,
        onPreviewTapBuilder: null,
        onPreviewScaleBuilder: null,
        previewFit: CameraPreviewFit.cover,
        previewDecoratorBuilder: null,
        theme: AwesomeTheme(),
        previewPadding: EdgeInsets.zero,
        previewAlignment: Alignment.center,
        showPreview: false,
        pictureInPictureConfigBuilder: null,
      );