write method

Future<void> write(
  1. Uint8List chunk
)

Writes a passed chunk of data to a WritableStream and its underlying sink.

Returns a Future that resolves or throws to indicate the success or failure of the write operation.

Note that what "success" means is up to the underlying sink; it might indicate that the chunk has been accepted, and not necessarily that it is safely saved to its ultimate destination.

Implementation

Future<void> write(Uint8List chunk) => promiseToFuture(callMethod(this, "write", [chunk]));