Blob extension type

The Blob object represents a blob, which is a file-like object of immutable, raw data; they can be read as text or binary data, or converted into a ReadableStream so its methods can be used for processing the data.

Blobs can represent data that isn't necessarily in a JavaScript-native format. The File interface is based on Blob, inheriting blob functionality and expanding it to support files on the user's system.

on
Implemented types
Implementers

Constructors

Blob([JSArray<BlobPart> blobParts, BlobPropertyBag options])
factory

Properties

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

Methods

arrayBuffer() JSPromise<JSArrayBuffer>
The arrayBuffer() method of the Blob interface returns a Promise that resolves with the contents of the blob as binary data contained in an ArrayBuffer.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
slice([int start, int end, String contentType]) Blob
The slice() method of the Blob interface creates and returns a new Blob object which contains data from a subset of the blob on which it's called.
stream() ReadableStream
The stream() method of the Blob interface returns a ReadableStream which upon reading returns the data contained within the Blob.
text() JSPromise<JSString>
The text() method of the Blob interface returns a Promise that resolves with a string containing the contents of the blob, interpreted as UTF-8.
toString() String
A string representation of this object.
inherited

Operators

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