scanImageBytes method

  1. @override
Future<Map> scanImageBytes(
  1. Uint8List bytes, {
  2. String? modelId,
  3. Map<String, double>? roi,
})
override

Scan raw image bytes. Default throws. See scanFilePath for the roi contract.

Implementation

@override
Future<Map<dynamic, dynamic>> scanImageBytes(Uint8List bytes,
    {String? modelId, Map<String, double>? roi}) async {
  final result = await _methodChannel.invokeMapMethod<dynamic, dynamic>(
    'scanBytes',
    {
      'bytes': bytes,
      if (modelId != null) 'modelId': modelId,
      if (roi != null) 'roi': roi,
    },
  );
  return result ?? {};
}