DataAssets class

A collections of assets (DataURL, Blob, MediaSource) that can be accessed by an ObjectURL, avoiding usage and encoding to data URL (base64).

Constructors

DataAssets()

Properties

entries Map<String, String>
Returns a Map of ID and ObjectURL pairs.
no setter
hashCode int
The hash code for this object.
no setterinherited
ids List<String>
Returns a List of all IDs.
no setter
isEmpty bool
no setter
isNotEmpty bool
no setter
length int
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
urls List<String>
Returns a List of all URLs.
no setter

Methods

clear() → void
Clears all assets and revoke all ObjectURL.
contains(String id) bool
Returns true if contains id.
getData(String id) Future<Uint8List>?
getIDofURL(String? url) String?
Returns the ID of url.
getIDsWhereMimeTypeIsAudio() List<String>
Returns a list of IDs of type 'audio/*'.
getIDsWhereMimeTypeIsImage() List<String>
Returns a list of IDs of type 'image/*'.
getIDsWhereMimeTypeIsMedia() List<String>
Returns a list of IDs of type 'image/', 'video/' or 'audio/*'.
getIDsWhereMimeTypeIsVideo() List<String>
Returns a list of IDs of type 'video/*'.
getIDsWhereMimeTypeOf(MimeType? mimeType, {bool matchSubType = true}) List<String>
Returns a list of IDs of mimeType.
getURL(String id) String?
Returns the ObjectURL of id.
getURLofIDs(List<String> ids) List<String?>
Returns a list of ObjectURL for ids.
getURLsWhereMimeTypeIsAudio() List<String>
Returns a list of ObjectURL of type 'audio/*'.
getURLsWhereMimeTypeIsImage() List<String>
Returns a list of ObjectURL of type 'image/*'.
getURLsWhereMimeTypeIsMedia() List<String>
Returns a list of ObjectURL of type 'image/', 'video/' or 'audio/*'.
getURLsWhereMimeTypeIsVideo() List<String>
Returns a list of ObjectURL of type 'video/*'.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
putBlob(String id, Blob blob) String?
Put an asset id of value blob.
putContent(String id, String content, MimeType mimeType) String?
Put an asset id of value content and mimeType.
putData(String id, List<int> data, MimeType mimeType) String?
Put an asset id of value data.
putDataURL(String id, DataURLBase64 dataURL) String?
Put an asset id of value dataURL.
putMediaSource(String id, MediaSource source, [MimeType? mimeType]) String?
Put an asset id of value source.
putMediaStream(String id, MediaStream stream, [MimeType? mimeType]) String?
Put an asset id of value stream.
remove(String id) bool
Removes asset id and revoke ObjectURL.
rename(String id, String id2) bool
Changes id to id2.
toString() String
A string representation of this object.
inherited

Operators

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