Dart Firebase SDK for Cloud Functions

Tests pub package

The firebase_functions package provides an SDK for defining Cloud Functions for Firebase in Dart.

Cloud Functions is a hosted, private, and scalable environment where you can run code. The Firebase SDK for Cloud Functions integrates the Firebase platform by letting you write code that responds to events and invokes functionality exposed by other Firebase features.

Learn more

Learn more about the Firebase SDK for Cloud Functions in the Firebase documentation or check out our samples.

Here are some resources to get help:

If the official documentation doesn't help, try asking through our official support channels.

Usage

import 'package:firebase_functions/firebase_functions.dart';

void main(List<String> args) {
  runFunctions((firebase) {
    firebase.https.onRequest(
      name: 'hello',
      (request) async {
        return Response.ok('Hello from Dart!');
      },
    );
  });
}

Status: Experimental

This package provides a Dart implementation of Firebase Cloud Functions. Only HTTPS triggers are currently supported in production. Other trigger types are experimental and have varying levels of support.

Libraries

builder
Build-time code generator for Firebase Functions.
firebase_functions
Firebase Functions for Dart
logger
Structured logger for Cloud Logging, compatible with the Firebase Functions Node.js SDK logger namespace.
params
Firebase Functions parameter system.