toJson method

  1. @override
int toJson(
  1. ARHitTestResultType object
)

Converts the type of an ARHitTestResult from its ARHitTestResultType to an integer representation

Implementation

@override
int toJson(ARHitTestResultType object) {
  switch (object) {
    case ARHitTestResultType.plane:
      return 1;
    case ARHitTestResultType.point:
      return 2;
    default:
      return 0;
  }
}