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({SensorConfig? sensorConfig, 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({SensorConfig? sensorConfig, bool enablePhysicalButton = false, Widget? progressIndicator, required SaveConfig saveConfig, dynamic onMediaTap(MediaCapture)?, 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, PictureInPictureConfigBuilder? pictureInPictureConfigBuilder, AwesomeFilter? defaultFilter, List<AwesomeFilter>? availableFilters})
Use the camera with the built-in interface.
CameraAwesomeBuilder.custom({SensorConfig? sensorConfig, bool mirrorFrontCamera = false, bool enablePhysicalButton = false, 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, PictureInPictureConfigBuilder? pictureInPictureConfigBuilder, List<AwesomeFilter>? filters})
🚧 Experimental
CameraAwesomeBuilder.previewOnly({SensorConfig? sensorConfig, 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, PictureInPictureConfigBuilder? pictureInPictureConfigBuilder})
Use this constructor when you don't want to take pictures or record videos. You can still do image analysis.

Properties

availableFilters → List<AwesomeFilter>?
List of filters to show in the built-in interface. (default: awesomePresetFiltersList) Push null to hide the filter button
final
builder → CameraLayoutBuilder
UI Builder
final
defaultFilter → AwesomeFilter?
THe default filter to use when the camera is started.
final
enablePhysicalButton → bool
Enable physical button (volume +/-) to take photo or record video
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
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
pictureInPictureConfigBuilder → PictureInPictureConfigBuilder?
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
sensorConfig → SensorConfig
Which sensors you want to use
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

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