nativeDetections property
Decoded native-detector results for THIS session, as parsed JSON maps
({detector, width, height, rotation, results: [...]}).
Prefer the typed detections stream.
Implementation
Stream<Map<String, dynamic>> get nativeDetections => NitroCamera.instance.eventStream.where((e) => e.type == CameraEventType.detection.index && (e.textureId == _textureId || e.textureId == 0)).map((e) {
try {
return jsonDecode(e.message) as Map<String, dynamic>;
} catch (_) {
return <String, dynamic>{'error': 'bad detection payload'};
}
});