isolateCurrent static method

Isolate isolateCurrent({
  1. SendPort? controlPort,
})

Implementation

static Isolate isolateCurrent({
  SendPort? controlPort,
}) {
  if (controlPort != null) {
    return Isolate(
      controlPort,
      pauseCapability: Isolate.current.pauseCapability,
      terminateCapability: Isolate.current.terminateCapability,
    );
  }
  return Isolate.current;
}