Cloud Functions Plugin for Flutter
A Flutter plugin to use the Cloud Functions for Firebase API
For Flutter plugins for other Firebase products, see FlutterFire.md.
To use this plugin:
- Using the Firebase Console, add an Android app to your project:
Follow the assistant, download the generated google-services.json file and place it inside android/app. Next,
modify the android/build.gradle file and the android/app/build.gradle file to add the Google services plugin
as described by the Firebase assistant. Ensure that your
android/build.gradlefile contains the
maven.google.comas described here.
- Using the Firebase Console, add an iOS app to your project: Follow the assistant, download the generated GoogleService-Info.plist file, open ios/Runner.xcworkspace with Xcode, and within Xcode place the file inside ios/Runner. Don't follow the steps named "Add Firebase SDK" and "Add initialization code" in the Firebase assistant.
cloud_functionsas a dependency in your pubspec.yaml file.
dart import 'package:cloud_functions/cloud_functions.dart';
Calling a function:
dynamic resp = await FirebaseFunctions.instance.call(functionName: 'YOUR_CALLABLE_FUNCTION_NAME');
example directory for a complete sample app using Cloud Functions for Firebase.