Support Dart in Cloud Functions
Dart is not currently supported in Cloud Functions, so developers need to use more than one language in their code base. Here are some pain points they shared with the Firebase product team about this gap:
- They need to learn another language, and many of them do not have the same expertise in JavaScript as they do in Dart.
- The lack of features and tools, such as Hot Reload and Hot Restart, impacts development speed.
- Developers cannot share business logic and data models across the entire stack.
- Developers cannot use frequently used Dart packages on the server.
-
Aaron DeLory commented
I just released [firebase_js_interop](https://pub.dev/packages/firebase_js_interop) which allows you to compose Firebase Cloud Functions in the Dart language
-
Michael Barr commented
I'd love to reuse code from my flutter apps in cloud functions, especially how I interact with firestore. It's possible to transpile dart code to javascript so the dart implementation could be built on the js implementation of fb functions and admin sdk.
-
Tony Downey commented
This is the single biggest bottleneck in Dart/Flutter development when using Firebase, it duplicates so much work.
-
Oussama Maatallah commented
what's the status here? is there a roadmap or something?
-
miguel asuar commented
It will be nice to use the same language and reuse the models and repositories
-
Christian Kyony commented
Using DDD on the flutter app side, it will be nice to reuse the models on the cloud functions
-
Rafael Collado commented
With the newly added macros feature, facilitating things like json serialization, this seems like the logical next step.
-
Niko Vassilis commented
Flutter is used to increase development speed. Having a production ready "Dart backend" is the missing piece for a new era of app development
-
jimmy harika commented
Im a hobby coder. Flutter and Dart are my first language and framework. I don'thave time or capacity or need to learn Javascript. I would really appreciate its support in firebase. Thanks
-
Francis Amponsah commented
Dart is typed, of course it should be included <(-_-)>
-
Technically Non-Tech commented
Dart should have already been the accepted language for cloud functions.
Learning JavaScript / Typescript just for the sake of writing cloud functions is not viable. -
Samuel Adole commented
We should be phasing out the evil of dynamic typing that is JavaScript on the web. This takes us one step closer
-
scottstoll2017 commented
Dart support for this has long been overdue. We've been making our servers and other backend with Dart for a long time, and the Auth process for Dart has already been streamlined several times. Why have functions not been supported with at least a brute force solution for a v1?
-
Graeme Prentice commented
I'm not very familiar with javascript so having to learn it and use it for some fairly important cloud functions in my Flutter app is time consuming and annoying.
-
Dane Mackier commented
This would be a really impactful feature to implement.
What Flutter did for Dart, this can do for Flutter and Firebase all over.
I would definitely spend a lot of time working with this and sharing content about it.
If you need a product in production to try it out, you can definitely include me in the 0.0.1 release test. I'm willing to risk it for the potential!
-
Luke Pighetti commented
Context switching between Dart and Typescript is very expensive for most engineers. Having a Dart Admin SDK and first-class Cloud Functions integration (with all the expected triggers, console controls, CLI support, logging, etc) would supercharge so many Flutter + Firebase apps and bring vibrancy to this space.
-
Aytunç İşseven commented
This would be a great addition to the FB suite. Being able to reuse Dart models in the cloud functions will be so much more maintainable.
-
Adedokun Emmanuel commented
This will make life easier and reduce context switching between different languages.
-
Pedro Massango commented
I want to be able to use Dart on CF with support for all Firebase Services specially:
Firestore
Auth
Storage
Pubsub
Messaging -
Nate Frechette commented
Being able to share dart code client side and server side would be game changing!