detect method

Future<List<Map<String, dynamic>>?> detect(
  1. CameraImage image,
  2. int rotation,
  3. DICTIONARY dictionary
)

Implementation

Future<List<Map<String, dynamic>>?> detect(
    CameraImage image, int rotation, DICTIONARY dictionary) {
  if (!arThreadReady) {
    return Future.value(null);
  }

  var reqId = ++_reqId;
  var res = Completer<List<Map<String, dynamic>>?>();
  _cbs[reqId] = res;
  var msg = Request(
    reqId: reqId,
    method: 'detect',
    params: {'image': image, 'rotation': rotation, 'dictionary': dictionary},
  );

  _toDetectorThread.send(msg);
  return res.future;
}