MagicWorkerHandler typedef

MagicWorkerHandler = FutureOr Function(dynamic message)

A handler that processes an incoming message on the worker side.

Return a value to have it automatically sent back to the main isolate, or return null to send nothing for that message. The handler may be synchronous or asynchronous (Future).

Implementation

typedef MagicWorkerHandler = FutureOr<dynamic> Function(dynamic message);