CameraAwesomeBuilder.previewOnly constructor

CameraAwesomeBuilder.previewOnly({
  1. Sensors sensor = Sensors.back,
  2. FlashMode flashMode = FlashMode.none,
  3. double zoom = 0.0,
  4. CameraAspectRatios aspectRatio = CameraAspectRatios.ratio_4_3,
  5. Widget? progressIndicator,
  6. required CameraLayoutBuilder builder,
  7. AwesomeFilter? filter,
  8. OnImageForAnalysis? onImageForAnalysis,
  9. AnalysisConfig? imageAnalysisConfig,
  10. OnPreviewTap onPreviewTapBuilder(
    1. CameraState
    )?,
  11. OnPreviewScale onPreviewScaleBuilder(
    1. CameraState
    )?,
  12. CameraPreviewFit? previewFit,
  13. EdgeInsets previewPadding = EdgeInsets.zero,
  14. Alignment previewAlignment = Alignment.center,
})

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

Implementation

CameraAwesomeBuilder.previewOnly({
  Sensors sensor = Sensors.back,
  FlashMode flashMode = FlashMode.none,
  double zoom = 0.0,
  CameraAspectRatios aspectRatio = CameraAspectRatios.ratio_4_3,
  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,
}) : this._(
        sensor: sensor,
        flashMode: flashMode,
        zoom: zoom,
        mirrorFrontCamera: false,
        enablePhysicalButton: false,
        aspectRatio: aspectRatio,
        exifPreferences: null,
        enableAudio: false,
        progressIndicator: progressIndicator,
        builder: builder,
        saveConfig: null,
        onMediaTap: null,
        filter: filter,
        onImageForAnalysis: onImageForAnalysis,
        imageAnalysisConfig: imageAnalysisConfig,
        onPreviewTapBuilder: onPreviewTapBuilder,
        onPreviewScaleBuilder: onPreviewScaleBuilder,
        previewFit: previewFit ?? CameraPreviewFit.cover,
        previewDecoratorBuilder: null,
        theme: AwesomeTheme(),
        previewPadding: previewPadding,
        previewAlignment: previewAlignment,
      );