Google Flutter.io and Couchbase Lite


#1

I’m looking for a way to use couchbase lite in flutter projects.
I’m wondering about creating a dedicated package using the possibility to use platform specific code to use couchbase mobile iOs and Android SDK in Dart.
Someone has yet started a similar project? I tried to google without any significat result.


#2

I’m looking for too. Flutter is great and gets powerful with CB Lite. The only thing I’ve found so far is the link to https://github.com/hemeda3/couchbase-lite-flutter


#3

I’ve started developing a dedicated package and I’ll soon upload it to github. Are you interested in collaboration for this project?


#4

I do not know if my programming skills are enough to help you, but I would like to support you where I can.


#5

Thank you for your availability!! I’m implementing the very first functions, I’ll soon publish the package to Github and I’ll open it to contributors. Don’t worry about your skills, anyone has to learn new things constantly. If I could help you sometime, it will be an awesome experience for me too :+1: stay tuned for news


#6

Do you use existing libraries or the REST API? I wonder how you save the Json documents on the device. just let me know if you have created a Github project. Then I will see how I can help :slight_smile:


#7

In Flutter it’s possible to write platform-specific code to access Couchbase Mobile SDK for Android and iOs. Therefore, the database is managed directly from the SDK as if running in a native app.

The hardwork here is to write an “adapter” to command native SDK directly from Dart.
You can find the GitHub project at the following URL: https://github.com/oltrenuovefrontiere/fluttercouch
Sorry about lacking documentation, but I just tested that this approach is feasible.
Don’t wonder about asking any question, I’ll be glad to answer.


#8

Thanks for the cool work. I will test it on weekend to give feedback.


#9

By now, the library can create (in an Android device) a database locally and replicate a couchbase server database by connecting to a sync gateway. It can retrieve a Document by id and extract any “usual” field (no blob).
It’s also possible to save a new document in a database but passing a map instead of a document and it’s what I’ll implement first as soon as possible.
Queries are still missing, and I’m studying how to implement it (suggestions are welcome).
I plan to write iOs native code after defining Android implementation has a good approach for queries too, so that I haven’t to write and rewrite middleware code twice.
As usual, any suggestion or feebdack are appreciated.


#10

Hy Stinger! I can’t find you in github.com. If you are still interested in this project, feel free to send me a message with your github username so that I could add you as a contributor.