updateAnchor method

Future<void> updateAnchor(
  1. String id,
  2. UArPose pose
)

Moves an existing anchor; attached nodes follow.

Implementation

Future<void> updateAnchor(String id, UArPose pose) async {
  await _invoke<void>("updateAnchor", <String, Object?>{"id": id, "pose": pose.toList()});
  final UArAnchor? anchor = value.anchors[id];
  if (anchor != null) {
    value = value.copyWith(
      anchors: <String, UArAnchor>{
        ...value.anchors,
        id: anchor.copyWith(pose: pose),
      },
    );
  }
}