nameFromMimeType static method
Gets the name for a MIME type.
Implementation
@visibleForTesting
static String nameFromMimeType(String mimeType) {
final String ext = extensionFromMimeType(mimeType) ?? 'bin';
return mimeType.startsWith('image/') ? 'image.$ext' : 'file.$ext';
}