getContentType static method

String? getContentType({
  1. required BuildContext context,
  2. Map<String, String>? headers,
})

Get content type from headers. It looks for content-type and if it can't find it, it will return unknown content type.

Implementation

static String? getContentType({
  required BuildContext context,
  Map<String, String>? headers,
}) {
  return tryGetContentType(headers) ??
      context.i18n(NetLensTranslationKey.unknown);
}