Creates a new StreamController.
Stream creation options
Current state of the stream.
Whether the stream is still active (can receive chunks).
Current buffer size.
Push a chunk to the stream.
The chunk to push
Result indicating success or backpressure
Complete the stream successfully.
Complete the stream with an error.
The error that occurred
Cancel the stream.
Optionalreason: stringOptional reason for cancellation
Get the AsyncIterable for consuming the stream.
Controller for managing stream lifecycle. Provides push/complete/error methods and cancellation support.