decodeHeaderValue method Null safety

String? decodeHeaderValue(
  1. String name
)

Decodes the value of the first matching header

Implementation

String? decodeHeaderValue(String name) {
  final value = getHeaderValue(name);
  try {
    return MailCodec.decodeHeader(value);
  } catch (e) {
    print('Unable to decode header [$name: $value]: $e');
    return value;
  }
}