processAllBlocksAsync method

Future<List<UDPipeResult>> processAllBlocksAsync(
  1. List<String> blocks
)

Processes blocks in a background isolate, yielding one UDPipeResult per block. Keeps the UI thread free for large inputs.

Implementation

Future<List<UDPipeResult>> processAllBlocksAsync(List<String> blocks) async {
  if (!isAvailable) return List.filled(blocks.length, UDPipeResult.empty);
  if (kIsWeb) return processBatchPerBlock(blocks);
  final dllPath = _resolveDllPath();
  if (dllPath == null) return List.filled(blocks.length, UDPipeResult.empty);
  final handleAddr = _handle!.address;
  return Isolate.run(() => _processAllBlocksInIsolate(dllPath, handleAddr, blocks));
}