setJSMethodCallCallback function
Implementation
void setJSMethodCallCallback(KrakenController controller) {
if (controller.methodChannel == null) return;
controller.methodChannel!._onJSMethodCall = (String method, arguments) async {
try {
controller.module.moduleManager.emitModuleEvent(METHOD_CHANNEL_NAME, data: [method, arguments]);
} catch (e, stack) {
print('Error invoke module event: $e, $stack');
}
};
}