invokeAsync0<T> function
Invokes a zero-argument Node.js-style asynchronous function and encapsulates
the result in a Future
.
Implementation
Future<T> invokeAsync0<T>(void Function(void Function(Object?, T)) function) {
var completer = Completer<T>();
function(callbackToCompleter(completer));
return completer.future;
}