detectBuffer method
Detects documents from the given image bytes.
Parameters:
bytes
: image bytes.width
: image width.height
: image height.stride
: image stride.format
: image format.rotation
: image rotation.
Returns a List of DocumentResult on success, or null
if the image could not be detected.
Implementation
@override
Future<List<DocumentResult>> detectBuffer(Uint8List bytes, int width,
int height, int stride, int format, int rotation) async {
List? results = await methodChannel.invokeListMethod<dynamic>(
'detectBuffer',
{
'bytes': bytes,
'width': width,
'height': height,
'stride': stride,
'format': format,
'rotation': rotation
},
);
return _resultWrapper(results);
}