getCharsetEncoding function

Encoding? getCharsetEncoding(
  1. String? charset
)

Implementation

Encoding? getCharsetEncoding(String? charset) {
  if (charset == null || charset.isEmpty) return null;
  var mimeType = MimeType('text', 'plain', charset);
  return mimeType.charsetEncoding;
}