ofUriWithSingleHint static method

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

Resolves a format from a content URI and a ContentResolver. Accepts the following URI schemes: content, android.resource, file.

Implementation

static Future<MediaType?> ofUriWithSingleHint(Uri uri,
        {String? mediaType,
        String? fileExtension,
        List<Sniffer> sniffers = MediaType.sniffers}) =>
    ofUri(uri,
        mediaTypes: [mediaType].whereNotNull().toList(),
        fileExtensions: [fileExtension].whereNotNull().toList(),
        sniffers: sniffers);