ofFile static method
Resolves a format from a local file path.
Implementation
static Future<MediaType?> ofFile(FileSystemEntity file,
{List<String> mediaTypes = const [],
List<String> fileExtensions = const [],
List<Sniffer> sniffers = MediaType.sniffers}) =>
_of(
content: SnifferFileContent(file),
mediaTypes: mediaTypes,
fileExtensions: [file.path.extension(), ...fileExtensions],
sniffers: sniffers);