Blob constructor
Blob(
- Iterable<
Object> blobParts, { - EndingType endings = EndingType.transparent,
- String type = '',
Creates a new Blob object from a String | TypedData | ArrayBuffer | Blob.
Implementation
Blob(Iterable<Object> blobParts,
{EndingType endings = EndingType.transparent, this.type = ''}) {
_parts = blobParts.map(
(e) => switch (e) {
String value => (null, null, null, value.toLineTerminated(endings)),
ArrayBuffer value => (null, value, null, null),
TypedData value => (null, null, value, null),
Blob value => (value, null, null, null),
_ => throwUnsupportedError(e),
},
);
}