ofBytes static method
Resolves a format from bytes, e.g. from an HTTP response.
Implementation
static Future<MediaType?> ofBytes(Future<ByteData> Function() bytes,
{List<String> mediaTypes = const [],
List<String> fileExtensions = const [],
List<Sniffer> sniffers = MediaType.sniffers}) =>
_of(
content: SnifferBytesContent(bytes),
mediaTypes: mediaTypes,
fileExtensions: fileExtensions,
sniffers: sniffers);