initIsolate method

Future<void> initIsolate()

Implementation

Future<void> initIsolate() async {
  _receivePort = ReceivePort();
  _isolate = await Isolate.spawn<SendPort>(
    _entryPoint,
    _receivePort.sendPort,
  );

  _sendPort = await _receivePort.first;
}