exchangeMessage method

Future exchangeMessage(
  1. dynamic input
)

Sending custom message

Implementation

Future<dynamic> exchangeMessage(dynamic input) async{
  final message = NUIMiniProgramMessage(channel: NUIMiniProgramMessage.DEFAULT_CHANNEL, data: input);
  final result = await _jsEngine?.sendAndAwaitCrossEvent(message);
  return result?.data;
}