memory static method
Creates a Media instance from Uint8List.
The type
parameter is optional and is used to specify the MIME type of the media on web.
Implementation
static Future<Media> memory(
Uint8List data, {
String? type,
}) async {
final file = await TempFile.create();
await file.write_(data);
final instance = Media(file.path);
instance._memory = true;
return instance;
}