call method
Executes this Callable HTTPS trigger asynchronously.
The data passed into the trigger can be any of the following types:
null
String
num
List, where the contained objects are also one of these types.
Map, where the values are also one of these types.
The request to the Cloud Functions backend made by this method automatically includes a Firebase Instance ID token to identify the app instance. If a user is logged in with Firebase Auth, an auth ID token for the user is also automatically included.
Implementation
@override
Future<dynamic> call([dynamic parameters]) async {
if (origin != null) {
_delegate.useFunctionsEmulator(
origin!.substring(
origin!.indexOf('://') + 3,
origin!.lastIndexOf(':'),
),
int.parse(
origin!.substring(origin!.lastIndexOf(':') + 1),
),
);
}
functions_dart.HttpsCallableResult response;
try {
response = await _delegate
.httpsCallable(
name,
options:
functions_dart.HttpsCallableOptions(timeout: options.timeout),
)
.call(parameters);
} on functions_dart.FirebaseFunctionsException catch (e, s) {
throw desktop_utils.convertFirebaseFunctionsException(e, s);
}
return response.data;
}