For Flutter plugins for other Firebase products, see FlutterFire.md.
Note: This plugin is still under development, and some APIs might not be available yet. Feedback and Pull Requests are most welcome!
To use this plugin:
android/build.gradle
file contains the maven.google.com
as described here.cloud_functions
as a dependency in your pubspec.yaml file.import 'package:cloud_functions/cloud_functions.dart';
Getting an instance of the callable function:
final HttpsCallable callable = CloudFunctions.instance.getHttpsCallable( functionName: 'YOUR_CALLABLE_FUNCTION_NAME', );
Calling the function:
dynamic resp = await callable.call();
Calling the function with parameters:
dynamic resp = await callable.call(<String, dynamic>{ 'YOUR_PARAMETER_NAME': 'YOUR_PARAMETER_VALUE', });
See the example
directory for a complete sample app using Cloud Functions for Firebase.