streamTo method

Future<void> streamTo(
  1. StreamSink<List<int>> sink
)

Stream the file content to a StreamSink (memory efficient)

Implementation

Future<void> streamTo(StreamSink<List<int>> sink) async {
  final bytes = await _cachedBytes;
  sink.add(bytes);
  // Note: No flush() - StreamSink doesn't have flush capability
  // Caller is responsible for flushing/closing the sink
}