[ Web Proxy ]
URL:
Viewing: https://firebase.google.com/docs/functions/start-dart [Back]  [Original]

Get started with the experimental Dart SDK  |  Cloud Functions for Firebase Skip to main content
Overview Fundamentals AI Build Run Reference Samples
Firebase [Firebase]
Send feedback

Get started with the experimental Dart SDK Stay organized with collections Save and categorize content based on your preferences.

Experimental Dart support in Cloud Functions for Firebase lets you build full-stack apps with Flutter and Dart. Communicate with other Firebase services with the new Firebase Admin Dart SDK.

To get started with Dart functions, work through the setup tasks in this guide and then continue exploring Dart HTTP and callable functions.

Caution: This feature is experimental and may change without notice.

Prerequisites

Check that you have a version of the Firebase CLI that supports Dart in Cloud Functions for Firebase with the --version flag:

 `firebase --version`
Note: You can emulate functions locally with any Firebase project, but to deploy functions, your project must be on the Blaze pricing plan. See Cloud Functions pricing.

Enable the experiment in the Firebase CLI

firebase experiments:enable dartfunctions

Initialize your project

  1. Run:

    firebase init functions
    
  2. Select Dart as your language.

  3. When asked "Do you want to install dependencies now?", answer "Yes".

View your function code

View the code that was generated in functions/bin/server.dart (or your entry point). This code demonstrates a simple HTTP function.

Note that the sample code sets the maximum number of instances for the helloWorld function to 10 with the HttpsOptions constructor. You can learn more about runtime options in Set runtime options.

Test locally

firebase emulators:start

Once the Local Emulator Suite boots up, you'll see a log line like functions http function initialized (http://127.0.0.1:5001/<url>). Load that URL in your browser to call your locally emulated Dart function.

If you edit your Dart code, the Firebase Local Emulator Suite will detect the change and automatically reload your function.

Note: Only the HTTP trigger ( onRequest ) and HTTP callable (onCall) triggers are supported for Dart in this experimental release. Other triggers can be run in the emulator, but cannot be deployed. See Limitations for more information.

Deploy

firebase deploy --only functions

The deployment process for Dart is different from Node.js or Python functions. Instead of uploading your source code to be built in Cloud Build, the Firebase CLI runs a Dart compile step on your development machine and uploads the generated binary directly to Cloud Run functions.

When the deployment is complete, you'll see a log line like Function URL (hello-world(us-central1)): https://hello-world-<random-hash>.<region>.run.app

Load that URL in your browser to call your newly deployed Dart function.

Next steps

Limitations

If you discover issues while working with Dart functions, you're encouraged to send the team a report to help us improve and expand the experimental Dart SDK.

Send feedback

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-08-19 UTC.

Need to tell us more? [[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-08-19 UTC."],[],[]]

Web Proxy Viewer  |  New URL  |  Original Page