execute method
Implementation
@override
Future<String> execute({required String functionId, String? params, bool isAsync = true}) async {
await initialize();
logger.finest('execute($functionId)');
try {
Map<String, dynamic>? jsonParams;
if (params != null) {
logger.finest('params=($params)');
jsonParams = jsonDecode(params);
}
final HttpsCallableResult result =
await functions!.httpsCallable(functionId).call(jsonParams);
return result.data.toString();
} on FirebaseFunctionsException catch (error) {
logger.severe(error.code);
logger.severe(error.details);
logger.severe(error.message);
throw HycopException(message: error.message!, code: int.parse(error.code));
}
}