CameraAwesomeBuilder.previewOnly constructor

CameraAwesomeBuilder.previewOnly({
  1. SensorConfig? sensorConfig,
  2. Widget? progressIndicator,
  3. required CameraLayoutBuilder builder,
  4. AwesomeFilter? filter,
  5. OnImageForAnalysis? onImageForAnalysis,
  6. AnalysisConfig? imageAnalysisConfig,
  7. OnPreviewTap onPreviewTapBuilder(
    1. CameraState
    )?,
  8. OnPreviewScale onPreviewScaleBuilder(
    1. CameraState
    )?,
  9. CameraPreviewFit? previewFit,
  10. EdgeInsets previewPadding = EdgeInsets.zero,
  11. Alignment previewAlignment = Alignment.center,
  12. PictureInPictureConfigBuilder? pictureInPictureConfigBuilder,
})

Use this constructor when you don't want to take pictures or record videos. You can still do image analysis.

Implementation

CameraAwesomeBuilder.previewOnly({
  SensorConfig? sensorConfig,
  Widget? progressIndicator,
  required CameraLayoutBuilder builder,
  AwesomeFilter? filter,
  OnImageForAnalysis? onImageForAnalysis,
  AnalysisConfig? imageAnalysisConfig,
  OnPreviewTap Function(CameraState)? onPreviewTapBuilder,
  OnPreviewScale Function(CameraState)? onPreviewScaleBuilder,
  CameraPreviewFit? previewFit,
  EdgeInsets previewPadding = EdgeInsets.zero,
  Alignment previewAlignment = Alignment.center,
  PictureInPictureConfigBuilder? pictureInPictureConfigBuilder,
}) : this._(
        sensorConfig:
            sensorConfig ?? SensorConfig.single(sensor: Sensor.position(SensorPosition.back)),
        enablePhysicalButton: false,
        progressIndicator: progressIndicator,
        builder: builder,
        saveConfig: null,
        onMediaTap: null,
        defaultFilter: filter,
        onImageForAnalysis: onImageForAnalysis,
        imageAnalysisConfig: imageAnalysisConfig,
        onPreviewTapBuilder: onPreviewTapBuilder,
        onPreviewScaleBuilder: onPreviewScaleBuilder,
        previewFit: previewFit ?? CameraPreviewFit.cover,
        previewDecoratorBuilder: null,
        theme: AwesomeTheme(),
        previewPadding: previewPadding,
        previewAlignment: previewAlignment,
        pictureInPictureConfigBuilder: pictureInPictureConfigBuilder,
      );