Skip to content
pubscout

cloud_functions

7.1.0, released 5 days ago by firebase.google.com

Flutter plugin for using the Cloud Functions for Firebase API.

Flutter FavoriteWASM-ready
$ flutter pub add cloud_functions
Source repository

What it does

Allows your Flutter application to call and interact with backend functions hosted on Firebase Cloud Functions. It supports platforms like Android, iOS, web, and macOS.

AI-written summary of version 7.0.1, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You are building a Flutter app using Firebase backend infrastructure.
  • You need to execute server-side logic from your mobile, web, or desktop app via Cloud Functions.

Skip it when

  • You are not using Firebase as your backend provider.
  • You prefer a non-Firebase backend solution like Supabase or Appwrite.

Strengths

  • Official Firebase plugin with regular updates and community support.
  • Cross-platform support including Android, iOS, Web, and macOS.

Weaknesses

  • Tight coupling to the Firebase ecosystem.
  • Requires managing native configuration and SDK requirements (such as minSdk 24 on Android).

Setup

Kind
Plugin (native code)
Effort
Medium
Code generation
No
Direct dependencies
4

Requires setting up Firebase in your project using firebase_core and configuring native platform SDKs (e.g., minimum SDK 24 on Android).

import 'package:cloud_functions/cloud_functions.dart';

Future<void> callFunction() async {
  try {
    final result = await FirebaseFunctions.instance.httpsCallable('addMessage').call(
      <String, dynamic>{'text': 'hello'},
    );
    print(result.data);
  } on FirebaseFunctionsException catch (error) {
    print(error.code);
    print(error.message);
  }
}

Alternatives

Packages that do the same job and could replace cloud_functions.

  • supabase

    Pick Supabase if you are using Supabase Edge Functions instead of Firebase Cloud Functions.

  • supabase_flutter

    Pick Supabase Flutter for integrated backend functions and database with Supabase.

Works with

Packages commonly used together with cloud_functions: ones it builds on, ones built on it, and its own family.