You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I deeply appreciate your efforts in creating and maintaining such an incredible project.
Currently, I am interested in writing plugin code for flutter-pi. This includes both writing new plugins or implementing existing plugins from pub.dev for flutter-pi.
However, I noticed that there isn’t detailed documentation about this topic in the README or the Wiki. I have searched and reviewed related GitHub issues and thought it might be helpful to have this information documented.
From my understanding, there seem to be two main approaches for plugin development:
Writing C code in src/plugins
I understand this method involves forking the repository, adding the C implementation in the src/plugins directory, building the modified flutter-pi binary, and deploying it to the Raspberry Pi.
Using FFI
This approach follows C interop using dart:ffi as documented in Dart’s official guidelines.
I’d like to confirm if my understanding is correct.
Assuming it is, I have the following additional questions:
In the case of the first approach, is it possible to use the flutterpi_tool build method (described as the "New Method" in the README), or is this method incompatible?
Is there a way to build C plugin code during the Flutter app build process, without needing to separately build the flutter-pi binary?
(If question 2 is possible) Would it also be feasible to implement a system where plugins for flutter-pi are distributed as pub.dev packages, similar to other custom embedders like Tizen or Sony eLinux?
a. Tizen plugins
b. Sony eLinux plugins
If I want to use C++ code for a plugin, is the second approach (FFI) the only viable option?
Thank you for your time and for reading this!
The text was updated successfully, but these errors were encountered:
Thank you for this amazing project!
I deeply appreciate your efforts in creating and maintaining such an incredible project.
Currently, I am interested in writing plugin code for flutter-pi. This includes both writing new plugins or implementing existing plugins from pub.dev for flutter-pi.
However, I noticed that there isn’t detailed documentation about this topic in the README or the Wiki. I have searched and reviewed related GitHub issues and thought it might be helpful to have this information documented.
From my understanding, there seem to be two main approaches for plugin development:
Writing C code in
src/plugins
I understand this method involves forking the repository, adding the C implementation in the
src/plugins
directory, building the modified flutter-pi binary, and deploying it to the Raspberry Pi.Using FFI
This approach follows C interop using dart:ffi as documented in Dart’s official guidelines.
I’d like to confirm if my understanding is correct.
Assuming it is, I have the following additional questions:
In the case of the first approach, is it possible to use the
flutterpi_tool
build method (described as the "New Method" in the README), or is this method incompatible?Is there a way to build C plugin code during the Flutter app build process, without needing to separately build the flutter-pi binary?
(If question 2 is possible) Would it also be feasible to implement a system where plugins for flutter-pi are distributed as pub.dev packages, similar to other custom embedders like Tizen or Sony eLinux?
a. Tizen plugins
b. Sony eLinux plugins
If I want to use C++ code for a plugin, is the second approach (FFI) the only viable option?
Thank you for your time and for reading this!
The text was updated successfully, but these errors were encountered: