setServiceFunction static method

Future<void> setServiceFunction(
  1. Function serviceFunction
)

set the function being executed periodically by the service

Implementation

static Future<void> setServiceFunction(Function serviceFunction) async {
  final serviceFunctionHandle =
      PluginUtilities.getCallbackHandle(serviceFunction).toRawHandle();

  await _invokeMainChannel(
      "setServiceFunctionHandle", <dynamic>[serviceFunctionHandle]);
}