scan method

  1. @override
Future<List<File>> scan()
override

Implementation

@override
Future<List<File>> scan() async {
  final result = await methodChannel.invokeMethod<List<Object?>>(AppleVisionDocumentScannerMethods.scan.name) ?? [];
  final imagePaths = result.map((e) => e.toString()).toList();
  final imageFiles = imagePaths.map((path) => File(path)).toList();
  return imageFiles;
}