ARSessionManager class
Manages the session configuration, parameters and events of an ARView
Constructors
- ARSessionManager(int id, BuildContext buildContext, PlaneDetectionConfig planeDetectionConfig, {bool debug = false})
Properties
- buildContext → BuildContext
-
Context of the ARView widget that this manager is attributed to
final
- debug → bool
-
Debugging status flag. If true, all platform calls are printed. Defaults to false.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- onPlaneOrPointTap ↔ ARHitResultHandler
-
Receives hit results from user taps with tracked planes or feature points
getter/setter pair
- planeDetectionConfig → PlaneDetectionConfig
-
Determines the types of planes ARCore and ARKit should show
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
dispose(
) → dynamic - Dispose the AR view on the platforms to pause the scenes and disconnect the platform handlers. You should call this before removing the AR view to prevent out of memory erros
-
getCameraPose(
) → Future< Matrix4?> - Returns the camera pose in Matrix4 format with respect to the world coordinate system of the ARView
-
getDistanceBetweenAnchors(
ARAnchor anchor1, ARAnchor anchor2) → Future< double?> - Returns the distance in meters between @anchor1 and @anchor2.
-
getDistanceBetweenVectors(
Vector3 vector1, Vector3 vector2) → double - Returns the distance in meters between @vector1 and @vector2.
-
getDistanceFromAnchor(
ARAnchor anchor) → Future< double?> - Returns the distance in meters between @anchor and device's camera.
-
getPose(
ARAnchor anchor) → Future< Matrix4?> - Returns the given anchor pose in Matrix4 format with respect to the world coordinate system of the ARView
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onError(
String errorMessage) → dynamic -
Displays the
errorMessage
in a snackbar of the parent widget -
onInitialize(
{bool showAnimatedGuide = true, bool showFeaturePoints = false, bool showPlanes = true, String? customPlaneTexturePath, bool showWorldOrigin = false, bool handleTaps = true, bool handlePans = false, bool handleRotation = false}) → dynamic -
Function to initialize the platform-specific AR view. Can be used to initially set or update session settings.
customPlaneTexturePath
refers to flutter assets from the app that is calling this function, NOT to assets within this plugin. Make sure the assets are correctly registered in the pubspec.yaml of the parent app (e.g. the ./example app in this plugin's repo) -
snapshot(
) → Future< ImageProvider< Object> > - Returns a future ImageProvider that contains a screenshot of the current AR Scene
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited