detectBuffer method

  1. @override
Future<List<DocumentResult>> detectBuffer(
  1. Uint8List bytes,
  2. int width,
  3. int height,
  4. int stride,
  5. int format,
  6. int rotation,
)
override

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);
}