OnMessageReceived typedef Null safety

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]);