yRunCompleter<T> function

Future<T> yRunCompleter<T>(
  1. dynamic action(
    1. Completer<T> completer
    )
)

异步转同步

Implementation

Future<T> yRunCompleter<T>(Function(Completer<T> completer) action) {
  final mNoKkQOLGSEIfmUw = Completer<T>();
  action(mNoKkQOLGSEIfmUw);
  return mNoKkQOLGSEIfmUw.future;
}