mintware-de / flutter_barcode_reader

A flutter plugin for reading 2D barcodes and QR codes.
MIT License
628 stars 463 forks source link

[Bug] Making the library size become 0.45MB, instead of the current 4.5MB using a simple refactor #281

Open fzyzcjy opened 4 years ago

fzyzcjy commented 4 years ago

BUG REPORTS WITHOUT PROVIDING THESE INFORMATIONS WILL BE CLOSED DIRECTLY. DON'T REMOVE THE SECTIONS!

Describe the bug Thanks for this convenient library! This lib seems to depend on SwiftProtobuf, but when checking the app size report, I find SwiftProtobuf.framework takes 4.1MB (if uncompressed). The barcode_scan itself is actually only 0.3MB, and MTBBarcodeScanner is 0.15MB. Therefore, any user who uses this wonderful lib will have to pay for 4.55MB space even if the lib is merely 0.45MB - a 10x waste thing :(

Thus, I would appreciate it if the lib could be refactored without using protobuf. Actually, Flutter has officially released the pigeon package. I have used it in my app and it looks very great. Using it, there is no need for SwiftProtobuf any more.

To Reproduce Steps to reproduce the behavior: N/A

Expected behavior Not contain SwiftProtobuf

Screenshots N/A

Logs N/A

Environment (please complete the following information):

Additional context Add any other context about the problem here.