ARKitController class
Controls an ARKitSceneView.
An ARKitController instance can be obtained by setting the ARKitSceneView.onARKitViewCreated callback for an ARKitSceneView widget.
Properties
- coachingOverlayViewDidDeactivate ↔ VoidCallback?
-
This is called when the view deactivates, either manually or automatically
Set this function to do any custom actions your app requires to begin
the AR experience.
For example, when coaching is deactivated, your app might restore custom UI.
getter/setter pair
- debug → bool
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- onAddNodeForAnchor ↔ AnchorEventHandler?
-
Called when a new node has been mapped to the given anchor.
getter/setter pair
- onARTap ↔ ARKitHitResultHandler?
-
getter/setter pair
- onCameraDidChangeTrackingState ↔ (dynamic Function(ARTrackingState trackingState, ARTrackingStateReason? reason)?)
-
Called when camera tracking state is changed;
getter/setter pair
- onDidRemoveNodeForAnchor ↔ AnchorEventHandler?
-
Called when a mapped node has been removed from the scene graph for the given anchor.
getter/setter pair
- onError ↔ StringResultHandler?
-
This is called when a session fails.
On failure the session will be paused.
getter/setter pair
- onNodePan ↔ ARKitPanResultHandler?
-
getter/setter pair
- onNodePinch ↔ ARKitPinchGestureHandler?
-
getter/setter pair
- onNodeRotation ↔ ARKitRotationResultHandler?
-
getter/setter pair
- onNodeTap ↔ ARKitTapResultHandler?
-
getter/setter pair
- onSessionInterruptionEnded ↔ VoidCallback?
-
This is called when a session interruption has ended.
A session will continue running from the last known state once
the interruption has ended. If the device has moved, anchors will be misaligned.
getter/setter pair
- onSessionWasInterrupted ↔ VoidCallback?
-
This is called when a session is interrupted.
A session will be interrupted and no longer able to track when
it fails to receive required sensor data. This happens when video capture is interrupted,
for example when the application is sent to the background or when there are
multiple foreground applications (see AVCaptureSessionInterruptionReason).
No additional frame updates will be delivered until the interruption has ended.
getter/setter pair
- onUpdateNodeForAnchor ↔ AnchorEventHandler?
-
Called when a node will be updated with data from the given anchor.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- updateAtTime ↔ (dynamic Function(double time)?)
-
Called once per frame
getter/setter pair
Methods
-
add(
ARKitNode node, {String? parentNodeName}) → Future< void> -
addCoachingOverlay(
CoachingOverlayGoal goal) → Future< void> - A view that displays standardized onboarding instructions to direct users toward a specific goal. The view will use context aware messaging and animations to instruct the user on gathering required info for the AR session. Requires iOS 13 and above.
-
cameraPosition(
) → Future< Vector3?> -
cameraProjectionMatrix(
) → Future< Matrix4?> -
dispose(
) → void -
getCameraEulerAngles(
) → Future< Vector3> -
getLightEstimate(
) → Future< ARKitLightEstimate?> -
getNodeBoundingBox(
ARKitNode node) → Future< List< Vector3> > - Return list of 2 Vector3 elements, where first element - min value, last element - max value.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
performHitTest(
{required double x, required double y}) → Future< List< ARKitTestResult> > - Perform Hit Test defaults to center of the screen. x and y values are between 0 and 1
-
playAnimation(
{required String key, required String sceneName, required String animationIdentifier}) → Future< void> -
pointOfViewTransform(
) → Future< Matrix4?> - Provides the point of view transform in world space (relative to the scene's root node)
-
projectPoint(
Vector3 point) → Future< Vector3?> -
remove(
String nodeName) → Future< void> -
removeAnchor(
String anchorIdentifier) → Future< void> -
removeCoachingOverlay(
) → Future< void> -
snapshot(
) → Future< ImageProvider< Object> > -
stopAnimation(
{required String key}) → Future< void> -
toString(
) → String -
A string representation of this object.
inherited
-
update(
String nodeName, {ARKitNode? node, List< ARKitMaterial> ? materials}) → Future<void> -
updateFaceGeometry(
ARKitNode node, String fromAnchorId) → void - Updates the geometry with the vertices of a face geometry.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited