WritableStream extension type

The WritableStream interface of the Streams API provides a standard abstraction for writing streaming data to a destination, known as a sink. This object comes with built-in backpressure and queuing.

WritableStream is a transferable object.

on
Implemented types
Implementers

Constructors

WritableStream([JSObject underlyingSink, QueuingStrategy strategy])
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
locked bool
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

abort([JSAny? reason]) JSPromise<JSAny?>
The abort() method of the WritableStream interface aborts the stream, signaling that the producer can no longer successfully write to the stream and it is to be immediately moved to an error state, with any queued writes discarded.
close() JSPromise<JSAny?>
The close() method of the WritableStream interface closes the associated stream. All chunks written before this method is called are sent before the returned promise is fulfilled.
getWriter() WritableStreamDefaultWriter
The getWriter() method of the WritableStream interface returns a new instance of WritableStreamDefaultWriter and locks the stream to that instance. While the stream is locked, no other writer can be acquired until this one is released.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited