partition method

ResolvablePartition<T> partition()

Partitions the iterable into syncParts and asyncParts in a single pass.

Implementation

ResolvablePartition<T> partition() {
  final syncParts = <Sync<T>>[];
  final asyncParts = <Async<T>>[];
  for (final resolvable in this) {
    switch (resolvable) {
      case Sync():
        syncParts.add(resolvable);
      case Async():
        asyncParts.add(resolvable);
    }
  }
  return (syncParts: syncParts, asyncParts: asyncParts);
}