getTopLevelType static method
Implementation
static String? getTopLevelType(String? mimeType) {
if (mimeType == null) return null;
final int indexOfSlash = mimeType.indexOf('/');
if (indexOfSlash == -1) return null;
return mimeType.substring(0, indexOfSlash);
}