Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the dependency of Flutter #9

Open
rainyl opened this issue Mar 20, 2024 · 3 comments
Open

Remove the dependency of Flutter #9

rainyl opened this issue Mar 20, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@rainyl
Copy link
Owner

rainyl commented Mar 20, 2024

Actually, Flutter is NOT necessary for this package, it was included just because Flutter is required for dlls to be correctly included for a flutter app, similar to onnxruntime

Native Assets is a better solution, I have tried to use it but without success, I need to customize the build process and use cmake to correctly build opencv and opencv_dart, but the documentations of Native Assets is really insufficient and the feature is not mature.

So, for a pure dart project, it is not suitable to make Flutter as dependency, maybe we should explore more about Native Assets, or another package for pure dart. Or, maybe this is not important, afterall, it seems nearly all of dart users just use it to develop flutter app.

@rainyl rainyl added enhancement New feature or request help wanted Extra attention is needed labels Mar 20, 2024
@rainyl
Copy link
Owner Author

rainyl commented Apr 15, 2024

Thanks for your approval and suggestions.

I used to consider splitting to different packages, just like OpencvSharp, but pub.dev limits the maximum size of packages to 100M, so for some platforms like android, several .so in a package will exceed the limitation, and it will be laborious if I have to publish 4 and even more packages every time a new version is released.

Actually, I have started working on Native Assets dart-lang/sdk#50565, it is not stable enough, but I have managed to make it work for pure dart and flutter on windows, but for android and ios there are still some problems.

Anyway, thanks for your suggestions, but I think Native Assets will be the best solution in the future, although it's not stable enough for now, I decide to work more on it. If you are interested, contributions are welcome!

@rainyl
Copy link
Owner Author

rainyl commented Apr 16, 2024

Native-Assets build test

For now, main channel required

flutter channel main && flutter upgrade

Tested on Flutter 3.19.6 and above

Worked: Windows, Linux, Android
For ios: build to app success but not tested on real devices

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants
@rainyl and others