spawn<T> static method
Calls Isolate.spawn with an error listener from the Sentry SDK.
Providing your own onError
will not add the listener from Sentry SDK.
Implementation
static Future<Isolate> spawn<T>(
void Function(T message) entryPoint, T message,
{bool paused = false,
bool errorsAreFatal = true,
SendPort? onExit,
SendPort? onError,
String? debugName,
@internal Hub? hub}) async {
return Isolate.spawn(
entryPoint,
message,
paused: paused,
errorsAreFatal: errorsAreFatal,
onExit: onExit,
onError: onError ?? createPort(hub ?? HubAdapter()).sendPort,
debugName: debugName,
);
}