MediaType constructor Null safety

MediaType(
  1. String type,
  2. String subtype,
  3. [Map<String, String>? parameters]
)

Implementation

MediaType(String type, String subtype, [Map<String, String>? parameters])
    : type = type.toLowerCase(),
      subtype = subtype.toLowerCase(),
      parameters = UnmodifiableMapView(
          parameters == null ? {} : CaseInsensitiveMap.from(parameters));