#2473Requested

Dart support

Requested on GitHub by pierremrtn
Energy Committed0TeV

Having Dart support would allow us to use SpacetimeDB to build Flutter applications.
Firebase firestore + cloud functions is a very popular choice for Flutter apps, Maybe SpaceTimeDB could be a good replacement ?

  1. bfops added the feature-request label Apr 2, 2025
  2. Thanks for filing an issue! We definitely have this on our radar for future implementation ๐Ÿ™‚

  3. I would be very, very interested aswell! To add here @pierremrtn : Do you think using the flutter_rust_bridge package and using their rust SDK could be an option for us?

  4. Unfortunately, my current understanding of SpacetimeDB is very limited, so I don't know what the options are, @bfops surely has more insight about this, but I would hope that there is a more direct path to achieve this rather than a Rust interop.

  5. See also the discussion about flutter_rust_bridge here: https://github.com/clockworklabs/SpacetimeDB/issues/2565.

  6. I think, it's possible to transpile TypeScript SDK into Dart SDK because it looks pretty stable.
    I made a little investigation and get a promising results but I still have lack of understand how to transpile client_api's files.

    Speaking about flutter_rust_bridge, I don't think if it's a good approach. You will need to modify Rust code to support this bridge.

  7. I have transpiled TypeScript SDK into Dart, but it requires a lot addtional effort to make it work in runtime.
    I found another solution: you can use flutter_webview as wrapper around module_bindings lib. Yep, it sound messy and requieres some work to make communication layer between Dart code and WebView JS code, but it works :)

  8. Hey there!

    I'm very excited for this project. I've built a prototype of an idea I've had for a long time in Svelte, but the idea is very app-centric, so I would love to hear an estimated on when a Dart/Flutter SDK arrives. It would also be interesting to look into a Kotlin and/or Swift SDK. This would open up a lot of possibilities for a lot of people and bring a lot of attention to the project from the entire mobile app development world.

    The only project I see currently relating to this is https://github.com/mikaelwills/spacetimedb-dart-sdk.

    Is there any roadmap for an official Dart SDK?

    I'm also willing to research and develop something in the near future if that is needed.

  9. Hey @Nerglej! You are not alone in seeing the power of SpacetimeDB for mobile app development. This is something we'll be looking into in the medium-term future, but I can't promise which frameworks we would support out of the gate. Of course you are totally welcome to beat us to it!

Boost this Request

Reopen this request?

The request will return to its prior live status.

Mark as Duplicate

Pick the request that Dart support is a duplicate of. Energy rolls up into that request and GitHub closes the linked issue as a duplicate with a timeline reference to the canonical.

Unmark Duplicate

Restore as an independent request. The linked GitHub issue will be reopened and its duplicate-of relationship cleared. The original timeline entries stay as history; the note below is posted as a follow-up comment.