web icon indicating copy to clipboard operation
web copied to clipboard

Posting dynamic type message to Web Worker.

Open ebala96 opened this issue 9 months ago • 5 comments

I have written dart side post message to send dart Map to web worker postMessage.

Future<void> postMessageDynamic(int id, message) async{
    final worker = _workers[id];
    Map<String , dynamic> messageMap = message as Map<String,dynamic>;

    worker.postMessage(messageMap.toJSBox);
}

But toJsBox creates an empty object without the actual Map data I want to send. Let me know how can I send dart Map to postMessage without using json encoding.

ebala96 avatar May 22 '24 07:05 ebala96