brainflow-dev / brainflow

BrainFlow is a library intended to obtain, parse and analyze EEG, EMG, ECG and other kinds of data from biosensors
https://brainflow.org/
MIT License
1.3k stars 330 forks source link

Add Flutter Bindings #696

Closed pomofomo closed 9 months ago

pomofomo commented 9 months ago

Use case:

First of all, I would like to congratulate you on this library. I am trying to build a simple EEG monitor and found lots of confusing SDKs with varying degrees of support and no clear signal processing pipeline. You have managed to build a library that (a) handles many different EEG devices (and test devices <3 ), avoiding vendor lock-in (b) support many platforms, allowing wide app deployment and (c) exposes all needed functionality to many different languages, providing developer flexibility. This really looks great!

However, I want to add a cross-platform UI to take advantage of this flexibility, allowing the app to run on Android, Windows, Mac, etc. and I couldn't find a good solution there. I have recently learned Flutter (for a different non-EEG project) which shows quite some promise in that area , building mobile and desktop apps with little-to-no platform-specific code.

Describe the solution you'd like:

I would love to see Flutter/Dart bindings for brainflow, along with a minimal sample app showing how to use this. This could serve as a springboard for lots of custom apps on multiple platforms.

Mainly, I want to judge the interest/support from the core developers for this idea. If you like it, I would start working on a PR to add Flutter FFI bindings in the spirit of the other languages there. Probably basing it on Rust as that has the strongest type-system to make the meaning clear. (Some advice on which tests to model on and how to add to the CI would be appreciated.

(I'd also like to see if these bindings could work on iOS, which would require brainbit dylib for iOS, but that is another issue)

Describe alternatives you've considered:

React Native, but I don't really like it and it is not supported.

Some Java cross-platform UI, which probably would work, but I haven't touched Java in 10 years and am not so excited about it. I would probably try that approach if this issue is rejected (or if I find Flutter FFI too hard to handle)

Andrey1994 commented 9 months ago

we do have some plans for improvement for android and ios support and its a long term goal. But currently we have no plans to add flutter support