createManagers function

dynamic createManagers(
  1. int id,
  2. BuildContext? context,
  3. ARViewCreatedCallback? arViewCreatedCallback,
  4. PlaneDetectionConfig? planeDetectionConfig,
)

Instantiates ARSessionManager, ARObjectManager and returns them to the widget instantiating the ARView using the arViewCreatedCallback

Implementation

createManagers(
  int id,
  BuildContext? context,
  ARViewCreatedCallback? arViewCreatedCallback,
  PlaneDetectionConfig? planeDetectionConfig,
) {
  if (context == null ||
      arViewCreatedCallback == null ||
      planeDetectionConfig == null) {
    return;
  }
  arViewCreatedCallback(
    ARSessionManager(id, context, planeDetectionConfig),
    ARObjectManager(id),
    ARAnchorManager(id),
    ARLocationManager(),
  );
}