isolate<T> method
Implementation
Future<T?> isolate<T>(IsolationCallback<T> task, params) async {
final responsePort = ReceivePort();
_sendPort.send([
[task, params],
responsePort.sendPort
]);
return responsePort.first.then((value) {
return value is T ? value : null;
});
}