ofFilePathWithSingleHint static method

Future<MediaType?> ofFilePathWithSingleHint(
  1. String path, {
  2. String? mediaType,
  3. String? fileExtension,
  4. List<Sniffer> sniffers = MediaType.sniffers,
})

Resolves a format from a local file path.

Implementation

static Future<MediaType?> ofFilePathWithSingleHint(String path,
        {String? mediaType,
        String? fileExtension,
        List<Sniffer> sniffers = MediaType.sniffers}) =>
    ofFileWithSingleHint(File(path),
        mediaType: mediaType,
        fileExtension: fileExtension,
        sniffers: sniffers);