Flutter client
First I tried the HTTP API + OpenAPI route and just didnt like it. You lose the real-time/subscription ergonomics, and the generated surface ends up feeling kind of weird compared to how Convex is meant to be used. So I wrote a Flutter code generator that consumes the generated TS API and produces a typed Dart API that mirrors your Convex functions (args + return types). It also handles things like ids, enums, and nested object types.
Example of what the generated Dart API looks like
for a convex function like this:
The other missing piece was a real WebSocket client in Flutter, so I built that too and the codegen targets it. It supports Flutter native and web. On native I’m using convex.rs, and on web I’m using convex/browser. Queries, mutations, subscriptions all work, and auth is handled properly including token refresh on both native and web.
Example of the API:
Auth handling:
Its deployed in production for our app and has been stable for us so far.
If people are interested, I can share the repo current status, and whats implemented. Also happy to post examples for subscriptions and some of the more complex type mappings.
Thanks!
