detectionsFromCamera method

Future<List<Detection>> detectionsFromCamera(
  1. String cameraName, {
  2. Map<String, dynamic>? extra,
})

Get a list of Detections from the camera named cameraName.

// Example:
var detections = await myVisionService.detectionsFromCamera('myWebcam');

Implementation

Future<List<Detection>> detectionsFromCamera(String cameraName, {Map<String, dynamic>? extra}) async {
  final request = GetDetectionsFromCameraRequest(name: name, cameraName: cameraName, extra: extra?.toStruct());
  final response = await client.getDetectionsFromCamera(request);
  return response.detections;
}