setServiceFunction static method
Set the function being executed periodically by the service
Implementation
static Future<void> setServiceFunction(Function serviceFunction) async {
try {
final serviceFunctionHandle =
PluginUtilities.getCallbackHandle(serviceFunction)?.toRawHandle();
await _invokeMainChannel(
"setServiceFunctionHandle", <dynamic>[serviceFunctionHandle]);
} catch (error) {
debugPrint(error.toString());
}
}