Blob class abstract
The Blob
interface 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.
API documentation sourced from MDN Web Docs.
Constructors
-
Blob([List<
BlobPart> ? blobParts, BlobPropertyBag? options])
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
-
The
slice()
method of the Blob interface creates and returns a newBlob
object which contains data from a subset of the blob on which it's called. Thestream()
method of the Blob interface returns aReadableStream
which upon reading returns the data contained within theBlob
. Thetext()
method of the Blob interface returns aPromise
that resolves with a string containing the contents of the blob, interpreted as UTF-8. ThearrayBuffer()
method of the Blob interface returns aPromise
that resolves with the contents of the blob as binary data contained in anArrayBuffer
. Thesize
read-only property of the Blob interface returns the size of the Blob or File in bytes.no setter - type → String
-
The
type
read-only property of the Blob interface returns the of the file.no setter
Methods
-
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