detectFromBytes method
Run detection on raw RGBA pixel bytes (e.g., from camera frame).
Implementation
@override
Future<List<DetectionResult>> detectFromBytes({
required Uint8List data,
required int width,
required int height,
}) async {
final result = await methodChannel.invokeMethod<List<dynamic>>('detectFromBytes', {
'data': data,
'width': width,
'height': height,
});
if (result == null) return [];
return result.map((e) => DetectionResult.fromMap(e as Map<dynamic, dynamic>)).toList();
}