call method

Future<void> call(
  1. SendPort sendport
)

Implementation

Future<void> call(SendPort sendport) async {
  await onInit?.call(initData);
  final receivePort = ReceivePort();
  sendport.send(receivePort.sendPort);
  receivePort.listen((message) {
    if (message is _WorkerExit) {
      receivePort.close();
      return;
    }

    entry(message, sendport.send);
  });
}