getTopLevelType static method

String? getTopLevelType(
  1. String? mimeType
)

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);
}