CameraAwesomeBuilder class

This is the entry point of the CameraAwesome plugin You can either

  • build your custom layout or
  • use our built in interface with the awesome factory
Inheritance

Constructors

CameraAwesomeBuilder.analysisOnly({Sensors sensor = Sensors.back, FlashMode flashMode = FlashMode.none, double zoom = 0.0, CameraAspectRatios aspectRatio = CameraAspectRatios.ratio_4_3, Widget? progressIndicator, required CameraLayoutBuilder builder, required OnImageForAnalysis onImageForAnalysis, AnalysisConfig? imageAnalysisConfig})
Use this constructor when you only want to do image analysis.
CameraAwesomeBuilder.awesome({Sensors sensor = Sensors.back, FlashMode flashMode = FlashMode.none, double zoom = 0.0, bool mirrorFrontCamera = false, bool enablePhysicalButton = false, CameraAspectRatios aspectRatio = CameraAspectRatios.ratio_4_3, ExifPreferences? exifPreferences, bool enableAudio = true, Widget? progressIndicator, required SaveConfig saveConfig, dynamic onMediaTap(MediaCapture)?, AwesomeFilter? filter, OnImageForAnalysis? onImageForAnalysis, AnalysisConfig? imageAnalysisConfig, OnPreviewTap onPreviewTapBuilder(CameraState)?, OnPreviewScale onPreviewScaleBuilder(CameraState)?, CameraPreviewFit? previewFit, CameraLayoutBuilder? previewDecoratorBuilder, AwesomeTheme? theme, Widget topActionsBuilder(CameraState state)?, Widget bottomActionsBuilder(CameraState state)?, Widget middleContentBuilder(CameraState state)?, EdgeInsets previewPadding = EdgeInsets.zero, Alignment previewAlignment = Alignment.center})
Use the camera with the built-in interface.
CameraAwesomeBuilder.custom({Sensors sensor = Sensors.back, FlashMode flashMode = FlashMode.none, double zoom = 0.0, bool mirrorFrontCamera = false, bool enablePhysicalButton = false, CameraAspectRatios aspectRatio = CameraAspectRatios.ratio_4_3, ExifPreferences? exifPreferences, bool enableAudio = true, Widget? progressIndicator, required CameraLayoutBuilder builder, required SaveConfig saveConfig, AwesomeFilter? filter, OnImageForAnalysis? onImageForAnalysis, AnalysisConfig? imageAnalysisConfig, OnPreviewTap onPreviewTapBuilder(CameraState)?, OnPreviewScale onPreviewScaleBuilder(CameraState)?, CameraPreviewFit? previewFit, AwesomeTheme? theme, EdgeInsets previewPadding = EdgeInsets.zero, Alignment previewAlignment = Alignment.center})
🚧 Experimental
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 onPreviewTapBuilder(CameraState)?, OnPreviewScale onPreviewScaleBuilder(CameraState)?, CameraPreviewFit? previewFit, EdgeInsets previewPadding = EdgeInsets.zero, Alignment previewAlignment = Alignment.center})
Use this constructor when you don't want to take pictures or record videos. You can still do image analysis.

Properties

aspectRatio → CameraAspectRatios
Ratio 1:1 is not supported yet on Android
final
builder → CameraLayoutBuilder
UI Builder
final
enableAudio → bool
Enable audio while video recording
final
enablePhysicalButton → bool
Enable physical button (volume +/-) to take photo or record video
final
exifPreferences → ExifPreferences?
choose if you want to persist user location in image metadata or not
final
filter → AwesomeFilter?
TODO: DOC
final
flashMode → FlashMode
final
hashCode → int
The hash code for this object.
no setterinherited
imageAnalysisConfig → AnalysisConfig?
only for Android
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
mirrorFrontCamera → bool
final
onImageForAnalysis → OnImageForAnalysis?
final
onMediaTap → OnMediaTap?
Called when the preview of the last captured media is tapped
final
onPreviewScaleBuilder → (OnPreviewScale Function(CameraState)?)
final
onPreviewTapBuilder → (OnPreviewTap Function(CameraState)?)
final
previewAlignment → Alignment
Set alignment of the preview to adjust its position. See also previewPadding.
final
previewDecoratorBuilder → CameraLayoutBuilder?
Useful for drawing things based on AI Analysis above the CameraPreview for instance
final
previewFit → CameraPreviewFit
check this for more details https://api.flutter.dev/flutter/painting/BoxFit.html
final
previewPadding → EdgeInsets
Add padding to the preview to adjust where you want to position it. See also previewAlignment.
final
progressIndicator → Widget?
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
saveConfig → SaveConfig?
Path builders when taking photos or recording videos
final
sensor → Sensors
front or back camera
final
showPreview → bool
Set it to true to show a Preview of the camera, false if you only want to do image analysis
final
theme → AwesomeTheme
Theme of the camera UI, used in the built-in interface.
final
zoom → double
Must be a value between 0.0 (no zoom) and 1.0 (max zoom)
final

Methods

createElement() → StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → State<StatefulWidget>
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() → List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) → String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String
Returns a one-line detailed description of the object.
inherited
toStringShort() → String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited