IDIR
IDIR16mo ago

Flutter and Convex ?

Is it possible to use convex with flutter ?
14 Replies
Michal Srb
Michal Srb16mo ago
Hey @IDIR, we don't have a client library for Flutter yet. We recommend React Native for mobile development for now.
Mason Nosam
Mason Nosam14mo ago
@Michal Srb when are you going to support Flutter?
Indy
Indy14mo ago
Flutter is not currently on our upcoming roadmap. We'll likely build native Android and iOS bindings first (no timeline yet) that Flutter can use. That said, you can always use the HTTP API directly (it's not super well documented), but you won't get realtime updates: https://docs.convex.dev/http-api/#post-apiquery-apimutation-apiaction You can also create custom HTTP Endpoints to be used by your Flutter app as well: https://docs.convex.dev/functions/http-actions
HTTP Actions | Convex Developer Hub
HTTP actions allow you to build an HTTP API right in Convex!
Convex HTTP API | Convex Developer Hub
Connecting to Convex directly with HTTP
Mason Nosam
Mason Nosam14mo ago
Our other features rely on Flutter client sdk, if I want realtime updates viewed inside Flutter app, what options do I have ? and how reliable the Android binding for Flutter if it ever happens, is it a shortcut or normal way ?
Indy
Indy14mo ago
If you absolutely must do realtime updates I can tell you the hard way and a hacky way: Hard way: Wrap the Rust convex client in Dart directly with some sort of ffi tool. I am not super familiar with the ecosystem but when I had looked a long time ago there were potentially some options. Hacky way: make a hidden webview in your app that is in your root layout and thus always available (I assume this is possible with Flutter). Put the JS ConvexClient in there and write some WebView bridging code to the Flutter code (again I assume flutter has such a mechanism). I've used this approach in the past in a similar situation with an Android app and it surprisingly worked quite well.
David Alonso
David Alonso5mo ago
Just checking if there's any status updates or reprioritizations of this on the Convex roadmap?
Indy
Indy5mo ago
We are working on Kotlin and Swift now. Once we have that it might be possible to wrap that for Flutter mobile.
David Alonso
David Alonso5mo ago
By supporting Flutter you could integrate with FlutterFlow which has grown massively over the past 3 years ( I think over 1.5M+ devs now )
Indy
Indy5mo ago
Thanks for the tip!
moisesbinzie
moisesbinzie3mo ago
@Indy Just checking if there are any status updates on convex for flutter, now that Convex for Android and as well as for swift are available
Indy
Indy3mo ago
Not yet in the plan. We're focusing on reliability and a few existing roadmap items. However @v Was able to get flutter and convex working with the rust client recently.
v
v3mo ago
if you want an example i can make a repo
moisesbinzie
moisesbinzie3mo ago
@v I have checked out the link but An example would really be helpful, thanks.

Did you find this page helpful?