call method

Future call(
  1. String name, [
  2. List<Object?> functionArgs = const []
])

Calls a remote function with the supplied arguments. @name The name of the Atlas function to call. @functionArgs - Arguments that will be sent to the Atlas function. They have to be json serializable values.

Implementation

Future<dynamic> call(String name, [List<Object?> functionArgs = const []]) async {
  _user._ensureLoggedIn('call Atlas function');
  final args = jsonEncode(functionArgs);
  final response = await realmCore.callAppFunction(_user.app, _user, name, args);
  return jsonDecode(response);
}