scanFilePath method

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

Scan an image file from path. Default throws. roi is a normalised {x, y, width, height} map in [0, 1]; native implementations that don't support cropping should ignore the key.

Implementation

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