I'm using FlutterBarcodeScanner plugin in my app. It works fine, but I wanted to understand how it works, so I cloned the repository to see the code.
When I opened the cloned repository I saw that it has some Java and Swift files, which makes sense as it needs to work on both Android and iOS. And these files are where "the magic is done".
But this leads to my question: when I added flutterBarcodeScanner as a dependency in my application, I can't find these Java and Swift files, only the .dart file. How is my app scanning the barcodes "without" these files?
CodePudding user response:
For flutter package as a dependency, only the content present in lib/ will be exposed (ie public) to the dependent project. Hence the other files from package are not visible when it is used as a dependency
CodePudding user response:
It is doing so. Somewhere in your pub cache, the files are installed, that's where the code is called.