vbalagovic / flutter_scalable_ocr

Flutter scalable OCR package is a wrapper around google_mlkit_text_recognition where you can partialy select part of camera which text will be processed of.
https://pub.dev/packages/flutter_scalable_ocr
MIT License
56 stars 32 forks source link

Fix custom paintbox not applying #11

Closed samolego closed 8 months ago

samolego commented 9 months ago

I was playing around with the library and found out that custom paintboxes don't work, at least colors. I went to check the code of the library:

https://github.com/vbalagovic/flutter_scalable_ocr/blob/287500d1ba94111c0c9175dea09213d656209d83/lib/text_recognizer_painter.dart#L96-L99

This makes the provided paintboxCustom redundant, as values get overidden, due to execution order. Adding ( around Paint() and at the end makes it work.