ARAnchor.fromJson constructor

ARAnchor.fromJson(
  1. Map<String, dynamic> arguments
)

Constructs an ARAnchor from a serialized anchor object

Implementation

factory ARAnchor.fromJson(Map<String, dynamic> arguments) {
  final type = arguments['type'];
  switch (type) {
    case 0: //(= AnchorType.plane)
      return ARPlaneAnchor.fromJson(arguments);
  }
  return ARUnkownAnchor.fromJson(arguments);
}