OnMessageReceived typedef
OnMessageReceived =
dynamic Function(dynamic message, [RemotePort? remotePort])
Called when a message is received on message port.
This is used by LocalPort.register.
Implementation
typedef OnMessageReceived = Function(dynamic message, [RemotePort? remotePort]);