unregisterListener method
Helper function to check if a callback function has been registered before unregistering it.
Implementation
void unregisterListener(String event, Function? function, String functionName, String uuid) {
if (function != null) {
JavaScriptSDKClient.off(event, allowInterop(function));
}
}