sendMessage method

void sendMessage(
  1. Object? message
)

Responsible for sending messages to the isolate.

The isolate worker should be initiated before using it, validating with the isInitialized or awaiting the init

Implementation

void sendMessage(Object? message) {
  if (!isInitialized) throw Exception('Worker is not initialized');
  _isolateSendPort.send(message);
}