cloud_functions
7.1.0, released 5 days ago by firebase.google.com
Flutter plugin for using the Cloud Functions for Firebase API.
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.
92Compare - supabase_flutter
Pick Supabase Flutter for integrated backend functions and database with Supabase.
92Compare
Works with
Packages commonly used together with cloud_functions: ones it builds on, ones built on it, and its own family.
- firebase_corecloud_functions depends on itFlutter plugin that initializes Firebase and allows multiple Firebase app connections.
- cloud_functions_webcloud_functions depends on itWeb implementation of Firebase Cloud Functions for Flutter web apps
- firebase_messagingSame familyFlutter plugin for Firebase Cloud Messaging to deliver messages on Android, iOS, web, and macOS.
- firebase_messaging_webSame familyWeb implementation of Firebase Cloud Messaging for push notifications.
- firebase_analyticsSame familyFlutter plugin for Google Analytics for Firebase.
- firebase_crashlyticsSame familyFlutter plugin that sends uncaught errors and crash reports to Firebase Crashlytics.
- firebase_authSame familyFlutter plugin for Firebase Authentication enabling passwords, phone numbers, and identity providers.
- firebase_auth_webSame familyWeb implementation of Firebase Authentication for Flutter