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