firebase-cloud-functions

Featured

Use when calling callable functions (httpsCallable), passing data to server-side logic, handling function errors/timeouts, configuring regions, or testing with the Emulator Suite.

DevOps & Infrastructure 619 stars 60 forks Updated today MIT

Install

View on GitHub

Quality Score: 95/100

Stars 20%
93
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Firebase Cloud Functions Skill This skill defines how to correctly call Firebase Cloud Functions from Flutter applications. ## When to Use Use this skill when: * Implementing callable Cloud Functions in a Flutter project. * Passing structured data to server-side functions and processing results. * Handling errors, timeouts, and retries for function calls. * Configuring region-specific function deployments. * Testing Cloud Functions locally with the Firebase Emulator Suite. --- ## 1. Setup and Configuration ``` flutter pub add cloud_functions ``` ```dart import 'package:cloud_functions/cloud_functions.dart'; // After Firebase.initializeApp(): final functions = FirebaseFunctions.instance; ``` - Initialize Firebase before using any Cloud Functions features. - For region-specific deployments, specify the region: ```dart final functions = FirebaseFunctions.instanceFor(region: 'europe-west1'); ``` - Deploy callable functions to Firebase **before** attempting to call them from the Flutter app. - Consider implementing **App Check** to prevent abuse of Cloud Functions. --- ## 2. Calling Functions Use `httpsCallable` to reference a function, then `call` to invoke it: ```dart final result = await FirebaseFunctions.instance .httpsCallable('functionName') .call(data); ``` - Pass data as a `Map` — it is automatically serialized to JSON: ```dart final result = await FirebaseFunctions.instance .httpsCallable('addMessage') .call({ "text": messageText, "push...

Details

Author
evanca
Repository
evanca/flutter-ai-rules
Created
1 years ago
Last Updated
today
Language
Shell
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category