aRPlaneAnchorFromJson function

ARPlaneAnchor aRPlaneAnchorFromJson(
  1. Map<String, dynamic> json
)

Constructs an ARPlaneAnchor from a serialized PlaneAnchor object

Implementation

ARPlaneAnchor aRPlaneAnchorFromJson(Map<String, dynamic> json) {
  return ARPlaneAnchor(
    transformation:
        const MatrixConverter().fromJson(json['transformation'] as List),
    name: json['name'] as String,
    childNodes: json['childNodes']
        ?.map((child) => child.toString())
        ?.toList()
        ?.cast<String>(),
    cloudanchorid: json['cloudanchorid'] as String?,
    ttl: json['ttl'] as int?,
  );
}