Flutter: downloadStream

Downloads a file as a lazy Stream<Uint8List>, streaming the bytes instead of buffering the whole file into memory like download().

Parameters

Examples

Download a file as a stream

final Stream<Uint8List> stream = supabase
  .storage
  .from('avatars')
  .downloadStream('avatar1.png');

await for (final chunk in stream) {
  // Handle each chunk of bytes as it arrives
}