uploadAnchor method

Future<bool?> uploadAnchor(
  1. ARAnchor anchor
)

Upload given anchor from the underlying AR scene to the Google Cloud Anchor API

Implementation

Future<bool?> uploadAnchor(ARAnchor anchor) async {
  try {
    final response =
        await _channel.invokeMethod<bool>('uploadAnchor', anchor.toJson());
    pendingAnchors.add(anchor);
    return response;
  } on PlatformException catch (e) {
    return false;
  }
}