Closed BernardinD closed 3 years ago
paths = Directory(_directoryPath).listSync(recursive: false, followLinks:false); Future.forEach(paths, (f) async{ await FlutterTesseractOcr.extractText(f.path, language: 'eng'); }); Does this cause an error?
paths = Directory(_directoryPath).listSync(recursive: false, followLinks:false); Future.forEach(paths, (f) async{ await FlutterTesseractOcr.extractText(f.path, language: 'eng'); }); Does this cause an error?
@khjde1207 ~Yeah it does~ Sorry I meant no, there is no error with this
https://pub.dev/packages/google_ml_kit this is faster Consider using google_ml_kit
I'm trying to run multiple
extractText()
in parallel (and eventually in batches, if needed) but the function crashes.I'm using
Future.foreach()
for the parallel designCode:
Error:
Update: Similar issue when using Isolates as the parallel structure that doesn't happen when running the same code in serial main thread/isolate. Not sure if they're related. If not, I will create a new issue for the second one
Code (Partially pseudo code):
Error: