postMessage method

Future<NUIMiniProgramMessage?> postMessage(
  1. NUIMiniProgramMessage message
)

Posting a message to the mini-app

Implementation

Future<NUIMiniProgramMessage?> postMessage(NUIMiniProgramMessage message) async{
  try {
    await _webController;
    return _postMessageToMiniProgram(message);
  }catch(e){
    logNUI(MODULE, "Failed to encode message with error : $e");
    return null;
  }
}