ARView class
If camera permission is granted, ARView creates a platform-dependent view from the factory method PlatformARView. To instantiate an ARView, the calling widget needs to pass the callback function onARViewCreated to which the function createManagers returns managers such as the ARSessionManager and the ARObjectManager. planeDetectionConfig is passed to the constructor to determine which types of planes the underlying AR frameworks should track (defaults to none). If camera permission is not given, the user is prompted to grant it. To modify the UI of the prompts, the following named parameters can be used: permissionPromptDescription, permissionPromptButtonText and permissionPromptParentalRestriction.
- Inheritance
Constructors
- ARView({Key? key, required ARViewCreatedCallback onARViewCreated, PlaneDetectionConfig planeDetectionConfig = PlaneDetectionConfig.none, bool showPlatformType = false, String permissionPromptDescription = "Camera permission must be given to the app for AR functions to work", String permissionPromptButtonText = "Grant Permission", String permissionPromptParentalRestriction = "Camera permission is restriced by the OS, please check parental control settings"})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- onARViewCreated → ARViewCreatedCallback
-
Function to be called when the AR View is created
final
- permissionPromptButtonText → String
-
final
- permissionPromptDescription → String
-
final
- permissionPromptParentalRestriction → String
-
final
- planeDetectionConfig → PlaneDetectionConfig
-
Configures the type of planes ARCore and ARKit should track. defaults to none
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- showPlatformType → bool
-
Configures whether or not to display the device's platform type above the AR view. Defaults to false
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → _ARViewState -
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