OK
OK6mo ago

How to connect flutter and Convex

I am gonna make the Chatting app. Can be connected Flutter and Convex?
17 Replies
Convex Bot
Convex Bot6mo ago
Thanks for posting in <#1088161997662724167>. Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets. - Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.) - Use search.convex.dev to search Docs, Stack, and Discord all at once. - Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI. - Avoid tagging staff unless specifically instructed. Thank you!
Nicolas
Nicolas6mo ago
Hey! Convex doesn’t support Flutter/Dart at the moment. Some things you can do instead: — There is an HTTP api (https://docs.convex.dev/http-api/) that you can use to call your Convex functions (but you can't get realtime updates with it) — If you’re writing an app for the Dart web platform (i.e. only writing an app that executes in the browser), you could try using Dart’s JavaScript interoperability (https://dart.dev/interop/js-interop) to use the Convex JavaScript client — You could try using FFI to wrap our Rust client (https://docs.rs/convex/latest/convex/) in your Dart code (for instance using https://thlorenz.com/rid-site/)
Convex HTTP API | Convex Developer Hub
Connecting to Convex directly with HTTP
JavaScript interoperability
Integrate JavaScript code into your Dart web app.
convex - Rust
Convex Client
OK
OKOP6mo ago
thank you
Nicolas
Nicolas6mo ago
You're welcome!
v
v6mo ago
Dart packages
convex_flutter | Flutter package
A Flutter package for Convex backend integration, enabling developers to interact with Convex services, manage data, and build applications with real-time synchronization.
Indy
Indy6mo ago
cc @Mohan Singh who built that flutter package
v
v6mo ago
Cc AI and whoever built convex mobile because that was a high help 😂 I'm excited to see what people make of this package. its a good starting point... I hope to see some cool stuff. Thanks again @Mohan Singh
OK
OKOP6mo ago
Thanks everybody
bakdev
bakdev2mo ago
I've been trying to use this package, but I keep getting a "ArgumentError (Invalid argument(s): Failed to load dynamic library 'rust_builder.framework/rust_builder'" error and I don't be able to seem to debug it... Will there be an official Convex Flutter library soon?
v
v2mo ago
Officially I'm not sure. As far as the error you're getting I'm not sure about it. I never used the library. I just gave the binding code bemon to build the library. It's probably that he didn't build the rust side for whatever platform you're on. @bemon knows way more than lil ole me
Nicolas
Nicolas2mo ago
Unfortunately we don’t have plans to officially support Flutter for the moment
bemon
bemon2mo ago
i will check that issue @bakdev could you please send me the steps of configuration
bemon
bemon2mo ago
bakdev
bakdev2mo ago
hey thanks for responding, guys. @bemon appreciate the demo. the first issue i was having was that it doesn't seem to get along with flutter_rust_bridge v2.10.0, so I was forcing it to use v2.9.0. i followed the instructions, i thought, but i was having trouble with the rust framework not being included in ios, i think? i don't have the set up or errors immediately in front of me. i don't need to install flutter_rust_bridge myself, do i, and build rust? it should do that automatically just by adding the concex_flutter package since flutter_rust_bridge is a dependency? sorry, i'm not a developer, i'm a designer with a bit of development experience from like a decade ago, but i'm heavily augmented by ai these days. i don't have it installed at the moment and i'm just using the http api for now. i don't necessarily need the subscription functionality, but it'd be nice to have the option. i'll try installing it again later today and see if i can give you more info.
bemon
bemon2mo ago
could you please update the package i updated just now, 1.0.4 instead of 1.0.3
bakdev
bakdev2mo ago
oh, cool. sure. i'll do that in a bit. thanks, btw, for taking the time to make this! @bemon Hey, so I'm trying the package again and I can't get it working out of the box... From Claude: "You're right that this is the newest version. The issue is a flutter_rust_bridge version mismatch within the package itself. The good news is we've solved the main problem - main() is now executing and ConvexClient initialization is working!" Logs: === CONVEX CLIENT API KEY SERVICE TEST FAILED === flutter: Error: Bad state: flutter_rust_bridge's codegen version (2.7.0) should be the same as runtime version (2.9.0). See https://cjycode.com/flutter_rust_bridge/guides/miscellaneous/upgrade/regular for details. This is the error that I get. oh, lemme try upgrading flutter_rust_bridge, again...though I did that in my previous attempt. heyyy, okay, it's working. i'm dumb. previously i was forcing flutter_rust_bridge 2.9.0 i had to force 2.7.0 so long as I use that version of flutter_rust_bridge, it's good to go. 🙂
v
v2mo ago
Very nice Flutter rust bridge is honestly a great project Super easy to use

Did you find this page helpful?