Comments (3)
Can i build in docker on my desktop ?
have not tried that yet, and I've never used docker before so I'm afraid I can't tell. It builds really fast though on the Pi 4, so there's probably no reason to cross-compile.
How long does the build take on a rasp pi 4 ?
About 2 seconds on a Pi 4. The embedder is pretty lightweight.
Whats the approach to write a plugin. for example connectivity or Video / Audio ?
I use libwebrtc and can build for rapi pi currently.
That's a little bit more complicated. Depending on the library (more specifically, the C-features the library uses) it's also possible to build a dart interface to that library using the dart FFI. That may be preferable, since communication via platform channels can be annoying at times, and isn't that fast. (40ms 700us between message being sent from flutter and message being received in flutter-pi).
If you can't use the dart FFI, you have to build a plugin for flutter-pi. That shouldn't be that hard to do. I'll probably create a wiki page for that in this repo. If you don't want to wait for that, you can also look how at the implementation of the services-plugin (for example) which implements the platform-side of the flutter services library.
flutter-pi plugins are statically compiled with the rest of the flutter-pi sources. If you want to create a new plugin, just create some source files somewhere in the flutter-pi sources and add these sources to the Makefile.
Your plugin only needs to implement 2 functions: an init
and deinit
function. Inside these you can register/unregister listeners to platform channels. You tell flutter-pi about your plugin by adding your
- plugin name
- reference to your init function
- reference to your deinit function
to the hardcoded_plugins
table in the pluginregistry file.
The specifics of how to register/unregister listeners and how to respond, decode platform messages are documented in the pluginregistry.h
and platformchannel.h
headers.
Keep in mind flutter-pi, although it's mostly stable, is not really production-ready.
from flutter-pi.
That build times are really encouraging.
Dart ffi is what I am working on now.
I am sorry I just tried using dart ffi with flutter-pi, it's not working. Outputs the following error:
[ERROR:engine/src/flutter/shell/common/shell.cc(199)]
Dart Error: error: import of dart:ffi is not supported in the current Dart runtime
I just investigated and this is because dart ffi does not yet support ARM fully: dart-lang/sdk#36309
from flutter-pi.
Thanks @ardera
That build times are really encouraging.
Dart ffi is what I am working on now.
Will get back to you once I have something worked up and need tips
from flutter-pi.
Related Issues (20)
- Memory leak when using the video player on a imx.6 board HOT 5
- Error: Could not load flutter engine from any location HOT 3
- mouse cursor not showed under x64 linux
- Pre-built flutter-pi binaries? HOT 5
- Issue with GST Video Player on RPI3B HOT 2
- Support for Pi 5 HOT 2
- Failed to build bundle with flutterpi_tool HOT 4
- Having Issues with flame_audio plugin. What am I missing? HOT 3
- Audio Devices Quickly Being Exhausted HOT 8
- video_player on raspberry pi 4 64 bit HOT 5
- pi@raspberrypi:~ $ flutter-pi ./test/ filesystem_layout.c: icudtl file not found! HOT 4
- "could not commit frame request" HOT 2
- Gstreamer playing without sound HOT 1
- Running on Banana Pi M2+ HOT 6
- Feature request: bash script installer HOT 4
- Failed to build flutterpi_tool HOT 2
- Touch axes inverted HOT 1
- Freeze screen HOT 1
- error message on TI AM625
- How can I show a python plot? (Question) HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flutter-pi.